diff options
author | Alex Auvolat <alex.auvolat@ens.fr> | 2015-03-08 11:10:45 +0100 |
---|---|---|
committer | Alex Auvolat <alex.auvolat@ens.fr> | 2015-03-08 11:10:45 +0100 |
commit | 6c50033dfb7a4dc7094d96f9339459b08b4efac9 (patch) | |
tree | b3c8032d95620c2eb009273adb675c699b8a5a94 /src/kernel/core/kmain.c | |
parent | 88636d28b812e425c51be2d4d24d16a504dae147 (diff) | |
download | kogata-6c50033dfb7a4dc7094d96f9339459b08b4efac9.tar.gz kogata-6c50033dfb7a4dc7094d96f9339459b08b4efac9.zip |
Add PRNG
Diffstat (limited to 'src/kernel/core/kmain.c')
-rw-r--r-- | src/kernel/core/kmain.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/kernel/core/kmain.c b/src/kernel/core/kmain.c index 5cd71c5..7cdd109 100644 --- a/src/kernel/core/kmain.c +++ b/src/kernel/core/kmain.c @@ -23,10 +23,16 @@ #include <slab_alloc.h> #include <string.h> +#include <prng.h> + #include <dev/pci.h> #include <dev/pciide.h> #include <fs/iso9660.h> +#ifndef PRNG_INIT_ENTROPY +#define PRNG_INIT_ENTROPY 1299733235 +#endif + // ===== FOR TESTS ===== #define TEST_PLACEHOLDER_AFTER_IDT #define TEST_PLACEHOLDER_AFTER_REGION @@ -149,6 +155,10 @@ void kernel_init_stage2(void* data) { // Register FS drivers register_iso9660_driver(); + // Add entropy to prng + uint32_t x = PRNG_INIT_ENTROPY; + prng_add_entropy((uint8_t*)&x, sizeof(x)); + // Parse command line btree_t *cmdline = parse_cmdline((const char*)mbd->cmdline); |