Simple x86 Paging Issue
Posted: Wed Apr 06, 2016 1:21 am
Hey guys,
I'm a new to OS dev and am running into a bit of a problem implementing paging. I've got a higher half kernel working, which maps 0xC0000000 to physical address 0x00 with 4MiB pages. I've now attempted to set 4MiB page 0xC0400000 to map to physical address 0xC0400000 (identity paging), but this fails and the memory is silently not accessible.
I have the bits "present, read_write, page_size" on and address is set to "0xC04".
Here's what I'm getting from Bochs:
Is there something else I need to do in order to allow the physical address 0xC0400000 to be writable?
Thanks!
I'm a new to OS dev and am running into a bit of a problem implementing paging. I've got a higher half kernel working, which maps 0xC0000000 to physical address 0x00 with 4MiB pages. I've now attempted to set 4MiB page 0xC0400000 to map to physical address 0xC0400000 (identity paging), but this fails and the memory is silently not accessible.
I have the bits "present, read_write, page_size" on and address is set to "0xC04".
Here's what I'm getting from Bochs:
Code: Select all
<bochs:5> info tab
cr3: 0x0000000000101000
0xc0000000-0xc03fffff -> 0x0000000000000000-0x00000000003fffff
0xc0400000-0xc07fffff -> 0x00000000c0400000-0x00000000c07fffff
00114316950i[XGUI ] Mouse capture off
<bochs:6> x 0xC0400000
[bochs]:
0x00000000c0400000 <bogus+ 0>:bx_dbg_read_linear: physical memory read error (phy=0x00000000c0400000, lin=0x00000000c0400000)
00114316950i[XGUI ] Mouse capture off
Thanks!