This commit is contained in:
user
2026-02-03 21:02:33 +01:00
parent 13e63b825d
commit e8818d2b23
4 changed files with 14 additions and 14 deletions

View File

@@ -12,14 +12,14 @@
PageFrame PageFrameAllocator::PageFrames[4294967296 / 4096];
void mark_pageframes(uintptr_t start, uintptr_t end, bool available){
DBG << "start: " << hex << start << " end: " << end;
// DBG << "start: " << hex << start << " end: " << end;
start = Page::floor(start);
end = Page::ceil(end);
if(start > 4294967296)
start = 4294967296;
if(end > 4294967296)
end = 4294967296;
DBG << " page start: " << hex << start << " end: " << end << endl;
//DBG << " page start: " << hex << start << " end: " << end << endl;
for(uint64_t i = start; i < end; i += 4096){
uint64_t pg = i/4096;
@@ -62,19 +62,14 @@ void PageFrameAllocator::init(){
}
//mark other known regions as unavailable
DBG << "kernel image ";
mark_pageframes((uintptr_t)&___KERNEL_START___, (uintptr_t)&___KERNEL_END___, false);
DBG << "ISA adresses ";
mark_pageframes(0x00F00000, 0x00FFFFFF, false);
DBG << "LAPIC ";
mark_pageframes(0xfee00000, 0xfee003f0, false);
DBG << "IO APIC ";
mark_pageframes(APIC::getIOAPICAddress(), APIC::getIOAPICAddress()+0x10, false);
stats();
}
void PageFrameAllocator::stats(){