Page 1 of 1
Physical to virtual memory
Posted: Sun Dec 01, 2013 6:31 am
by Hercules
How to convert physical memory into virtual memory using CR3 if my program is a PE file and that's why can't read physical address of page directory at CR3 register?
Re: Physical to virtual memory
Posted: Sun Dec 01, 2013 6:57 am
by iansjack
You access physical memory by mapping a logical address to a physical page and then accessing the memory through that address. You are pretty free to choose whatever address you like to represent the physical page.
Re: Physical to virtual memory
Posted: Wed Dec 11, 2013 7:31 am
by Hercules
How to read the physical address of Page Directory in a PE file?
Re: Physical to virtual memory
Posted: Wed Dec 11, 2013 11:14 pm
by thepowersgang
You seem to have missed some concepts.
The physical address of a process's PD (i.e. the value that gets written to CR3) is decided by the OS's low level memory manager (usually, it just grabs the first free page and uses that). It is not stored in the executable file, nor should the executing process care about it (in fact, processes rarely need to care that the addresses they're using are not actually physical addresses) as it is a kernel-level detail.
Re: Physical to virtual memory
Posted: Sun Dec 15, 2013 3:18 pm
by BMW
This should be in OS Development, not General Programming.
Re: Physical to virtual memory
Posted: Mon Dec 16, 2013 2:57 am
by Combuster
And that should go under report post. Although I think autodelete or the moderator archives is a much better place with this OP considering his consistent bad questions and complete lack of followup, as if he does not want to be helped.
Re: Physical to virtual memory
Posted: Sat Dec 28, 2013 9:17 am
by Hercules
What is teh virtual address of page directory in CR3?