ia64/xen-unstable

changeset 18870:dd7ac569579a

IA64: use symbolic constant for hypercall.

define symbolic names for hypercall number and use them.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
author Isaku Yamahata <yamahata@valinux.co.jp>
date Wed Dec 10 15:39:44 2008 +0900 (2008-12-10)
parents 09160c3bd179
children e239a47180fb
files xen/arch/ia64/xen/dom_fw_asm.S xen/arch/ia64/xen/domain.c xen/include/asm-ia64/dom_fw.h
line diff
     1.1 --- a/xen/arch/ia64/xen/dom_fw_asm.S	Fri Dec 05 15:47:19 2008 +0900
     1.2 +++ b/xen/arch/ia64/xen/dom_fw_asm.S	Wed Dec 10 15:39:44 2008 +0900
     1.3 @@ -1,3 +1,5 @@
     1.4 +#include <asm/dom_fw.h>
     1.5 +
     1.6  // moved from xenasm.S to be shared by xen and libxc
     1.7  /*
     1.8   * Assembly support routines for Xen/ia64
     1.9 @@ -26,14 +28,14 @@
    1.10  xen_ia64_pal_call_stub:
    1.11  	{
    1.12  	 .mii
    1.13 -	addl r2=0x1000,r0	//  Hypercall number (Value is patched).
    1.14 +	addl r2=FW_HYPERCALL_PAL_CALL_ASM,r0	//  Hypercall number (Value is patched).
    1.15  	mov r9=256
    1.16  	;; 
    1.17  	cmp.gtu p7,p8=r9,r28		/* r32 <= 255? */
    1.18  	}
    1.19  	{
    1.20  	 .mbb
    1.21 -	break 0x1000		//  Hypercall vector (Value is patched).
    1.22 +	break __IA64_XEN_HYPERCALL_DEFAULT	//  Hypercall vector (Value is patched).
    1.23  (p7)	br.cond.sptk.few rp
    1.24  (p8)	br.ret.sptk.few rp
    1.25  	}
     2.1 --- a/xen/arch/ia64/xen/domain.c	Fri Dec 05 15:47:19 2008 +0900
     2.2 +++ b/xen/arch/ia64/xen/domain.c	Wed Dec 10 15:39:44 2008 +0900
     2.3 @@ -561,7 +561,7 @@ int arch_domain_create(struct domain *d,
     2.4  
     2.5  	// the following will eventually need to be negotiated dynamically
     2.6  	d->arch.shared_info_va = DEFAULT_SHAREDINFO_ADDR;
     2.7 -	d->arch.breakimm = 0x1000;
     2.8 +	d->arch.breakimm = __IA64_XEN_HYPERCALL_DEFAULT;
     2.9  	for (i = 0; i < NR_CPUS; i++) {
    2.10  		d->arch.last_vcpu[i].vcpu_id = INVALID_VCPU_ID;
    2.11  	}
     3.1 --- a/xen/include/asm-ia64/dom_fw.h	Fri Dec 05 15:47:19 2008 +0900
     3.2 +++ b/xen/include/asm-ia64/dom_fw.h	Wed Dec 10 15:39:44 2008 +0900
     3.3 @@ -5,6 +5,9 @@
     3.4   *	Dan Magenheimer (dan.magenheimer@hp.com)
     3.5   */
     3.6  
     3.7 +#define __IA64_XEN_HYPERCALL_DEFAULT		0x1000
     3.8 +#define __IA64_XEN_HYPERCALL_DEFAULT_STR	"0x1000"
     3.9 +
    3.10  /* Portion of guest physical memory space reserved for PAL/SAL/EFI/ACPI
    3.11     data and code.  */
    3.12  #define FW_BASE_PADDR		0x0000UL
    3.13 @@ -65,6 +68,7 @@
    3.14  #define FW_HYPERCALL_PAL_CALL_INDEX	0x80UL
    3.15  #define FW_HYPERCALL_PAL_CALL_PADDR	FW_HYPERCALL_PADDR(FW_HYPERCALL_PAL_CALL_INDEX)
    3.16  #define FW_HYPERCALL_PAL_CALL		0x1000UL
    3.17 +#define FW_HYPERCALL_PAL_CALL_ASM	0x1000
    3.18  
    3.19  /*
    3.20   * SAL consists of a table of descriptors, one of which (type=0)
    3.21 @@ -164,6 +168,7 @@
    3.22  #define FW_HYPERCALL_FPSWA_ENTRY_PADDR			FW_HYPERCALL_PADDR(FW_HYPERCALL_FPSWA_ENTRY_INDEX)
    3.23  #define FW_HYPERCALL_FPSWA_PATCH_PADDR			FW_HYPERCALL_PADDR(FW_HYPERCALL_FPSWA_PATCH_INDEX)
    3.24  #define FW_HYPERCALL_FPSWA				0x500UL
    3.25 +#define FW_HYPERCALL_FPSWA_STR				"0x500"
    3.26  
    3.27  /* Set the shared_info base virtual address.  */
    3.28  #define FW_HYPERCALL_SET_SHARED_INFO_VA			0x600UL
    3.29 @@ -186,7 +191,7 @@
    3.30  /* Additionnal OEM SAL.  */
    3.31  #define SAL_XEN_SAL_RETURN	0x02000000
    3.32  
    3.33 -#ifdef __XEN__
    3.34 +#if defined(__XEN__) && !defined(__ASSEMBLY__)
    3.35  #include <linux/efi.h>
    3.36  extern struct ia64_pal_retval xen_pal_emulator(u64, u64, u64, u64);
    3.37  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);