Mercurial > lcfOS
view cos/kernel/kernel.c @ 40:24ce177e01e8
Added more malloc stuff. Added mem usage
author | windel |
---|---|
date | Tue, 24 Jan 2012 17:54:16 +0100 |
parents | 5c20bd53cccd |
children | 35cc54e078dd |
line wrap: on
line source
#include "kernel.h" /* This routine initializes the kernel. * We are left here in 64-bit long mode with the first 6 MB identity mapped. * */ void kmain() { // No kmalloc required here yet: init_screen(); setupIDT(); read_multiboot_info(); // Parse the GRUB multiboot header. init_memory(available_memory); // Setup a new paging scheme and memory manager // From here kmalloc can be used. keyboard_init(); timer_init(); printf("Ramdisk location: %p\n", ramdisk_location); /* fs_node_t *fs_root = 0; fs_root = initialize_initrd(ramdisk_location); if (fs_root != 0) { fs_dirent_t *node = 0; int i = 0; while ( (node = readdir_fs(fs_root, i)) != 0) { } } */ // TODO: make shell a user space program! shell(); // Start user shell }