multiboot asm: Get offset constants from the C struct
authorKeir Fraser <keir.fraser@citrix.com>
Fri, 7 May 2010 09:00:43 +0000 (10:00 +0100)
committerKeir Fraser <keir.fraser@citrix.com>
Fri, 7 May 2010 09:00:43 +0000 (10:00 +0100)
Signed-off-by: Xiao Guangrong <xiaoguangrong@cn.fujitsu.com>
xen/arch/x86/boot/cmdline.S
xen/arch/x86/x86_32/asm-offsets.c
xen/arch/x86/x86_64/asm-offsets.c

index 8d0c42afb25f6b6f5c5c16315c908faba8ff32b3..d993bde1f724443c4ec74ed8e71168d9589eeb2b 100644 (file)
 3:      pop     %ebx
         ret
 
-/* multiboot_info structure offsets. */
-#define MB_flags   0
-#define MB_cmdline 16
-
 cmdline_parse_early:
         pusha
 
index 3a774f9e602131fa2d0cf4444894caf01205dd4b..a3d3680d0032ce0ea050c51e7454034564617fc7 100644 (file)
@@ -9,6 +9,7 @@
 #include <xen/sched.h>
 #include <asm/fixmap.h>
 #include <asm/hardirq.h>
+#include <xen/multiboot.h>
 
 #define DEFINE(_sym, _val) \
     __asm__ __volatile__ ( "\n->" #_sym " %0 " #_val : : "i" (_val) )
@@ -127,4 +128,8 @@ void __dummy__(void)
     BLANK();
 
     OFFSET(CPUINFO_ext_features, struct cpuinfo_x86, x86_capability[1]);
+    BLANK();
+
+    OFFSET(MB_flags, multiboot_info_t, flags);
+    OFFSET(MB_cmdline, multiboot_info_t, cmdline);
 }
index 51e02cc002b69d90e047cfe85e17f56b01a1d506..7fe1934b61b63d83d8219a776c0c7c46fde97956 100644 (file)
@@ -10,6 +10,7 @@
 #include <compat/xen.h>
 #include <asm/fixmap.h>
 #include <asm/hardirq.h>
+#include <xen/multiboot.h>
 
 #define DEFINE(_sym, _val) \
     __asm__ __volatile__ ( "\n->" #_sym " %0 " #_val : : "i" (_val) )
@@ -151,4 +152,8 @@ void __dummy__(void)
     BLANK();
 
     OFFSET(CPUINFO_ext_features, struct cpuinfo_x86, x86_capability[1]);
+    BLANK();
+
+    OFFSET(MB_flags, multiboot_info_t, flags);
+    OFFSET(MB_cmdline, multiboot_info_t, cmdline);
 }