IA64: use symbolic constant for hypercall.
define symbolic names for hypercall number and use them.
Signed-off-by: Isaku Yamahata <yamahata@xxxxxxxxxxxxx>
diff --git a/xen/arch/ia64/xen/dom_fw_asm.S b/xen/arch/ia64/xen/dom_fw_asm.S
--- a/xen/arch/ia64/xen/dom_fw_asm.S
+++ b/xen/arch/ia64/xen/dom_fw_asm.S
@@ -1,3 +1,5 @@
+#include <asm/dom_fw.h>
+
// moved from xenasm.S to be shared by xen and libxc
/*
* Assembly support routines for Xen/ia64
@@ -26,14 +28,14 @@ xen_ia64_pal_call_stub:
xen_ia64_pal_call_stub:
{
.mii
- addl r2=0x1000,r0 // Hypercall number (Value is patched).
+ addl r2=FW_HYPERCALL_PAL_CALL_ASM,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).
+ break __IA64_XEN_HYPERCALL_DEFAULT // Hypercall vector (Value is
patched).
(p7) br.cond.sptk.few rp
(p8) br.ret.sptk.few rp
}
diff --git a/xen/arch/ia64/xen/domain.c b/xen/arch/ia64/xen/domain.c
--- a/xen/arch/ia64/xen/domain.c
+++ b/xen/arch/ia64/xen/domain.c
@@ -561,7 +561,7 @@ int arch_domain_create(struct domain *d,
// the following will eventually need to be negotiated dynamically
d->arch.shared_info_va = DEFAULT_SHAREDINFO_ADDR;
- d->arch.breakimm = 0x1000;
+ d->arch.breakimm = __IA64_XEN_HYPERCALL_DEFAULT;
for (i = 0; i < NR_CPUS; i++) {
d->arch.last_vcpu[i].vcpu_id = INVALID_VCPU_ID;
}
diff --git a/xen/include/asm-ia64/dom_fw.h b/xen/include/asm-ia64/dom_fw.h
--- a/xen/include/asm-ia64/dom_fw.h
+++ b/xen/include/asm-ia64/dom_fw.h
@@ -4,6 +4,9 @@
* Copyright (C) 2004 Hewlett-Packard Co
* Dan Magenheimer (dan.magenheimer@xxxxxx)
*/
+
+#define __IA64_XEN_HYPERCALL_DEFAULT 0x1000
+#define __IA64_XEN_HYPERCALL_DEFAULT_STR "0x1000"
/* Portion of guest physical memory space reserved for PAL/SAL/EFI/ACPI
data and code. */
@@ -65,6 +68,7 @@
#define FW_HYPERCALL_PAL_CALL_INDEX 0x80UL
#define FW_HYPERCALL_PAL_CALL_PADDR
FW_HYPERCALL_PADDR(FW_HYPERCALL_PAL_CALL_INDEX)
#define FW_HYPERCALL_PAL_CALL 0x1000UL
+#define FW_HYPERCALL_PAL_CALL_ASM 0x1000
/*
* SAL consists of a table of descriptors, one of which (type=0)
@@ -164,6 +168,7 @@
#define FW_HYPERCALL_FPSWA_ENTRY_PADDR
FW_HYPERCALL_PADDR(FW_HYPERCALL_FPSWA_ENTRY_INDEX)
#define FW_HYPERCALL_FPSWA_PATCH_PADDR
FW_HYPERCALL_PADDR(FW_HYPERCALL_FPSWA_PATCH_INDEX)
#define FW_HYPERCALL_FPSWA 0x500UL
+#define FW_HYPERCALL_FPSWA_STR "0x500"
/* Set the shared_info base virtual address. */
#define FW_HYPERCALL_SET_SHARED_INFO_VA 0x600UL
@@ -186,7 +191,7 @@
/* Additionnal OEM SAL. */
#define SAL_XEN_SAL_RETURN 0x02000000
-#ifdef __XEN__
+#if defined(__XEN__) && !defined(__ASSEMBLY__)
#include <linux/efi.h>
extern struct ia64_pal_retval xen_pal_emulator(u64, u64, u64, u64);
extern struct sal_ret_values sal_emulator (long index, unsigned long in1,
unsigned long in2, unsigned long in3, unsigned long in4, unsigned long in5,
unsigned long in6, unsigned long in7);
use-constant-for-hypercall.patch
Description: Text Data
_______________________________________________
Xen-ia64-devel mailing list
Xen-ia64-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-ia64-devel
|