ia64/xen-unstable

changeset 18398:6c50c7d089d9

hvmloader: Fix e820_malloc() after bug I introduced in c/s 18383
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
author Keir Fraser <keir.fraser@citrix.com>
date Wed Aug 27 15:16:13 2008 +0100 (2008-08-27)
parents ab8212bd5604
children b4bde79b7ba0
files tools/firmware/hvmloader/util.c
line diff
     1.1 --- a/tools/firmware/hvmloader/util.c	Wed Aug 27 15:02:38 2008 +0100
     1.2 +++ b/tools/firmware/hvmloader/util.c	Wed Aug 27 15:16:13 2008 +0100
     1.3 @@ -337,7 +337,7 @@ uint32_t e820_malloc(uint32_t size, uint
     1.4  
     1.5      for ( i = *HVM_E820_NR - 1; i >= 0; i-- )
     1.6      {
     1.7 -        addr = (ent[i].size - size) & ~(align-1);
     1.8 +        addr = (ent[i].addr + ent[i].size - size) & ~(align-1);
     1.9          if ( (ent[i].type != E820_RAM) || /* not ram? */
    1.10               (addr < ent[i].addr) ||      /* too small or starts above 4gb? */
    1.11               ((addr + size) < addr) )     /* ends above 4gb? */