[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-unstable] [IA64] memmap: move pal_call_stub from xenasm.S



# HG changeset patch
# User Alex Williamson <alex.williamson@xxxxxx>
# Date 1179777214 21600
# Node ID 2fb4ab0c174acd43a69e3b69f5fe5daaaba52109
# Parent  8dbc11034f821576b9a2585efb848417c213da87
[IA64] memmap: move pal_call_stub from xenasm.S

Now lives in dom_fw_asm.S to be shared by xen and libxc.

Signed-off-by: Isaku Yamahata <yamahata@xxxxxxxxxxxxx>
---
 xen/arch/ia64/xen/Makefile        |    1 
 xen/arch/ia64/xen/dom_fw_asm.S    |   41 ++++++++++++++++++++++++++++++++++++++
 xen/arch/ia64/xen/dom_fw_common.c |   16 ++++++++------
 xen/arch/ia64/xen/xenasm.S        |   23 ---------------------
 xen/include/asm-ia64/dom_fw.h     |    3 +-
 5 files changed, 53 insertions(+), 31 deletions(-)

diff -r 8dbc11034f82 -r 2fb4ab0c174a xen/arch/ia64/xen/Makefile
--- a/xen/arch/ia64/xen/Makefile        Mon May 21 13:50:05 2007 -0600
+++ b/xen/arch/ia64/xen/Makefile        Mon May 21 13:53:34 2007 -0600
@@ -6,6 +6,7 @@ obj-y += dom0_ops.o
 obj-y += dom0_ops.o
 obj-y += domain.o
 obj-y += dom_fw.o
+obj-y += dom_fw_asm.o
 obj-y += fw_emul.o
 obj-y += hpsimserial.o
 obj-y += hypercall.o
diff -r 8dbc11034f82 -r 2fb4ab0c174a xen/arch/ia64/xen/dom_fw_asm.S
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/xen/arch/ia64/xen/dom_fw_asm.S    Mon May 21 13:53:34 2007 -0600
@@ -0,0 +1,41 @@
+// moved from xenasm.S to be shared by xen and libxc
+/*
+ * Assembly support routines for Xen/ia64
+ *
+ * Copyright (C) 2004 Hewlett-Packard Co
+ *      Dan Magenheimer <dan.magenheimer@xxxxxx>
+ *
+ * Copyright (c) 2007 Isaku Yamahata <yamahata at valinux co jp>
+ *                    VA Linux Systems Japan K.K.
+ */
+
+//  These instructions are copied in the domains.
+//  This is the virtual PAL, which simply does a hypercall.
+//  The size is 2 bundles (32 Bytes).  It handles both static and stacked
+//    convention.
+//  If you modify this code, you have to modify dom_fw.h (for the size) and
+//   dom_fw_pal_hypercall_patch.
+
+// This file is shared with xen and libxc.
+// GLOBAL_ENTRY() end END() macro can't be used.
+
+//GLOBAL_ENTRY(xen_ia64_pal_call_stub)
+.global xen_ia64_pal_call_stub;
+.align 32;
+.proc xen_ia64_pal_call_stub;
+xen_ia64_pal_call_stub:
+       {
+        .mii
+       addl r2=0x1000,r0       //  Hypercall number (Value is patched).
+       mov r9=256
+       ;; 
+       cmp.gtu p7,p8=r9,r28            /* r32 <= 255? */
+       }
+       {
+        .mbb
+       break 0x1000            //  Hypercall vector (Value is patched).
+(p7)   br.cond.sptk.few rp
+(p8)   br.ret.sptk.few rp
+       }
+//END(xen_ia64_pal_call_stub)
+.endp xen_ia64_pal_call_stub
diff -r 8dbc11034f82 -r 2fb4ab0c174a xen/arch/ia64/xen/dom_fw_common.c
--- a/xen/arch/ia64/xen/dom_fw_common.c Mon May 21 13:50:05 2007 -0600
+++ b/xen/arch/ia64/xen/dom_fw_common.c Mon May 21 13:53:34 2007 -0600
@@ -110,17 +110,19 @@ static void
 static void
 build_pal_hypercall_bundles(uint64_t *imva, uint64_t brkimm, uint64_t hypnum)
 {
-       extern unsigned long pal_call_stub[];
+       extern unsigned long xen_ia64_pal_call_stub[];
        IA64_BUNDLE bundle;
        INST64_A5 slot_a5;
        INST64_M37 slot_m37;
 
-       /* The source of the hypercall stub is the pal_call_stub function
-          defined in xenasm.S.  */
+       /*
+        * The source of the hypercall stub is
+        * the xen_ia64_pal_call_stub function defined in dom_fw_asm.S. 
+        */
 
        /* Copy the first bundle and patch the hypercall number.  */
-       bundle.i64[0] = pal_call_stub[0];
-       bundle.i64[1] = pal_call_stub[1];
+       bundle.i64[0] = xen_ia64_pal_call_stub[0];
+       bundle.i64[1] = xen_ia64_pal_call_stub[1];
        slot_a5.inst = bundle.slot0;
        slot_a5.imm7b = hypnum;
        slot_a5.imm9d = hypnum >> 7;
@@ -132,8 +134,8 @@ build_pal_hypercall_bundles(uint64_t *im
        ia64_fc(imva + 1);
        
        /* Copy the second bundle and patch the hypercall vector.  */
-       bundle.i64[0] = pal_call_stub[2];
-       bundle.i64[1] = pal_call_stub[3];
+       bundle.i64[0] = xen_ia64_pal_call_stub[2];
+       bundle.i64[1] = xen_ia64_pal_call_stub[3];
        slot_m37.inst = bundle.slot0;
        slot_m37.imm20a = brkimm;
        slot_m37.i = brkimm >> 20;
diff -r 8dbc11034f82 -r 2fb4ab0c174a xen/arch/ia64/xen/xenasm.S
--- a/xen/arch/ia64/xen/xenasm.S        Mon May 21 13:50:05 2007 -0600
+++ b/xen/arch/ia64/xen/xenasm.S        Mon May 21 13:53:34 2007 -0600
@@ -356,26 +356,3 @@ stacked:
        br.ret.sptk.few rp
 END(pal_emulator_static)
 
-//  These instructions are copied in the domains.
-//  This is the virtual PAL, which simply does a hypercall.
-//  The size is 2 bundles (32 Bytes).  It handles both static and stacked
-//    convention.
-//  If you modify this code, you have to modify dom_fw.h (for the size) and
-//   dom_fw_pal_hypercall_patch.
-GLOBAL_ENTRY(pal_call_stub)
-       {
-        .mii
-       addl r2=0x1000,r0       //  Hypercall number (Value is patched).
-       mov r9=256
-       ;; 
-       cmp.gtu p7,p8=r9,r28            /* r32 <= 255? */
-       }
-       {
-        .mbb
-       break 0x1000            //  Hypercall vector (Value is patched).
-(p7)   br.cond.sptk.few rp
-(p8)   br.ret.sptk.few rp
-       }
-END(pal_call_stub)
-
-
diff -r 8dbc11034f82 -r 2fb4ab0c174a xen/include/asm-ia64/dom_fw.h
--- a/xen/include/asm-ia64/dom_fw.h     Mon May 21 13:50:05 2007 -0600
+++ b/xen/include/asm-ia64/dom_fw.h     Mon May 21 13:53:34 2007 -0600
@@ -59,7 +59,8 @@
  * rp=b0 indicates the return point.
  *
  * A single hypercall is used for all PAL calls.
- * The hypercall stub is pal_call_stub (xenasm.S).  Its size is 2 bundles.
+ * The hypercall stub is xen_ia64_pal_call_stub (dom_fw_asm.S). 
+ * Its size is 2 bundles.
  */
 
 #define FW_HYPERCALL_PAL_CALL_INDEX    0x80UL

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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.