forked from PoliEcho-holding-org/kern
add RNG test to main
This commit is contained in:
@@ -2,6 +2,7 @@
|
|||||||
#include <kernel.h>
|
#include <kernel.h>
|
||||||
#include <paging.h>
|
#include <paging.h>
|
||||||
#include <serial.h>
|
#include <serial.h>
|
||||||
|
#include <random.h>
|
||||||
#include <splash.h>
|
#include <splash.h>
|
||||||
#include <system.h>
|
#include <system.h>
|
||||||
#include <gdt.h>
|
#include <gdt.h>
|
||||||
@@ -32,6 +33,15 @@ void _start(void) {
|
|||||||
if ((err = pmm_init()) < 0) panic(NULL, "Failed to initalize Physical Memory Manager. (%d)", err);
|
if ((err = pmm_init()) < 0) panic(NULL, "Failed to initalize Physical Memory Manager. (%d)", err);
|
||||||
if ((err = pag_init()) < 0) panic(NULL, "Failed to initalize Paging. (%d)", err);
|
if ((err = pag_init()) < 0) panic(NULL, "Failed to initalize Paging. (%d)", err);
|
||||||
|
|
||||||
|
// random number generation
|
||||||
|
rand_init();
|
||||||
|
// test random number generation
|
||||||
|
printk("Random number generation test:\n");
|
||||||
|
for (uint8_t i = 0; i <= 16; i++) {
|
||||||
|
printk("%d: %lu\n",i,get_random_number());
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// The most important function in the world.
|
// The most important function in the world.
|
||||||
splash();
|
splash();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user