Page 1 of 3
False advertising?
Posted: Mon Mar 10, 2008 2:41 am
by elderK
Hey folks,
Been out on a long, long walk...
And, I came across an odd thought...
That odd thought simply being whether or not 32bit machines can actually use all 4GiB of RAM (should the full 4GiB be installed).
How can the machines access it all? When some hardware is directly patched into the address space, way up in high memory? (high high higgggh memory).
If they are directly patched into the address space, at the physical level - how can we distinguish between pages of memory (that we can yknow, bjork) and pages of the hardware space?
The simple answer is of course, "We cant.".
The other obvious answer is "You can tell the hardware to not map itself there" (Kinda like the VGA Controller - you can kill its mapping in conventional memory or am I mistaken?)
Does anyone have any insights into this?
I find it interesting and, Id love to know the answer.
~Z
Posted: Mon Mar 10, 2008 2:44 am
by JamesM
PAE/PSE means that a 32 bit system *can* access all 4GiB of RAM. It's just that Windows XP doesn't.
Posted: Mon Mar 10, 2008 4:04 am
by elderK
That doesnt answer my question ...
Various hardware components are directly mapped into the address space, at certain locations - No?
PAE/PSE does not change this...
~Z
Posted: Mon Mar 10, 2008 4:10 am
by pcmattman
PAE gives you a 36-bit address space, meaning that 4 GB of installed RAM is possible because you've got 4 extra bits worth of address space.
Posted: Mon Mar 10, 2008 4:16 am
by JamesM
... Hence you can access 4 GB, hence it's not false advertising, which is your original question, correct?
Plus, many laptops have graphics cards which use some system RAM instead of onboard. So that memory isn't wasted per se.
Re: False advertising?
Posted: Mon Mar 10, 2008 5:27 am
by jal
zeii wrote:If they are directly patched into the address space, at the physical level - how can we distinguish between pages of memory (that we can yknow, bjork) and pages of the hardware space?
The simple answer is of course, "We cant.".
That's not the simple answer, that's the dumb answer. There are various ways to check for memory regions being used for memory mapped I/O or not, and the devices themselves (via e.g. PCI enumeration) also give information about the memory they use.
JAL
Posted: Mon Mar 10, 2008 5:30 am
by jal
JamesM wrote:PAE/PSE means that a 32 bit system *can* access all 4GiB of RAM. It's just that Windows XP doesn't.
But a device allocates a certain
physical address range, right? And as soon as that address is put on the memory bus, the device 'takes over' so to speak. So yes, one can map a device above the 4GB memory limit, but it'd still occupy the same (physical) location as some RAM. Wouldn't it be necessary to reprogram the MMU to actually move the RAM to a different physical location?
JAL
Posted: Mon Mar 10, 2008 6:13 am
by bewing
Yes, all PC motherboards have various RAM address limitations. The CPUs themselves are perfectly capable of accessing 4GB or more, as advertised. If you dig into the tech specs of particular specific machines, they may tell you in the fine print what the true max addressible RAM is for the particular motherboard. And, of course, every time you add a board into your machine, it may use up some RAM address space, but that's your fault for adding in the board.
Posted: Mon Mar 10, 2008 6:14 am
by JamesM
jal wrote:JamesM wrote:PAE/PSE means that a 32 bit system *can* access all 4GiB of RAM. It's just that Windows XP doesn't.
But a device allocates a certain
physical address range, right? And as soon as that address is put on the memory bus, the device 'takes over' so to speak. So yes, one can map a device above the 4GB memory limit, but it'd still occupy the same (physical) location as some RAM. Wouldn't it be necessary to reprogram the MMU to actually move the RAM to a different physical location?
JAL
Oh yeah, d'oh!
Mental note: Have coffee *before* posting!
Posted: Mon Mar 10, 2008 6:28 am
by zaleschiemilgabriel
I think we all understood what this question was about.
It's about using physical memory at addresses that the CPU maps to other devices.
Simple example: the 0xB8000 address is mapped to video memory for text modes. But there's also physical memory at that address that you can't use unless you remap the video memory to somewhere else, but then the new address you mapped to becomes unusable. That's what he meant by "false advertising": you'll never be able to use all of the physical memory installed on a computer...
EDIT: Can PAE/PSE be used to map all of the installed physical (say 4 GiB) memory PLUS the device memory? In my example this would mean that you could remap the video memory to an address that's not used by physical memory. Is that possible? If so, then the "false advertising" still applies to CPUs that don't support PAE/PSE.
Posted: Mon Mar 10, 2008 7:00 am
by elderK
At last, people finally click to the question.
Sorry if I worded it in a way that was not clear.
As far as I know, You can disable VGA's 'slice' into memory (what is it? $A0000 - $C7FFF?), effectively making that hole usable. Problem is, If you *did* disable the video mapping (ie: you dont care for video at all...), would physical memory actually take over?
Itd be freaking awesome if we could simply *change* all the regions that the memory mapped hardware used, however, I dont think thats really possible since stuff being directly patched into the physical address space is... really a hardwired thing, No?
~Z
Posted: Mon Mar 10, 2008 7:19 am
by Brynet-Inc
When a device is mapped into physical address space, it doesn't render a portion of RAM unusable (
Unless you have ~4GB and aren't using PAE/PSE36).
It makes sense that chipsets are intelligent enough to map installed RAM into available areas.
BIOS int 0x15, AX = 0xe820 should help locate those areas.

Posted: Mon Mar 10, 2008 9:37 am
by jal
Brynet-Inc wrote:It makes sense that chipsets are intelligent enough to map installed RAM into available areas.
Sure, but if a memory mapping device occupies just a few bytes, the RAM at these locations is not going to be remapped by any chipset. I can imagine some mapping for large areas like video memory, but that's it.
JAL
Posted: Mon Mar 10, 2008 9:59 am
by Brynet-Inc
jal wrote:Brynet-Inc wrote:It makes sense that chipsets are intelligent enough to map installed RAM into available areas.
Sure, but if a memory mapping device occupies just a few bytes, the RAM at these locations is not going to be remapped by any chipset. I can imagine some mapping for large areas like video memory, but that's it.
JAL
I think you're confused... I've always assumed chipsets map devices into physical address space "before" RAM.
So.. What RAM is lost?

Posted: Mon Mar 10, 2008 4:59 pm
by iammisc
In a normal PC, some RAM is definitely unaddressable.
However, to say that Intel or AMD are falsely advertising is just false. The processor can use all that address space if the chipset allowed it.