44 lines
874 B
C
44 lines
874 B
C
#include <limine.h>
|
|
#include "kprintf.h"
|
|
#include "banner.h"
|
|
#include "hal/hal.h"
|
|
#include "bootinfo/bootinfo.h"
|
|
#include "pmm/pmm.h"
|
|
#include "term/term.h"
|
|
#include "dlmalloc/malloc.h"
|
|
#include "vfs/vfs.h"
|
|
#include "baseimg/baseimg.h"
|
|
#include "storedev/storedev.h"
|
|
#include "util/util.h"
|
|
#include "proc/proc.h"
|
|
#include "dev/dev.h"
|
|
#include "randcrypto/randcrypto.h"
|
|
|
|
void log_bootinfo(void) {
|
|
char buf[100];
|
|
LOG("kmain", "Memory total = %s\n", human_size(BOOT_INFO.memmap_total, buf, sizeof(buf)));
|
|
}
|
|
|
|
static volatile LIMINE_BASE_REVISION(2);
|
|
|
|
void kmain(void) {
|
|
if (LIMINE_BASE_REVISION_SUPPORTED == false) {
|
|
hal_hang();
|
|
}
|
|
|
|
bootinfo_init();
|
|
term_init(BOOT_INFO.fb->address);
|
|
log_bootinfo();
|
|
hal_init();
|
|
pmm_init();
|
|
hal_vmm_init();
|
|
randcrypto_init();
|
|
dev_init();
|
|
storedev_init();
|
|
baseimg_init();
|
|
vfs_init();
|
|
proc_init();
|
|
|
|
for(;;);
|
|
}
|