/* Called from locore.s, before paging */ void get_kernend_from_multiboot_mods(const struct multiboot_module *mbmod, size_t count) { struct bootinfo *bi = (struct bootinfo *)((char *)&bootinfo - KERNBASE); while(count > 0) { if(bi->bi_kernend < mbmod->mod_end) { bi->bi_kernend = roundup(mbmod->mod_end, PAGE_SIZE); } mbmod++; count--; } }