I am a new reader on ReactOS. I am learning 0.3.6. I found some questions on paging for i386.
In freeldr.sys, function FrLdrStartup will set up the PDE and PTE for ntoskrnl.exe. The PDE for
0xc0000000 is point to startup_pagedirectory. But an entry of PDE should point to a PTE, not a PDE
itself, is it a bug? Or we should set this PDE entry to 4M pages?
Another problem is for paging of APIC. This function set PDE for 0xffc00000 to apic_pagetable, but
the base physical address for local APIC should be 0xfee00000, how it works?
Question on paging
Moderator: Moderator Team
Re: Question on paging
Hi remington,nice to see coding questions.. 
Well,as u can see we have launched 0.3.7 version and we are in half way to 0.3.8. So 0.3.6 is old.
More than 3000 commits has been done since 0.3.6...
Give a look to the new code...maybe u will find the question there.
Also join us in reactos channel. All the Devs are there waiting ur code doubts.
To join us, just install Chatzilla Firefox addon and click here: [url=irc://irc.freenode.net/reactos]#reactos[/url]
Or use Mirc (or Mibbit) with: irc.freenode.net channel: #reactos

Well,as u can see we have launched 0.3.7 version and we are in half way to 0.3.8. So 0.3.6 is old.
More than 3000 commits has been done since 0.3.6...

Give a look to the new code...maybe u will find the question there.
Also join us in reactos channel. All the Devs are there waiting ur code doubts.
To join us, just install Chatzilla Firefox addon and click here: [url=irc://irc.freenode.net/reactos]#reactos[/url]
Or use Mirc (or Mibbit) with: irc.freenode.net channel: #reactos
Re: Question on paging
I can answer your question at least about startup_pagedirectory. Since the PDE and PTE format is similar, you can use that to map a page table at the same address in phyiscal and logical spaces. We use startup_pagedirectory to be able to modify the page table in place in early kernel startup.
Re: Question on paging
Though the structure of PDE and PTE are similar, but the meaning is different. I had check an address according to the PDE and PTE as follow:
When I want to use linear addres 0xc0000000, accoding to PDE, we get the physical address of startup_pagedirectory(PDE), and the remain part of
linear address are all 0s. Then CPU will regard the PDE as PTE, and find the first entry of PDE as PTE entry, that should point to lowmem_pagetable.
Therefore when I use linear address 0xc000000, I accutually get the first byte in lomem_pagetable, not PDE. Is this the goal of design?
When I want to use linear addres 0xc0000000, accoding to PDE, we get the physical address of startup_pagedirectory(PDE), and the remain part of
linear address are all 0s. Then CPU will regard the PDE as PTE, and find the first entry of PDE as PTE entry, that should point to lowmem_pagetable.
Therefore when I use linear address 0xc000000, I accutually get the first byte in lomem_pagetable, not PDE. Is this the goal of design?
Re: Question on paging
Yes that's it.
Who is online
Users browsing this forum: No registered users and 1 guest