_mem_start = (u32_t)&_mem_start + sizeof(u32_t);
mmap = (struct memory_map*)info->mmap_addr;
mem_size = 0;
+ cr3 = 0;
/* TODO: get rid of this */
while((u32_t)mmap < (info->mmap_addr + info->mmap_length)) {
_frame_map = _phys_alloc(_nframes << 2, 4);
switch(_pg_flags & PG_MODE_MASK) {
- case PG_MODE_LEGACY: {
+ case PG_MODE_LEGACY:
cr3 = (u32_t)_phys_alloc(sizeof(page_table_t), PAGE_ALIGN);
break;
- }
+
case PG_MODE_PAE:
cr3 = (u32_t)_phys_alloc(sizeof(pdpt_t), PDPT_ALIGN);
break;
+
case PG_MODE_INTEL64:
case PG_MODE_IA32E:
PANIC("IA-32e mode paging not yet supported\n");
while((u32_t)mmap < (info->mmap_addr + info->mmap_length)) {
u32_t attrs;
u64_t addr;
-#if 1
+#if 0
dbg_printf("Region: 0x%016llx - 0x%016llx [%u]\n",
mmap->addr, mmap->addr + mmap->len, mmap->type);
#endif