Import backup from 2004-08-15

This commit is contained in:
josh committed 2017-07-25 22:23:48 -04:00
1 parent b9c77827bd
commit 8a8f56decb
16 files changed
+539 -251

No files matched your search

+1 -1
View File
@@ -44,7 +44,7 @@ void mm_init()
}
}
}
mm_preserven(PHYS_LOAD, ((u32_t)&_end - (u32_t)&start) >> 12); //reserve kernel memory
mm_preserven(PHYS_LOAD, (((u32_t)&_end - (u32_t)&start) >> 12) + 1); //reserve kernel memory
int i;
for (i = 0; i < mb_info_block.mods_count; i++) //reserve module memory
{
+2
View File
@@ -80,10 +80,12 @@ int vmm_map1(u32_t virt, u32_t physical)
if (!(newpagetable = mm_palloc()))
return -1; //out of physical memory
pageTables[pde] = newpagetable | 0x03;
invlpg_(0xFFFFF000 + (pde << 2));
invlpg_(virt); //in case it was cached, so we can fill page table safely
memsetd((void*)(0xFFC00000 | (pde << 12)), 0, 1024); //zero out new page table
}
*(u32_t *)(0xFFC00000 | (pde << 12) | (pte << 2)) = (physical & 0xFFFFF000) | 0x03;
invlpg_((0xFFC00000 | (pde << 12) | (pte << 2)));
invlpg_(virt);
return 0;
}