TRYING TO FIX FUCKING MEMORY MANAGER.

git-svn-id: https://spexeah.com:8443/svn/Asuro@133 6dbc8c32-bb84-406f-8558-d1cf31a0ab0c
This commit is contained in:
kieron 2017-05-20 12:19:11 +00:00
parent 3594913835
commit a6325d5062
3 changed files with 14 additions and 1 deletions

Binary file not shown.

View File

@ -33,6 +33,10 @@ begin
Present:= True;
MappedTo:= 0;
end;
with PhysicalMemory[2] do begin
Present:= True;
MappedTo:= 0;
end;
console.writestringln('PMM: INIT END.');
end;

View File

@ -57,6 +57,15 @@ var
begin
console.writestringln('VMM: INIT BEGIN.');
PageDirectory:= load_current_page_directory;
PageDirectory^[KERNEL_VIRTUAL_BASE + 1].Present:= True;
PageDirectory^[KERNEL_VIRTUAL_BASE + 1].PageSize:= True;
PageDirectory^[KERNEL_VIRTUAL_BASE + 1].Writable:= True;
PageDirectory^[KERNEL_VIRTUAL_BASE + 1].Address:= (1 SHL 22);
PageDirectory^[KERNEL_VIRTUAL_BASE + 2].Present:= True;
PageDirectory^[KERNEL_VIRTUAL_BASE + 2].PageSize:= True;
PageDirectory^[KERNEL_VIRTUAL_BASE + 2].Writable:= True;
PageDirectory^[KERNEL_VIRTUAL_BASE + 2].Address:= (2 SHL 22);
console.writestringln('VMM: INIT END.');
end;
@ -69,7 +78,7 @@ var
begin
new_page:= false;
if PageDirectory^[page_number].Present then exit;
if PageDirectory^[page_number].Reserved then exit;
//if PageDirectory^[page_number].Reserved then exit;
block:= pmemorymanager.new_block(uint32(PageDirectory));
if block < 2 then begin
GPF;