diff options
author | Keir Fraser <keir.fraser@citrix.com> | 2010-05-10 09:55:28 +0100 |
---|---|---|
committer | Keir Fraser <keir.fraser@citrix.com> | 2010-05-10 09:55:28 +0100 |
commit | d11b4a6bd23c951dc6e7e2e9345938c5e6f8538b (patch) | |
tree | 6344d2e39528bf65d89c966b1eb03c4569803d82 | |
parent | 00f608a35495122c5cfa86e9fdb7726c6db0a4cd (diff) | |
download | xen-d11b4a6bd23c951dc6e7e2e9345938c5e6f8538b.tar.gz xen-d11b4a6bd23c951dc6e7e2e9345938c5e6f8538b.tar.bz2 xen-d11b4a6bd23c951dc6e7e2e9345938c5e6f8538b.zip |
multiboot asm: Get offset constants from the C struct
Signed-off-by: Xiao Guangrong <xiaoguangrong@cn.fujitsu.com>
xen-unstable changeset: 21325:535bf8e72dd2
xen-unstable date: Fri May 07 10:00:43 2010 +0100
-rw-r--r-- | xen/arch/x86/boot/cmdline.S | 4 | ||||
-rw-r--r-- | xen/arch/x86/x86_32/asm-offsets.c | 5 | ||||
-rw-r--r-- | xen/arch/x86/x86_64/asm-offsets.c | 5 |
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); } |