]> xenbits.xensource.com Git - rumpuser-xen.git/commitdiff
Synchronise x86_32.o with Mini-OS namespace cleanup.
authorMartin Lucina <martin@lucina.net>
Mon, 10 Nov 2014 10:05:31 +0000 (11:05 +0100)
committerMartin Lucina <martin@lucina.net>
Mon, 10 Nov 2014 14:05:42 +0000 (15:05 +0100)
These changes sync the x86_32 arch-specific entrypoints with the Mini-OS
namespace cleanups. Now builds and runs correctly on x86.

Signed-off-by: Martin Lucina <martin@lucina.net>
include/mini-os/x86/x86_32/hypercall-x86_32.h
xen/arch/x86/setup.c
xen/arch/x86/x86_32.S

index 43028eea0ab671fe499058c8fc016231b1376473..789a834428d2abd0cae046d19fe3167850595205 100644 (file)
 #define __STR(x) #x
 #define STR(x) __STR(x)
 
-extern char hypercall_page[PAGE_SIZE];
+extern char _minios_hypercall_page[PAGE_SIZE];
 
 #define _hypercall0(type, name)                        \
 ({                                             \
        long __res;                             \
        asm volatile (                          \
-               "call hypercall_page + ("STR(__HYPERVISOR_##name)" * 32)"\
+               "call _minios_hypercall_page + ("STR(__HYPERVISOR_##name)" * 32)"\
                : "=a" (__res)                  \
                :                               \
                : "memory" );                   \
@@ -55,7 +55,7 @@ extern char hypercall_page[PAGE_SIZE];
 ({                                                             \
        long __res, __ign1;                                     \
        asm volatile (                                          \
-               "call hypercall_page + ("STR(__HYPERVISOR_##name)" * 32)"\
+               "call _minios_hypercall_page + ("STR(__HYPERVISOR_##name)" * 32)"\
                : "=a" (__res), "=b" (__ign1)                   \
                : "1" ((long)(a1))                              \
                : "memory" );                                   \
@@ -66,7 +66,7 @@ extern char hypercall_page[PAGE_SIZE];
 ({                                                             \
        long __res, __ign1, __ign2;                             \
        asm volatile (                                          \
-               "call hypercall_page + ("STR(__HYPERVISOR_##name)" * 32)"\
+               "call _minios_hypercall_page + ("STR(__HYPERVISOR_##name)" * 32)"\
                : "=a" (__res), "=b" (__ign1), "=c" (__ign2)    \
                : "1" ((long)(a1)), "2" ((long)(a2))            \
                : "memory" );                                   \
@@ -77,7 +77,7 @@ extern char hypercall_page[PAGE_SIZE];
 ({                                                             \
        long __res, __ign1, __ign2, __ign3;                     \
        asm volatile (                                          \
-               "call hypercall_page + ("STR(__HYPERVISOR_##name)" * 32)"\
+               "call _minios_hypercall_page + ("STR(__HYPERVISOR_##name)" * 32)"\
                : "=a" (__res), "=b" (__ign1), "=c" (__ign2),   \
                "=d" (__ign3)                                   \
                : "1" ((long)(a1)), "2" ((long)(a2)),           \
@@ -90,7 +90,7 @@ extern char hypercall_page[PAGE_SIZE];
 ({                                                             \
        long __res, __ign1, __ign2, __ign3, __ign4;             \
        asm volatile (                                          \
-               "call hypercall_page + ("STR(__HYPERVISOR_##name)" * 32)"\
+               "call _minios_hypercall_page + ("STR(__HYPERVISOR_##name)" * 32)"\
                : "=a" (__res), "=b" (__ign1), "=c" (__ign2),   \
                "=d" (__ign3), "=S" (__ign4)                    \
                : "1" ((long)(a1)), "2" ((long)(a2)),           \
@@ -103,7 +103,7 @@ extern char hypercall_page[PAGE_SIZE];
 ({                                                             \
        long __res, __ign1, __ign2, __ign3, __ign4, __ign5;     \
        asm volatile (                                          \
-               "call hypercall_page + ("STR(__HYPERVISOR_##name)" * 32)"\
+               "call _minios_hypercall_page + ("STR(__HYPERVISOR_##name)" * 32)"\
                : "=a" (__res), "=b" (__ign1), "=c" (__ign2),   \
                "=d" (__ign3), "=S" (__ign4), "=D" (__ign5)     \
                : "1" ((long)(a1)), "2" ((long)(a2)),           \
index 8d54ea3275216dd7c8329afd86e8d37af3cc11bd..31558e2610945761ca541f69dacf65ef0a555e81 100644 (file)
@@ -92,8 +92,8 @@ arch_init(start_info_t *si)
            /* Set up event and failsafe callback addresses. */
 #ifdef __i386__
        HYPERVISOR_set_callbacks(
-               __KERNEL_CS, (unsigned long)hypervisor_callback,
-               __KERNEL_CS, (unsigned long)failsafe_callback);
+               __KERNEL_CS, (unsigned long)_minios_entry_hypervisor_callback,
+               __KERNEL_CS, (unsigned long)_minios_entry_failsafe_callback);
 #else
        HYPERVISOR_set_callbacks(
                (unsigned long)_minios_entry_hypervisor_callback,
index 753cbcaaf44c9dd8c37d618e382cee24ad0a7035..5d5202da8b6ce286b9ac045d274efc59c3e6d2eb 100644 (file)
        .byte   0
 .text
 
-.globl _start, shared_info, hypercall_page
+#define ENTRY(name) \
+        .globl _minios_entry_##name; \
+        _minios_entry_##name:
+
+.globl _start, _minios_shared_info, _minios_hypercall_page
                         
 _start:
         cld
         lss stack_start,%esp
         andl $(~(__STACK_SIZE-1)), %esp
         push %esi 
-        call start_kernel
+        call _minios_start_kernel
 
 stack_start:
-       .long stack+(2*__STACK_SIZE), __KERNEL_SS
+       .long _minios_stack+(2*__STACK_SIZE), __KERNEL_SS
 
         /* Unpleasant -- the PTE that maps this page is actually overwritten */
         /* to map the real shared-info page! :-)                             */
         .org 0x1000
-shared_info:
+_minios_shared_info:
         .org 0x2000
 
-hypercall_page:
+_minios_hypercall_page:
         .org 0x3000
 
 ES             = 0x20
@@ -39,8 +43,6 @@ ORIG_EAX      = 0x24
 EIP            = 0x28
 CS             = 0x2C
 
-#define ENTRY(X) .globl X ; X :
-
 #define SAVE_ALL \
        cld; \
        pushl %es; \
@@ -124,7 +126,7 @@ ENTRY(hypervisor_callback)
         jb   critical_region_fixup
 11:     push %esp
         xorl %ebp,%ebp
-        call do_hypervisor_callback
+        call _minios_do_hypervisor_callback
         add  $4,%esp
         movl HYPERVISOR_shared_info,%esi
         xorl %eax,%eax
@@ -283,9 +285,9 @@ ENTRY(thread_starter)
     xorl %ebp,%ebp
     pushl %eax
     call *%ebx
-    call exit_thread 
+    call minios_exit_thread
     
-ENTRY(__arch_switch_threads)
+ENTRY(arch_switch_threads)
     movl 4(%esp), %ecx         /* prev */
     movl 8(%esp), %edx         /* next */
     pushl %ebp