aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk>2005-08-12 09:14:02 +0000
committerkaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk>2005-08-12 09:14:02 +0000
commit31f1ce4923d87282875dc0df2d8d2c649fa87911 (patch)
treeab63276d1ee5f178d50fdb274a5c3cae3c3ac919
parente80785557b2f538631f6e43beba6a00f8eabae37 (diff)
downloadxen-31f1ce4923d87282875dc0df2d8d2c649fa87911.tar.gz
xen-31f1ce4923d87282875dc0df2d8d2c649fa87911.tar.bz2
xen-31f1ce4923d87282875dc0df2d8d2c649fa87911.zip
Rearrange code in __start_xen() to work around internal
compiler error in x86/64 gcc. Signed-off-by: Keir Fraser <keir@xensource.com>
-rw-r--r--xen/arch/x86/setup.c25
1 files changed, 12 insertions, 13 deletions
diff --git a/xen/arch/x86/setup.c b/xen/arch/x86/setup.c
index fcf7f522b8..070a9127b2 100644
--- a/xen/arch/x86/setup.c
+++ b/xen/arch/x86/setup.c
@@ -336,26 +336,25 @@ void __init __start_xen(multiboot_info_t *mbi)
/* Find a large enough RAM extent to stash the DOM0 modules. */
for ( i = 0; ; i++ )
{
- if ( (e820.map[i].type == E820_RAM) &&
- (e820.map[i].size >= modules_length) &&
- ((e820.map[i].addr + e820.map[i].size) >=
- (xenheap_phys_end + modules_length)) )
- {
- /* Stash as near as possible to the beginning of the RAM extent. */
- initial_images_start = e820.map[i].addr;
- if ( initial_images_start < xenheap_phys_end )
- initial_images_start = xenheap_phys_end;
- initial_images_end = initial_images_start + modules_length;
- break;
- }
-
if ( i == e820.nr_map )
{
printk("Not enough memory to stash the DOM0 kernel image.\n");
for ( ; ; ) ;
}
+
+ if ( (e820.map[i].type == E820_RAM) &&
+ (e820.map[i].size >= modules_length) &&
+ ((e820.map[i].addr + e820.map[i].size) >=
+ (xenheap_phys_end + modules_length)) )
+ break;
}
+ /* Stash as near as possible to the beginning of the RAM extent. */
+ initial_images_start = e820.map[i].addr;
+ if ( initial_images_start < xenheap_phys_end )
+ initial_images_start = xenheap_phys_end;
+ initial_images_end = initial_images_start + modules_length;
+
#if defined(CONFIG_X86_32)
memmove((void *)initial_images_start, /* use low mapping */
(void *)mod[0].mod_start, /* use low mapping */