ia64/xen-unstable

changeset 18368:01e95ec5b433

[IA64] Make gp value point to the xenva area in mca handler

backport the c/s f5a3f3dc189485d607fbd42678cc23958acc0a6e
of linux.
Xen/ia64 vmm is also relocatable so that it doesn't
lay in the identity mapping area.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
author Isaku Yamahata <yamahata@valinux.co.jp>
date Mon Aug 25 19:04:37 2008 +0900 (2008-08-25)
parents 0ac39e4bf63a
children 48db4eee7d58
files xen/include/asm-ia64/linux-xen/asm/mca_asm.h
line diff
     1.1 --- a/xen/include/asm-ia64/linux-xen/asm/mca_asm.h	Mon Aug 25 19:04:37 2008 +0900
     1.2 +++ b/xen/include/asm-ia64/linux-xen/asm/mca_asm.h	Mon Aug 25 19:04:37 2008 +0900
     1.3 @@ -198,6 +198,59 @@ 30:	mov ar.lc = _tmp1;			\
     1.4   *	7.	Do an rfi to move ipsr to psr and iip to ip.
     1.5   */
     1.6  
     1.7 +#ifdef XEN
     1.8 +#define VIRTUAL_MODE_ENTER(temp1, temp2, start_addr, old_psr)	\
     1.9 +	mov	temp2 = psr;					\
    1.10 +	;;							\
    1.11 +	mov	old_psr = temp2;				\
    1.12 +	;;							\
    1.13 +	dep	temp2 = 0, temp2, PSR_IC, 2;			\
    1.14 +	;;							\
    1.15 +	mov	psr.l = temp2;					\
    1.16 +	mov	ar.rsc = 0;					\
    1.17 +	;;							\
    1.18 +	srlz.d;							\
    1.19 +	mov	r13 = ar.k6;					\
    1.20 +	mov	temp2 = ar.bspstore;				\
    1.21 +	;;							\
    1.22 +	DATA_PA_TO_VA(temp2,temp1);				\
    1.23 +	;;							\
    1.24 +	mov	temp1 = ar.rnat;				\
    1.25 +	;;							\
    1.26 +	mov	ar.bspstore = temp2;				\
    1.27 +	;;							\
    1.28 +	mov	ar.rnat = temp1;				\
    1.29 +	;;							\
    1.30 +	mov	temp1 = old_psr;				\
    1.31 +	;;							\
    1.32 +	mov	temp2 = 1;					\
    1.33 +	;;							\
    1.34 +	dep	temp1 = temp2, temp1, PSR_IC, 1;		\
    1.35 +	;;							\
    1.36 +	dep	temp1 = temp2, temp1, PSR_IT, 1;		\
    1.37 +	;;							\
    1.38 +	dep	temp1 = temp2, temp1, PSR_DT, 1;		\
    1.39 +	;;							\
    1.40 +	dep	temp1 = temp2, temp1, PSR_RT, 1;		\
    1.41 +	;;							\
    1.42 +	dep	temp1 = temp2, temp1, PSR_BN, 1;		\
    1.43 +	;;							\
    1.44 +								\
    1.45 +	mov     cr.ipsr = temp1;				\
    1.46 +	movl	temp2 = start_addr;				\
    1.47 +	;;							\
    1.48 +	mov	cr.iip = temp2;					\
    1.49 +	movl	gp = __gp;					\
    1.50 +	;;							\
    1.51 +	DATA_PA_TO_VA(sp, temp1);				\
    1.52 +	srlz.i;							\
    1.53 +	;;							\
    1.54 +	nop	1;						\
    1.55 +	nop	2;						\
    1.56 +	nop	1;						\
    1.57 +	rfi							\
    1.58 +	;;
    1.59 +#else
    1.60  #define VIRTUAL_MODE_ENTER(temp1, temp2, start_addr, old_psr)	\
    1.61  	mov	temp2 = psr;					\
    1.62  	;;							\
    1.63 @@ -249,6 +302,7 @@ 30:	mov ar.lc = _tmp1;			\
    1.64  	nop	1;						\
    1.65  	rfi							\
    1.66  	;;
    1.67 +#endif
    1.68  
    1.69  /*
    1.70   * The following offsets capture the order in which the