Physical to virtual memory
Physical to virtual memory
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
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
How to read the physical address of Page Directory in a PE file?
- thepowersgang
- Member
- Posts: 734
- Joined: Tue Dec 25, 2007 6:03 am
- Libera.chat IRC: thePowersGang
- Location: Perth, Western Australia
- Contact:
Re: Physical to virtual memory
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.
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.
Kernel Development, It's the brain surgery of programming.
Acess2 OS (c) | Tifflin OS (rust) | mrustc - Rust compiler
Currently Working on: mrustc
Acess2 OS (c) | Tifflin OS (rust) | mrustc - Rust compiler
Currently Working on: mrustc
Re: Physical to virtual memory
This should be in OS Development, not General Programming.
Currently developing Lithium OS (LiOS).
Recursive paging saves lives.
"I want to change the world, but they won't give me the source code."
Recursive paging saves lives.
"I want to change the world, but they won't give me the source code."
- Combuster
- Member
- Posts: 9301
- Joined: Wed Oct 18, 2006 3:45 am
- Libera.chat IRC: [com]buster
- Location: On the balcony, where I can actually keep 1½m distance
- Contact:
Re: Physical to virtual memory
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
What is teh virtual address of page directory in CR3?