mboot: move setting regs.eax to mboot_run()
authorH. Peter Anvin <hpa@zytor.com>
Sat, 2 May 2009 20:52:04 +0000 (13:52 -0700)
committerH. Peter Anvin <hpa@zytor.com>
Sat, 2 May 2009 20:52:04 +0000 (13:52 -0700)
The setting of regs.eax in map_image() doesn't really make any sense;
move it to mboot_run() instead.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
com32/mboot/map.c

index b65c016..4c5eca2 100644 (file)
@@ -111,8 +111,6 @@ int map_image(void *ptr, size_t len)
   unsigned int i;
   uint32_t bad_flags;
 
-  regs.eax = MULTIBOOT_VALID;
-
   /*
    * Search for the multiboot header...
    */
@@ -325,5 +323,6 @@ void mboot_run(int bootflags)
   
   dprintf("Running, eip = 0x%08x, ebx = 0x%08x\n", regs.eip, regs.ebx);
 
+  regs.eax = MULTIBOOT_VALID;
   syslinux_shuffle_boot_pm(ml, mmap, bootflags, &regs);
 }