Message board for the users of flat assembler.
> OS Construction > Some doubts about paging in long mode...
Hi people!, I need some help with virtual memory management, hope someone can help me, here is my problem:
I´ve set up the PML4 for a kernel running in long mode at...let´s say... 0x102000 (physical), the initial PDPT at 0x103000, the initial PDT at 0x104000, and the initial page table at 0x105000, all this is only for the kernel initialization.
I´ve set up the first entry in the PML4 as: (PDPT_address | 7).
I´ve set up the first entry in the PDPT as: (PDT_address | 7).
I´ve set up the first entry in the PDT as: (PT_address | 7).
And finally, I´ve filled the entire page table to map the first 2MB 1:1 (virtual address = physical address), I mean:
First page table entry: 0x0000000000000007
Second page table entry: 0x0000000000001007
Third page table entry: 0x0000000000002007 …and so on.
Now, I want to map for example physical address 0x10000000 to virtual address 0xC0000000.
How do I modify the tables so I can access physical memory at 0x10000000 through virtual address 0xC0000000?
There are a lot of examples on the net but they are not clear enough for me and all of them are for 32-bit processor (less page translation table levels).
I just need only one example, then I´ll be able to apply this to some other situation.
Thanks in advance and sorry for my bad English.
|30 Mar 2007, 14:41||
< Last Thread | Next Thread >
Copyright © 1999-2020, Tomasz Grysztar. Also on GitHub, YouTube, Twitter.
Website powered by rwasa.