void init_mm (u32_t magic, u32_t addr) { multiboot_info_t *mbi = (multiboot_info_t *) addr; u32_t up_mem_kb = 0; if ( is_bit_set (mbi->flags, 0) ) up_mem_kb = mbi->mem_upper; init_paging (up_mem_kb, phys_addr ( (u32_t) __kernel_img_end) ); _mbi = mbi; init_page_alloc (up_mem_kb, phys_addr ( (u32_t) __kernel_img_end)); }
/* Initialize all kernel subsystems and run system */ int main(void) { printa("In main %x\n", (unsigned)main); init_int(); init_page_alloc(); init_pipes(); init_scheduler(); add_task(&init_systems); while (1) { schedule(); } return 0; }