aboutsummaryrefslogtreecommitdiffstats
path: root/xen/arch/x86/e820.c
diff options
context:
space:
mode:
authorkaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk>2005-07-11 16:02:28 +0000
committerkaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk>2005-07-11 16:02:28 +0000
commit5675f9d03d5b4f9928ec9ab0047cab6084f9a42c (patch)
tree52d04620e86a68bb29d47a5df7072bd758877dc0 /xen/arch/x86/e820.c
parent0ea8f12a67e038a3c8a9275080dcd3325c82f8e8 (diff)
downloadxen-5675f9d03d5b4f9928ec9ab0047cab6084f9a42c.tar.gz
xen-5675f9d03d5b4f9928ec9ab0047cab6084f9a42c.tar.bz2
xen-5675f9d03d5b4f9928ec9ab0047cab6084f9a42c.zip
This is the patch for xen which allows using up to 16 GB
of memory. Signed-off-by: Gerd Knorr <kraxel@suse.de>
Diffstat (limited to 'xen/arch/x86/e820.c')
-rw-r--r--xen/arch/x86/e820.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/xen/arch/x86/e820.c b/xen/arch/x86/e820.c
index aa41ac78da..ad2bfd95e5 100644
--- a/xen/arch/x86/e820.c
+++ b/xen/arch/x86/e820.c
@@ -320,24 +320,27 @@ static unsigned long __init find_max_pfn(void)
#ifdef __i386__
static void __init clip_4gb(void)
{
+ unsigned long long limit = (1ULL << 30) * MACHPHYS_MBYTES;
int i;
- /* 32-bit systems restricted to a 4GB physical memory map. */
+ /* 32-bit systems restricted to a 4GB physical memory map,
+ * with PAE to 16 GB (with current memory layout) */
for ( i = 0; i < e820.nr_map; i++ )
{
- if ( (e820.map[i].addr + e820.map[i].size) <= 0x100000000ULL )
+ if ( (e820.map[i].addr + e820.map[i].size) <= limit )
continue;
- printk("WARNING: Only the first 4GB of the physical memory map "
+ printk("WARNING: Only the first %d GB of the physical memory map "
"can be accessed\n"
" by Xen in 32-bit mode. "
- "Truncating the memory map...\n");
- if ( e820.map[i].addr >= 0x100000000ULL )
+ "Truncating the memory map...\n",
+ MACHPHYS_MBYTES);
+ if ( e820.map[i].addr >= limit )
{
e820.nr_map = i;
}
else
{
- e820.map[i].size = 0x100000000ULL - e820.map[i].addr;
+ e820.map[i].size = limit - e820.map[i].addr;
e820.nr_map = i + 1;
}
}