]> xenbits.xensource.com Git - people/royger/xen-test-framework.git/commitdiff
Introduce and use a boot stack (one page)
authorAndrew Cooper <andrew.cooper3@citrix.com>
Tue, 24 Mar 2015 18:27:25 +0000 (19:27 +0100)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Mon, 28 Sep 2015 13:54:43 +0000 (14:54 +0100)
HVM guests don't have one provided by the domain builder.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Doxyfile
arch/x86/boot/head_pv.S
arch/x86/setup.c
include/xtf/compiler.h

index 9d6f4a76aa7e217dd12bd9023d4c61e7658ed97b..9dd89be70626801ccdb9c7ac34fe2dbb4ac6da5f 100644 (file)
--- a/Doxyfile
+++ b/Doxyfile
@@ -1985,7 +1985,8 @@ INCLUDE_FILE_PATTERNS  =
 # recursively expanded use the := operator instead of the = operator.
 # This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
 
-PREDEFINED             = __attribute__(x)= \
+PREDEFINED             = __aligned(x)= \
+                         __attribute__(x)= \
                          __printf(x,y)= \
                          __noreturn \
 
index 8ba502c6c9b897be9b223a78300df9154e840b90..078d6b85af704840a0abb700a4d5e40253c21fdf 100644 (file)
@@ -1,5 +1,7 @@
 #include <xtf/asm_macros.h>
 
+#include <arch/x86/page.h>
+
 #include <xen/elfnote.h>
 
 /* Guest name and version */
@@ -32,6 +34,9 @@ GLOBAL(_start)
         mov %esi, start_info
 #endif
 
+        /* Move onto own stack. */
+        mov $boot_stack + PAGE_SIZE, %esp
+
         call xtf_main
 
         /* panic() if xtf_main manages to return. */
index faf2dc8d15c7f8347808daa21d4376316b66f72d..c123105b7bb32301c892016efea53267e48953aa 100644 (file)
@@ -5,6 +5,8 @@
 #include <arch/x86/config.h>
 #include <arch/x86/mm.h>
 
+uint8_t boot_stack[PAGE_SIZE] __aligned(PAGE_SIZE);
+
 #ifdef CONFIG_ENV_pv
 /* Filled in by head_pv.S */
 start_info_t *start_info = NULL;
index b91744c455bd46cde234e75d9fcc390d3ebc1129..9c3b05d9e015944bc1f47a7cac8876e6819016c2 100644 (file)
@@ -1,6 +1,8 @@
 #ifndef XTF_COMPILER_H
 #define XTF_COMPILER_H
 
+#define __aligned(x)          __attribute__((aligned(x)))
+
 #define __noreturn            __attribute__((noreturn))
 #define unreachable()         __builtin_unreachable()