I recieve the memory map from my bootloader.I have purposely installed a RAM in slot 0 and slot 2.I want to remap the memory (RAM) so that I can use the Solt 2 RAM as Slot 1 and remove the holes between Slot 0 and 2.
Is there any way for this?
How can I remap the physical memory
-
- Member
- Posts: 63
- Joined: Sat Apr 28, 2012 9:41 am
- Location: Earth -> Asia
How can I remap the physical memory
Anyone has a idea of making a ntfs bootsector?if yes PM me , plz.
- NickJohnson
- Member
- Posts: 1249
- Joined: Tue Mar 24, 2009 8:11 pm
- Location: Sunnyvale, California
Re: How can I remap the physical memory
First off, you should be able to handle situations when the free memory is not contiguous. Second, I'm pretty sure that on all reasonable systems, the memory controller will make any sticks of RAM you put in contiguous in the physical address space, regardless of their physical position (assuming the memory controller is okay with you not pairing sticks in the first place.)
Re: How can I remap the physical memory
Chipset (memory controller, to be precise) maps physical memory to physical addresses. So, you need documentation for all chipsets you want to support. In most cases it's not public.
In recent CPUs memory controller is integrated into CPU so it's easier to obtain its documentation, although this manuals are always huge and rather difficult to understand. So, think twice before deciding to use physical memory remapping.
Really, why do you need it? If you use protected/long mode, the code will use virtual addresses and it's rather easy to map non-contiguos physical memory into contiguos virtual memory region.
In recent CPUs memory controller is integrated into CPU so it's easier to obtain its documentation, although this manuals are always huge and rather difficult to understand. So, think twice before deciding to use physical memory remapping.
Really, why do you need it? If you use protected/long mode, the code will use virtual addresses and it's rather easy to map non-contiguos physical memory into contiguos virtual memory region.
-
- Member
- Posts: 63
- Joined: Sat Apr 28, 2012 9:41 am
- Location: Earth -> Asia
Re: How can I remap the physical memory
When I probed memory, I get holes after the last byte of the RAM at solt 0, I thought that hole is becaz of the RAM Positions.
What are those holes?Am I wrong that it is because of the RAM position?
What are those holes?Am I wrong that it is because of the RAM position?
Anyone has a idea of making a ntfs bootsector?if yes PM me , plz.
Re: How can I remap the physical memory
Hi,
The hole you're trying to get rid of has nothing to do with what RAM is in which slot. You could fill every RAM slot with as much RAM as possible and the hole would still be there.
There's also no easy way to tell how the motherboard maps actual RAM chips into the physical address space. For all you know it could be interleaved, so that the 64 bytes of RAM at 0x00000000 is "slot 0", the next 64 bytes of RAM at 0x00000040 is "slot 2", the next 64 bytes is "slot 0" again, etc.
Cheers,
Brendan
My guess is that the hole you're talking about is the one below 0x100000000 that exists for things like PCI devices, APICs and firmware ROM.LindusSystem wrote:I recieve the memory map from my bootloader.I have purposely installed a RAM in slot 0 and slot 2.I want to remap the memory (RAM) so that I can use the Solt 2 RAM as Slot 1 and remove the holes between Slot 0 and 2.
Is there any way for this?
The hole you're trying to get rid of has nothing to do with what RAM is in which slot. You could fill every RAM slot with as much RAM as possible and the hole would still be there.
There's also no easy way to tell how the motherboard maps actual RAM chips into the physical address space. For all you know it could be interleaved, so that the 64 bytes of RAM at 0x00000000 is "slot 0", the next 64 bytes of RAM at 0x00000040 is "slot 2", the next 64 bytes is "slot 0" again, etc.
Why would you probe to begin with? What does the real memory map (as reported by the firmware via. "int 0x15, eax=0xE820") look like? Where is this hole?LindusSystem wrote:When I probed memory, I get holes after the last byte of the RAM at solt 0, I thought that hole is becaz of the RAM Positions.
What are those holes?Am I wrong that it is because of the RAM position?
Yes.LindusSystem wrote:Am I wrong that it is because of the RAM position?
Cheers,
Brendan
For all things; perfection is, and will always remain, impossible to achieve in practice. However; by striving for perfection we create things that are as perfect as practically possible. Let the pursuit of perfection be our guide.
-
- Member
- Posts: 63
- Joined: Sat Apr 28, 2012 9:41 am
- Location: Earth -> Asia
Re: How can I remap the physical memory
Thanks all, I have corrected my mis-undrestanding of the physical memory.Sorry for this post!
Anyone has a idea of making a ntfs bootsector?if yes PM me , plz.