Paging stuff.

git-svn-id: https://spexeah.com:8443/svn/Asuro@114 6dbc8c32-bb84-406f-8558-d1cf31a0ab0c
This commit is contained in:
kieron 2017-05-19 16:11:50 +00:00
parent 97299c839c
commit 1f2f7cf380
39 changed files with 32 additions and 10 deletions

BIN
Asuro.iso

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -54,6 +54,9 @@ begin
memorymanager.init(); memorymanager.init();
scheduler.init(); scheduler.init();
pint:= puint32(0);
pint^:= 10;
STI; STI;
isr32.hook(uint32(@bios_data_area.tick_update)); isr32.hook(uint32(@bios_data_area.tick_update));
@ -67,6 +70,12 @@ begin
//drivers //drivers
keyboard.init(keyboard_layout); keyboard.init(keyboard_layout);
if PageDirectory[KERNEL_PAGE_NUMBER].Present then begin
console.writestringln('!');
end else begin
console.writestringln('?');
end;
while true do begin end;
asm asm
MOV dds, CS MOV dds, CS

View File

@ -6,20 +6,32 @@ type
PPageTableEntry = ^TPageTableEntry; PPageTableEntry = ^TPageTableEntry;
TPageTableEntry = bitpacked record TPageTableEntry = bitpacked record
Present, Writable, UserMode, WriteThrough, Present,
NotCacheable, Accessed, Dirty, AttrIndex, Writable,
UserMode,
WriteThrough,
NotCacheable,
Accessed,
Dirty,
AttrIndex,
GlobalPage: Boolean; GlobalPage: Boolean;
Avail: UBit3; Available: UBit3;
FrameAddr: UBit20; FrameAddress: UBit20;
end; end;
PPageDirEntry = ^TPageDirEntry; PPageDirEntry = ^TPageDirEntry;
TPageDirEntry = bitpacked record TPageDirEntry = bitpacked record
Present, Writable, UserMode, WriteThrough, Present,
NotCacheable, Accessed, Reserved, PageSize, Writable,
UserMode,
WriteThrough,
NotCacheable,
Accessed,
Reserved,
PageSize,
GlobalPage: Boolean; GlobalPage: Boolean;
Avail: UBit3; Available: UBit3;
TableAddr: UBit20; TableAddress: UBit20;
end; end;
TPageDirectory = Array[1..1024] of TPageDirEntry; TPageDirectory = Array[1..1024] of TPageDirEntry;

View File

@ -32,7 +32,8 @@ function inl(port : uint16) : uint32;
procedure memset(location : uint32; value : uint8; size : uint32); procedure memset(location : uint32; value : uint8; size : uint32);
procedure psleep(t : uint16); procedure psleep(t : uint16);
procedure endptr(); external '__end' name '__end'; var
endptr : uint32; external name '__end';
implementation implementation
@ -174,7 +175,7 @@ var
i : uint32; i : uint32;
begin begin
for i:=0 to size do begin for i:=0 to size-1 do begin
loc:= puint8(location + i); loc:= puint8(location + i);
loc^:= value; loc^:= value;
end; end;