aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKeir Fraser <keir.fraser@citrix.com>2010-05-07 10:00:43 +0100
committerKeir Fraser <keir.fraser@citrix.com>2010-05-07 10:00:43 +0100
commit97be3bd3fecca566cdb69db024434aef8cfbedbc (patch)
treef1b395018df401bcfdc4e61a0e8dffd8dc524a8d
parente926e7d1a94d3d3bb61af5793b2d0654a908f21a (diff)
downloadxen-97be3bd3fecca566cdb69db024434aef8cfbedbc.tar.gz
xen-97be3bd3fecca566cdb69db024434aef8cfbedbc.tar.bz2
xen-97be3bd3fecca566cdb69db024434aef8cfbedbc.zip
multiboot asm: Get offset constants from the C struct
Signed-off-by: Xiao Guangrong <xiaoguangrong@cn.fujitsu.com>
-rw-r--r--xen/arch/x86/boot/cmdline.S4
-rw-r--r--xen/arch/x86/x86_32/asm-offsets.c5
-rw-r--r--xen/arch/x86/x86_64/asm-offsets.c5
3 files changed, 10 insertions, 4 deletions
diff --git a/xen/arch/x86/boot/cmdline.S b/xen/arch/x86/boot/cmdline.S
index 8d0c42afb2..d993bde1f7 100644
--- a/xen/arch/x86/boot/cmdline.S
+++ b/xen/arch/x86/boot/cmdline.S
@@ -147,10 +147,6 @@
3: pop %ebx
ret
-/* multiboot_info structure offsets. */
-#define MB_flags 0
-#define MB_cmdline 16
-
cmdline_parse_early:
pusha
diff --git a/xen/arch/x86/x86_32/asm-offsets.c b/xen/arch/x86/x86_32/asm-offsets.c
index 3a774f9e60..a3d3680d00 100644
--- a/xen/arch/x86/x86_32/asm-offsets.c
+++ b/xen/arch/x86/x86_32/asm-offsets.c
@@ -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);
}
diff --git a/xen/arch/x86/x86_64/asm-offsets.c b/xen/arch/x86/x86_64/asm-offsets.c
index 51e02cc002..7fe1934b61 100644
--- a/xen/arch/x86/x86_64/asm-offsets.c
+++ b/xen/arch/x86/x86_64/asm-offsets.c
@@ -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);
}