Seed badrand with an rtc read xored with itself (its called BADrand for a reason)
This commit is contained in:
parent
0dbb13fea0
commit
802ac9c012
1 changed files with 2 additions and 0 deletions
|
|
@ -1,3 +1,4 @@
|
|||
#include "badrand.h"
|
||||
#include <assert.h>
|
||||
#include <banner.h>
|
||||
#include <buddy.h>
|
||||
|
|
@ -45,6 +46,7 @@ void start() {
|
|||
memory_sweep(heap_start, heap_end);
|
||||
buddy_init(heap_start, heap_end);
|
||||
spinlock_init(&sl);
|
||||
sbadrand(rtc_read_time() ^ swap64(rtc_read_time()));
|
||||
for (int i = 0; i < banner_len; i++) uart_putc(banner[i]);
|
||||
__sync_synchronize();
|
||||
hold = 0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue