direct-io.hg

changeset 5739:622ea2078f85

This is the patch for xen which allows using up to 16 GB
of memory.

Signed-off-by: Gerd Knorr <kraxel@suse.de>
author kaf24@firebug.cl.cam.ac.uk
date Mon Jul 11 16:02:28 2005 +0000 (2005-07-11)
parents f1a16642edaf
children 09cc6606517d
files xen/arch/x86/e820.c
line diff
     1.1 --- a/xen/arch/x86/e820.c	Mon Jul 11 16:00:46 2005 +0000
     1.2 +++ b/xen/arch/x86/e820.c	Mon Jul 11 16:02:28 2005 +0000
     1.3 @@ -320,24 +320,27 @@ static unsigned long __init find_max_pfn
     1.4  #ifdef __i386__
     1.5  static void __init clip_4gb(void)
     1.6  {
     1.7 +    unsigned long long limit = (1ULL << 30) * MACHPHYS_MBYTES;
     1.8      int i;
     1.9  
    1.10 -    /* 32-bit systems restricted to a 4GB physical memory map. */
    1.11 +    /* 32-bit systems restricted to a 4GB physical memory map,
    1.12 +     * with PAE to 16 GB (with current memory layout) */
    1.13      for ( i = 0; i < e820.nr_map; i++ )
    1.14      {
    1.15 -        if ( (e820.map[i].addr + e820.map[i].size) <= 0x100000000ULL )
    1.16 +        if ( (e820.map[i].addr + e820.map[i].size) <= limit )
    1.17              continue;
    1.18 -        printk("WARNING: Only the first 4GB of the physical memory map "
    1.19 +        printk("WARNING: Only the first %d GB of the physical memory map "
    1.20                 "can be accessed\n"
    1.21                 "         by Xen in 32-bit mode. "
    1.22 -               "Truncating the memory map...\n");
    1.23 -        if ( e820.map[i].addr >= 0x100000000ULL )
    1.24 +               "Truncating the memory map...\n",
    1.25 +	       MACHPHYS_MBYTES);
    1.26 +        if ( e820.map[i].addr >= limit )
    1.27          {
    1.28              e820.nr_map = i;
    1.29          }
    1.30          else
    1.31          {
    1.32 -            e820.map[i].size = 0x100000000ULL - e820.map[i].addr;
    1.33 +            e820.map[i].size = limit - e820.map[i].addr;
    1.34              e820.nr_map = i + 1;                
    1.35          }            
    1.36      }