git-svn-id: https://spexeah.com:8443/svn/Asuro@486 6dbc8c32-bb84-406f-8558-d1cf31a0ab0c

This commit is contained in:
kieron committed 2018-04-11 14:32:52 +00:00
1 parent 5201663d0b
commit 5b07f46d1b
15 files changed
+121 -110

No files matched your search

+100 -85
View File
File diff suppressed because it is too large. Load diff
-2
View File
@@ -179,8 +179,6 @@ begin
console.writestringln('');
console.writestringln('Press any key to boot in to Asuro Terminal...');
//GPF;
keyboard.hook(@temphook);
util.halt_and_dont_catch_fire;
+12 -15
View File
@@ -48,18 +48,19 @@ begin
push_trace('pmemorymanager.set_memory_area_present');
FirstBlock:= base SHR 22;
LastBlock:= (base+length) SHR 22;
if (FirstBlock > 1023) then exit;
while LastBlock > 1023 do begin
LastBlock:= LastBlock-1;
end;
for i:=FirstBlock to LastBlock do begin
if not present then begin
PhysicalMemory[i].Scanned:= True;
PhysicalMemory[i].Present:= present;
end else begin
If not PhysicalMemory[i].Scanned then begin
if not (FirstBlock > 1023) then begin
while LastBlock > 1023 do begin
LastBlock:= LastBlock-1;
end;
for i:=FirstBlock to LastBlock do begin
if not present then begin
PhysicalMemory[i].Scanned:= True;
PhysicalMemory[i].Present:= present;
end else begin
If not PhysicalMemory[i].Scanned then begin
PhysicalMemory[i].Scanned:= True;
PhysicalMemory[i].Present:= present;
end;
end;
end;
end;
@@ -168,7 +169,7 @@ begin
if not PhysicalMemory[i].Allocated then begin
if alloc_block(i, caller) then begin
new_block:= i;
exit;
break;
end;
end;
end;
@@ -181,19 +182,15 @@ begin
push_trace('pmemorymanager.free_block');
if block > 1023 then begin
GPF;
exit;
end;
if block < 2 then begin
GPF;
exit;
end;
if not PhysicalMemory[block].Present then begin
GPF;
exit;
end;
if PhysicalMemory[block].MappedTo <> caller then begin
GPF;
exit;
end;
PhysicalMemory[block].Allocated:= false;
pop_trace;
+9 -8
View File
@@ -190,14 +190,15 @@ var
begin
push_trace('vmemorymanager.new_page');
new_page:= false;
if PageDirectory^[page_number].Present then exit;
if PageDirectory^[page_number].Reserved then exit;
block:= pmemorymanager.new_block(uint32(PageDirectory));
if block < 2 then begin
GPF;
exit;
end else begin
new_page:= map_page(page_number, block);
if not PageDirectory^[page_number].Present then begin
if not PageDirectory^[page_number].Reserved then begin;
block:= pmemorymanager.new_block(uint32(PageDirectory));
if block < 2 then begin
GPF;
end else begin
new_page:= map_page(page_number, block);
end;
end;
end;
pop_trace;
end;