[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [Xen-devel] RE: [Xen-users] Why my system only use 3.3G memory ?

On Fri, 8 Jul 2005, Petersson, Mats wrote:

> The other part of the problem is that the BIOS maps PCI devices into the
> first 4GB of memory. Depending on how clever (or not) the BIOS is, it
> may eat more memory than it MUST. But there are several factors to take
> into account here. For example, some devices that require large address
> spaces will often also require that the device is evenly aligned to it's
> mapped size, so something that has a 64MB address space, should also be
> aligned to 64MB. 

This is actually a PCI requirement. The address has to be aligned on its 
granularity. Really silly. 

>This means that there may well be a hole of almost 64MB
> after this map. Some devices, such as graphics cards, can easily use up
> 256 or 512MB this way. [Of course, if the BIOS is clever, it would use
> the remaining part for some other mappings, but it's not always that the
> BIOS is clever enough to do this].

BIOSes are generally dumb as dirt on this score. LinuxBIOS is pretty smart 
about it, however. 

> Obviously, even with PAE, you will not be able to use ALL of the 4GB,
> because some of it will be mapped to the PCI hardware devices. But any
> "hole" between devices in the PCI map can be mapped in as RAM, so the
> kernel could possibly use up the gaps in the space with memory from
> above 4GB, rather than just "loosing" it.

it's more complex than that. Some chipsets allow remapping the ram that is 
"lost" to pci mappings up above 4 GB. There's no end of weird tricks in 
this space. 


Xen-devel mailing list



Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.