Big code refactor, get rid of HAL entirely
This commit is contained in:
13
kernel/randcrypto/physrand.S
Normal file
13
kernel/randcrypto/physrand.S
Normal file
@ -0,0 +1,13 @@
|
||||
.global randcrypto_get_physrand
|
||||
randcrypto_get_physrand:
|
||||
mov $100, %ecx
|
||||
xor %eax, %eax
|
||||
|
||||
.retry:
|
||||
rdrand %eax
|
||||
jc .done
|
||||
loop .retry
|
||||
.fail:
|
||||
mov $-1, %eax
|
||||
.done:
|
||||
ret
|
||||
Reference in New Issue
Block a user