Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
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".
Do you actually have RAM at that physical address? (As you are running under Bochs, that means have you allocated that much RAM to the virtual machine.)
Your virtual machine would need over 3GB of RAM for this approach to work. You should probably just allocate 4MB of memory, and assign that virtual address to that physical memory location.
Project: OZone
Source: GitHub
Current Task: LIB/OBJ file support
"The more they overthink the plumbing, the easier it is to stop up the drain." - Montgomery Scott
Actually even with 4GB of RAM it can happen that there is no RAM at 0xC0000000. For example, my notebook has 4GB of RAM, with 3GB in the physical address range 0x00000000-0xBFFFFFFF and 1GB in the range 0x100000000-0x1FFFFFFFF. In the hole between these two is stuff such as graphics card MMIO and such. Usually a memory map, from BIOS or multiboot, should tell you this.