Mailing List Archive

[xen-unstable] multiboot asm: Get offset constants from the C struct
# HG changeset patch
# User Keir Fraser <keir.fraser@citrix.com>
# Date 1273222843 -3600
# Node ID 535bf8e72dd23ae91b8b3bb1ae8ab49ad15c402b
# Parent 3b7228548a64428d07245e59fcb5a8205abc0798
multiboot asm: Get offset constants from the C struct

Signed-off-by: Xiao Guangrong <xiaoguangrong@cn.fujitsu.com>
---
xen/arch/x86/boot/cmdline.S | 4 ----
xen/arch/x86/x86_32/asm-offsets.c | 5 +++++
xen/arch/x86/x86_64/asm-offsets.c | 5 +++++
3 files changed, 10 insertions(+), 4 deletions(-)

diff -r 3b7228548a64 -r 535bf8e72dd2 xen/arch/x86/boot/cmdline.S
--- a/xen/arch/x86/boot/cmdline.S Fri May 07 09:50:17 2010 +0100
+++ b/xen/arch/x86/boot/cmdline.S Fri May 07 10:00:43 2010 +0100
@@ -147,10 +147,6 @@ 3: pop %ebx
3: pop %ebx
ret

-/* multiboot_info structure offsets. */
-#define MB_flags 0
-#define MB_cmdline 16
-
cmdline_parse_early:
pusha

diff -r 3b7228548a64 -r 535bf8e72dd2 xen/arch/x86/x86_32/asm-offsets.c
--- a/xen/arch/x86/x86_32/asm-offsets.c Fri May 07 09:50:17 2010 +0100
+++ b/xen/arch/x86/x86_32/asm-offsets.c Fri May 07 10:00:43 2010 +0100
@@ -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 -r 3b7228548a64 -r 535bf8e72dd2 xen/arch/x86/x86_64/asm-offsets.c
--- a/xen/arch/x86/x86_64/asm-offsets.c Fri May 07 09:50:17 2010 +0100
+++ b/xen/arch/x86/x86_64/asm-offsets.c Fri May 07 10:00:43 2010 +0100
@@ -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);
}

_______________________________________________
Xen-changelog mailing list
Xen-changelog@lists.xensource.com
http://lists.xensource.com/xen-changelog