[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH for-xen-4.5 v4 04/18] x86/boot: use constant in head.S instead of hardcoded value



..to access multiboot.mem_lower data.

Signed-off-by: Daniel Kiper <daniel.kiper@xxxxxxxxxx>
---
 xen/arch/x86/boot/head.S          |    2 +-
 xen/arch/x86/x86_64/asm-offsets.c |    3 +++
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/xen/arch/x86/boot/head.S b/xen/arch/x86/boot/head.S
index cd43952..0bdbc65 100644
--- a/xen/arch/x86/boot/head.S
+++ b/xen/arch/x86/boot/head.S
@@ -101,7 +101,7 @@ __start:
          */
         testb   $MBI_MEMLIMITS,(%ebx)
         jz      2f                  /* not available? BDA value will be fine */
-        mov     4(%ebx),%edx
+        mov     MBI_mem_lower(%ebx),%edx
         cmp     $0x100,%edx         /* is the multiboot value too small? */
         jb      2f                  /* if so, do not use it */
         shl     $10-4,%edx
diff --git a/xen/arch/x86/x86_64/asm-offsets.c 
b/xen/arch/x86/x86_64/asm-offsets.c
index 3994f4d..2de9cad 100644
--- a/xen/arch/x86/x86_64/asm-offsets.c
+++ b/xen/arch/x86/x86_64/asm-offsets.c
@@ -163,6 +163,9 @@ void __dummy__(void)
     OFFSET(CPUINFO_features, struct cpuinfo_x86, x86_capability);
     BLANK();
 
+    OFFSET(MBI_mem_lower, multiboot_info_t, mem_lower);
+    BLANK();
+
     OFFSET(MB_flags, multiboot_info_t, flags);
     OFFSET(MB_cmdline, multiboot_info_t, cmdline);
 }
-- 
1.7.10.4


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.