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
+127 -116

No files matched your search

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