ia64/xen-unstable

changeset 4437:df4e533ee802

bitkeeper revision 1.1236.49.4 (424daeb9mhwcMe-HsktqHZfvMFrb0A)

ia64: update xen address space for VTi compatibility
author djm@sportsman.spdomain
date Fri Apr 01 20:27:37 2005 +0000 (2005-04-01)
parents e3aff19a321a
children 528e86541344
files .rootkeys xen/arch/ia64/domain.c xen/arch/ia64/patch/linux-2.6.7/entry.S xen/arch/ia64/patch/linux-2.6.7/head.S xen/arch/ia64/patch/linux-2.6.7/ivt.S xen/arch/ia64/patch/linux-2.6.7/mca_asm.h xen/arch/ia64/patch/linux-2.6.7/minstate.h xen/arch/ia64/patch/linux-2.6.7/page.h xen/arch/ia64/patch/linux-2.6.7/pal.S xen/arch/ia64/patch/linux-2.6.7/system.h xen/arch/ia64/tools/mkbuildtree xen/arch/ia64/xenasm.S
line diff
     1.1 --- a/.rootkeys	Fri Apr 01 19:52:52 2005 +0000
     1.2 +++ b/.rootkeys	Fri Apr 01 20:27:37 2005 +0000
     1.3 @@ -1013,12 +1013,14 @@ 421098b4C0Lc3xag4Nm-_yC9IMTDqA xen/arch/
     1.4  421098b4weyd0AQTjPLmooChUJm13Q xen/arch/ia64/patch/linux-2.6.7/kregs.h
     1.5  421098b4vHCejAUPem4w8p5V-AD1Ig xen/arch/ia64/patch/linux-2.6.7/lds.S
     1.6  421098b4uooGl5X8zZM96qpmS0Furg xen/arch/ia64/patch/linux-2.6.7/linuxtime.h
     1.7 +424dad01Txy4dcgKHGkTx1L2z7GuQA xen/arch/ia64/patch/linux-2.6.7/mca_asm.h
     1.8  421098b4awnw3Jf23gohJWoK8s7-Qg xen/arch/ia64/patch/linux-2.6.7/minstate.h
     1.9  421098b5hIfMbZlQTfrOKN4BtzJgDQ xen/arch/ia64/patch/linux-2.6.7/mm_bootmem.c
    1.10  421098b53IVBoQPcDjFciZy86YEhRQ xen/arch/ia64/patch/linux-2.6.7/mm_contig.c
    1.11  421098b5pZw41QuBTvhjvSol6aAHDw xen/arch/ia64/patch/linux-2.6.7/mmzone.h
    1.12  421098b5B_dClZDGuPYeY3IXo8Hlbw xen/arch/ia64/patch/linux-2.6.7/page.h
    1.13  421098b5saClfxPj36l47H9Um7h1Fw xen/arch/ia64/patch/linux-2.6.7/page_alloc.c
    1.14 +424dab78_JGGpJDaAb6ZtkPJAkAKOA xen/arch/ia64/patch/linux-2.6.7/pal.S
    1.15  4241ed05l9ZdG7Aj0tygIxIwPRXhog xen/arch/ia64/patch/linux-2.6.7/pgalloc.h
    1.16  421098b5OkmcjMBq8gxs7ZrTa4Ao6g xen/arch/ia64/patch/linux-2.6.7/processor.h
    1.17  421098b51RLB6jWr6rIlpB2SNObxZg xen/arch/ia64/patch/linux-2.6.7/sal.h
     2.1 --- a/xen/arch/ia64/domain.c	Fri Apr 01 19:52:52 2005 +0000
     2.2 +++ b/xen/arch/ia64/domain.c	Fri Apr 01 20:27:37 2005 +0000
     2.3 @@ -194,9 +194,9 @@ void arch_do_createdomain(struct exec_do
     2.4  	if (!allocate_rid_range(d,DOMAIN_RID_BITS_DEFAULT)) // FIXME
     2.5  		BUG();
     2.6  	// the following will eventually need to be negotiated dynamically
     2.7 -	d->xen_vastart = 0xfffc000000000000;
     2.8 -	d->xen_vaend = 0xfffe000000000000;
     2.9 -	d->shared_info_va = 0xfffd000000000000;
    2.10 +	d->xen_vastart = 0xf000000000000000;
    2.11 +	d->xen_vaend = 0xf300000000000000;
    2.12 +	d->shared_info_va = 0xf100000000000000;
    2.13  	d->breakimm = 0x1000;
    2.14  	// stay on kernel stack because may get interrupts!
    2.15  	// ia64_ret_from_clone (which b0 gets in new_thread) switches
     3.1 --- a/xen/arch/ia64/patch/linux-2.6.7/entry.S	Fri Apr 01 19:52:52 2005 +0000
     3.2 +++ b/xen/arch/ia64/patch/linux-2.6.7/entry.S	Fri Apr 01 20:27:37 2005 +0000
     3.3 @@ -1,5 +1,5 @@
     3.4 ---- /home/djm/src/xen/xeno-ia64.bk/xen/linux-2.6.7/arch/ia64/kernel/entry.S	2005-01-23 13:23:36.000000000 -0700
     3.5 -+++ /home/djm/src/xen/xeno-ia64.bk/xen/arch/ia64/entry.S	2004-12-17 13:47:03.000000000 -0700
     3.6 +--- ../../linux-2.6.7/arch/ia64/kernel/entry.S	2005-03-24 19:39:56.000000000 -0700
     3.7 ++++ arch/ia64/entry.S	2005-04-01 12:56:01.000000000 -0700
     3.8  @@ -35,7 +35,9 @@
     3.9   
    3.10   #include <asm/asmmacro.h>
    3.11 @@ -46,7 +46,7 @@
    3.12   	mov r27=IA64_KR(CURRENT_STACK)
    3.13   	adds r21=IA64_TASK_THREAD_KSP_OFFSET,in0
    3.14  -	dep r20=0,in0,61,3		// physical address of "current"
    3.15 -+	dep r20=0,in0,50,14		// physical address of "current"
    3.16 ++	dep r20=0,in0,60,4		// physical address of "current"
    3.17   	;;
    3.18   	st8 [r22]=sp			// save kernel stack pointer of old task
    3.19   	shr.u r26=r20,IA64_GRANULE_SHIFT
     4.1 --- a/xen/arch/ia64/patch/linux-2.6.7/head.S	Fri Apr 01 19:52:52 2005 +0000
     4.2 +++ b/xen/arch/ia64/patch/linux-2.6.7/head.S	Fri Apr 01 20:27:37 2005 +0000
     4.3 @@ -1,5 +1,5 @@
     4.4 ---- /home/djm/src/xen/xeno-ia64.bk/xen/linux-2.6.7/arch/ia64/kernel/head.S	2005-01-23 13:23:36.000000000 -0700
     4.5 -+++ /home/djm/src/xen/xeno-ia64.bk/xen/arch/ia64/head.S	2004-12-17 13:47:03.000000000 -0700
     4.6 +--- ../../linux-2.6.7/arch/ia64/kernel/head.S	2005-03-24 19:39:56.000000000 -0700
     4.7 ++++ arch/ia64/head.S	2005-04-01 12:56:01.000000000 -0700
     4.8  @@ -1,3 +1,8 @@
     4.9  +#ifdef XEN
    4.10  +#define	console_print	printf
    4.11 @@ -14,7 +14,7 @@
    4.12   	;;
    4.13   	or r18=r17,r18
    4.14  +#ifdef XEN
    4.15 -+	dep r2=-1,r3,50,14	// IMVA of task
    4.16 ++	dep r2=-1,r3,60,4	// IMVA of task
    4.17  +#else
    4.18   	dep r2=-1,r3,61,3	// IMVA of task
    4.19  +#endif
    4.20 @@ -26,7 +26,7 @@
    4.21   	mov ar.rsc=0x3		// place RSE in eager mode
    4.22   
    4.23  +#ifdef XEN
    4.24 -+(isBP)	dep r28=-1,r28,50,14	// make address virtual
    4.25 ++(isBP)	dep r28=-1,r28,60,4	// make address virtual
    4.26  +#else
    4.27   (isBP)	dep r28=-1,r28,61,3	// make address virtual
    4.28  +#endif
    4.29 @@ -69,8 +69,8 @@
    4.30   	dep r3=0,r3,KERNEL_TR_PAGE_SHIFT,64-KERNEL_TR_PAGE_SHIFT
    4.31   	dep r14=0,r14,KERNEL_TR_PAGE_SHIFT,64-KERNEL_TR_PAGE_SHIFT
    4.32  +#ifdef XEN
    4.33 -+	dep r17=-1,r17,50,14
    4.34 -+	dep sp=-1,sp,50,14
    4.35 ++	dep r17=-1,r17,60,4
    4.36 ++	dep sp=-1,sp,60,4
    4.37  +#else
    4.38   	dep r17=-1,r17,61,3
    4.39   	dep sp=-1,sp,61,3
     5.1 --- a/xen/arch/ia64/patch/linux-2.6.7/ivt.S	Fri Apr 01 19:52:52 2005 +0000
     5.2 +++ b/xen/arch/ia64/patch/linux-2.6.7/ivt.S	Fri Apr 01 20:27:37 2005 +0000
     5.3 @@ -1,5 +1,5 @@
     5.4  --- ../../linux-2.6.7/arch/ia64/kernel/ivt.S	2004-06-15 23:18:59.000000000 -0600
     5.5 -+++ arch/ia64/ivt.S	2005-03-28 20:16:02.000000000 -0700
     5.6 ++++ arch/ia64/ivt.S	2005-04-01 12:56:01.000000000 -0700
     5.7  @@ -1,3 +1,21 @@
     5.8  +
     5.9  +#ifdef XEN
    5.10 @@ -99,10 +99,10 @@
    5.11  +#ifdef XEN
    5.12  +	;;
    5.13  +	// FIXME: inadequate test, this is where we test for Xen address
    5.14 -+	// note that 0xfffc (cached) and 0xdffc (uncached) addresses
    5.15 ++	// note that 0xf000 (cached) and 0xd000 (uncached) addresses
    5.16  +	// should be OK.  (Though no I/O is done in Xen, EFI needs uncached
    5.17  +	// addresses and some domain EFI calls are passed through)
    5.18 -+	tbit.nz p0,p8=r16,50
    5.19 ++	tbit.nz p0,p8=r16,60
    5.20  +(p8)	br.cond.spnt page_fault
    5.21  +//(p8)	br.cond.spnt 0
    5.22  +	;;
     6.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     6.2 +++ b/xen/arch/ia64/patch/linux-2.6.7/mca_asm.h	Fri Apr 01 20:27:37 2005 +0000
     6.3 @@ -0,0 +1,32 @@
     6.4 +--- ../../linux-2.6.7/include/asm-ia64/mca_asm.h	2004-06-15 23:20:03.000000000 -0600
     6.5 ++++ include/asm-ia64/mca_asm.h	2005-04-01 12:56:37.000000000 -0700
     6.6 +@@ -26,8 +26,13 @@
     6.7 +  * direct mapped to physical addresses.
     6.8 +  *	1. Lop off bits 61 thru 63 in the virtual address
     6.9 +  */
    6.10 ++#ifdef XEN
    6.11 ++#define INST_VA_TO_PA(addr)							\
    6.12 ++	dep	addr	= 0, addr, 60, 4
    6.13 ++#else // XEN
    6.14 + #define INST_VA_TO_PA(addr)							\
    6.15 + 	dep	addr	= 0, addr, 61, 3
    6.16 ++#endif // XEN
    6.17 + /*
    6.18 +  * This macro converts a data virtual address to a physical address
    6.19 +  * Right now for simulation purposes the virtual addresses are
    6.20 +@@ -42,9 +47,15 @@
    6.21 +  * direct mapped to physical addresses.
    6.22 +  *	1. Put 0x7 in bits 61 thru 63.
    6.23 +  */
    6.24 ++#ifdef XEN
    6.25 ++#define DATA_PA_TO_VA(addr,temp)							\
    6.26 ++	mov	temp	= 0xf	;;							\
    6.27 ++	dep	addr	= temp, addr, 60, 4
    6.28 ++#else // XEN
    6.29 + #define DATA_PA_TO_VA(addr,temp)							\
    6.30 + 	mov	temp	= 0x7	;;							\
    6.31 + 	dep	addr	= temp, addr, 61, 3
    6.32 ++#endif // XEN
    6.33 + 
    6.34 + /*
    6.35 +  * This macro jumps to the instruction at the given virtual address
     7.1 --- a/xen/arch/ia64/patch/linux-2.6.7/minstate.h	Fri Apr 01 19:52:52 2005 +0000
     7.2 +++ b/xen/arch/ia64/patch/linux-2.6.7/minstate.h	Fri Apr 01 20:27:37 2005 +0000
     7.3 @@ -1,14 +1,29 @@
     7.4 ---- /home/djm/src/xen/xeno-ia64.bk/xen/linux-2.6.7/arch/ia64/kernel/minstate.h	2004-06-15 23:19:52.000000000 -0600
     7.5 -+++ /home/djm/src/xen/xeno-ia64.bk/xen/arch/ia64/minstate.h	2004-12-15 16:36:00.000000000 -0700
     7.6 -@@ -3,6 +3,11 @@
     7.7 - #include <asm/cache.h>
     7.8 +--- ../../linux-2.6.7/arch/ia64/kernel/minstate.h	2004-06-15 23:19:52.000000000 -0600
     7.9 ++++ arch/ia64/minstate.h	2005-04-01 12:56:01.000000000 -0700
    7.10 +@@ -45,7 +45,7 @@
    7.11 + (pKStk) tpa r1=sp;				/* compute physical addr of sp	*/		\
    7.12 + (pUStk)	addl r1=IA64_STK_OFFSET-IA64_PT_REGS_SIZE,r1;	/* compute base of memory stack */	\
    7.13 + (pUStk)	mov r23=ar.bspstore;				/* save ar.bspstore */			\
    7.14 +-(pUStk)	dep r22=-1,r22,61,3;			/* compute kernel virtual addr of RBS */	\
    7.15 ++(pUStk)	dep r22=-1,r22,60,4;			/* compute kernel virtual addr of RBS */	\
    7.16 + 	;;											\
    7.17 + (pKStk) addl r1=-IA64_PT_REGS_SIZE,r1;		/* if in kernel mode, use sp (r12) */		\
    7.18 + (pUStk)	mov ar.bspstore=r22;			/* switch to kernel RBS */			\
    7.19 +@@ -65,7 +65,7 @@
    7.20 + #endif
    7.21   
    7.22 - #include "entry.h"
    7.23 -+#ifdef XEN
    7.24 -+//this can be removed when offsets.h is properly generated
    7.25 -+#undef IA64_TASK_THREAD_ON_USTACK_OFFSET
    7.26 -+#define IA64_TASK_THREAD_ON_USTACK_OFFSET 0x34
    7.27 -+#endif
    7.28 - 
    7.29 - /*
    7.30 -  * For ivt.s we want to access the stack virtually so we don't have to disable translation
    7.31 + #ifdef MINSTATE_PHYS
    7.32 +-# define MINSTATE_GET_CURRENT(reg)	mov reg=IA64_KR(CURRENT);; dep reg=0,reg,61,3
    7.33 ++# define MINSTATE_GET_CURRENT(reg)	mov reg=IA64_KR(CURRENT);; dep reg=0,reg,60,4
    7.34 + # define MINSTATE_START_SAVE_MIN	MINSTATE_START_SAVE_MIN_PHYS
    7.35 + # define MINSTATE_END_SAVE_MIN		MINSTATE_END_SAVE_MIN_PHYS
    7.36 + #endif
    7.37 +@@ -172,7 +172,7 @@
    7.38 + 	;;											\
    7.39 + .mem.offset 0,0; st8.spill [r16]=r15,16;							\
    7.40 + .mem.offset 8,0; st8.spill [r17]=r14,16;							\
    7.41 +-	dep r14=-1,r0,61,3;									\
    7.42 ++	dep r14=-1,r0,60,4;									\
    7.43 + 	;;											\
    7.44 + .mem.offset 0,0; st8.spill [r16]=r2,16;								\
    7.45 + .mem.offset 8,0; st8.spill [r17]=r3,16;								\
     8.1 --- a/xen/arch/ia64/patch/linux-2.6.7/page.h	Fri Apr 01 19:52:52 2005 +0000
     8.2 +++ b/xen/arch/ia64/patch/linux-2.6.7/page.h	Fri Apr 01 20:27:37 2005 +0000
     8.3 @@ -1,5 +1,5 @@
     8.4  --- ../../linux-2.6.7/include/asm-ia64/page.h	2004-06-15 23:18:58.000000000 -0600
     8.5 -+++ include/asm-ia64/page.h	2005-03-23 14:54:11.000000000 -0700
     8.6 ++++ include/asm-ia64/page.h	2005-04-01 12:56:37.000000000 -0700
     8.7  @@ -12,6 +12,9 @@
     8.8   #include <asm/intrinsics.h>
     8.9   #include <asm/types.h>
    8.10 @@ -43,8 +43,8 @@
    8.11  +#ifdef XEN
    8.12  +typedef union xen_va {
    8.13  +	struct {
    8.14 -+		unsigned long off : 50;
    8.15 -+		unsigned long reg : 14;
    8.16 ++		unsigned long off : 60;
    8.17 ++		unsigned long reg : 4;
    8.18  +	} f;
    8.19  +	unsigned long l;
    8.20  +	void *p;
    8.21 @@ -67,7 +67,7 @@
    8.22   #endif /* !STRICT_MM_TYPECHECKS */
    8.23   
    8.24  +#ifdef XEN
    8.25 -+#define PAGE_OFFSET			0xfffc000000000000
    8.26 ++#define PAGE_OFFSET			0xf000000000000000
    8.27  +#else
    8.28   #define PAGE_OFFSET			0xe000000000000000
    8.29  +#endif
     9.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     9.2 +++ b/xen/arch/ia64/patch/linux-2.6.7/pal.S	Fri Apr 01 20:27:37 2005 +0000
     9.3 @@ -0,0 +1,26 @@
     9.4 +--- ../../linux-2.6.7/arch/ia64/kernel/pal.S	2004-06-15 23:20:25.000000000 -0600
     9.5 ++++ arch/ia64/pal.S	2005-04-01 12:56:01.000000000 -0700
     9.6 +@@ -163,7 +163,11 @@
     9.7 + 	adds r8  = 1f-1b,r8		// calculate return address for call
     9.8 + 	;;
     9.9 + 	mov loc4=ar.rsc			// save RSE configuration
    9.10 ++#ifdef XEN
    9.11 ++	dep.z loc2=loc2,0,60		// convert pal entry point to physical
    9.12 ++#else // XEN
    9.13 + 	dep.z loc2=loc2,0,61		// convert pal entry point to physical
    9.14 ++#endif // XEN
    9.15 + 	tpa r8=r8			// convert rp to physical
    9.16 + 	;;
    9.17 + 	mov b7 = loc2			// install target to branch reg
    9.18 +@@ -218,7 +222,11 @@
    9.19 + 	mov loc3 = psr		// save psr
    9.20 + 	;;
    9.21 + 	mov loc4=ar.rsc			// save RSE configuration
    9.22 ++#ifdef XEN
    9.23 ++	dep.z loc2=loc2,0,60		// convert pal entry point to physical
    9.24 ++#else // XEN
    9.25 + 	dep.z loc2=loc2,0,61		// convert pal entry point to physical
    9.26 ++#endif // XEN
    9.27 + 	;;
    9.28 + 	mov ar.rsc=0			// put RSE in enforced lazy, LE mode
    9.29 + 	movl r16=PAL_PSR_BITS_TO_CLEAR
    10.1 --- a/xen/arch/ia64/patch/linux-2.6.7/system.h	Fri Apr 01 19:52:52 2005 +0000
    10.2 +++ b/xen/arch/ia64/patch/linux-2.6.7/system.h	Fri Apr 01 20:27:37 2005 +0000
    10.3 @@ -1,15 +1,15 @@
    10.4 ---- ../../linux-2.6.7/include/asm-ia64/system.h	2005-01-31 11:15:23.000000000 -0700
    10.5 -+++ include/asm-ia64/system.h	2005-03-14 11:31:12.000000000 -0700
    10.6 +--- ../../linux-2.6.7/include/asm-ia64/system.h	2005-03-24 19:39:56.000000000 -0700
    10.7 ++++ include/asm-ia64/system.h	2005-04-01 12:56:37.000000000 -0700
    10.8  @@ -24,8 +24,16 @@
    10.9    * 0xa000000000000000+2*PERCPU_PAGE_SIZE
   10.10    * - 0xa000000000000000+3*PERCPU_PAGE_SIZE remain unmapped (guard page)
   10.11    */
   10.12  +#ifdef XEN
   10.13 -+//#define KERNEL_START		 0xfffc000100000000
   10.14 -+#define KERNEL_START		 0xfffc000004000000
   10.15 -+#define PERCPU_ADDR		 0xfffd000000000000-PERCPU_PAGE_SIZE
   10.16 -+#define SHAREDINFO_ADDR		 0xfffd000000000000
   10.17 -+#define VHPT_ADDR		 0xfffe000000000000
   10.18 ++//#define KERNEL_START		 0xf000000100000000
   10.19 ++#define KERNEL_START		 0xf000000004000000
   10.20 ++#define PERCPU_ADDR		 0xf100000000000000-PERCPU_PAGE_SIZE
   10.21 ++#define SHAREDINFO_ADDR		 0xf100000000000000
   10.22 ++#define VHPT_ADDR		 0xf200000000000000
   10.23  +#else
   10.24   #define KERNEL_START		 0xa000000100000000
   10.25   #define PERCPU_ADDR		(-PERCPU_PAGE_SIZE)
    11.1 --- a/xen/arch/ia64/tools/mkbuildtree	Fri Apr 01 19:52:52 2005 +0000
    11.2 +++ b/xen/arch/ia64/tools/mkbuildtree	Fri Apr 01 20:27:37 2005 +0000
    11.3 @@ -112,7 +112,8 @@ softlink arch/ia64/kernel/ia64_ksyms.c a
    11.4  softlink arch/ia64/kernel/irq_lsapic.c arch/ia64/irq_lsapic.c
    11.5  softlink arch/ia64/kernel/machvec.c arch/ia64/machvec.c
    11.6  softlink arch/ia64/mm/extable.c arch/ia64/extable.c
    11.7 -softlink arch/ia64/kernel/pal.S arch/ia64/pal.S
    11.8 +#softlink arch/ia64/kernel/pal.S arch/ia64/pal.S
    11.9 +cp_patch arch/ia64/kernel/pal.S arch/ia64/pal.S pal.S
   11.10  softlink arch/ia64/kernel/patch.c arch/ia64/patch.c
   11.11  softlink arch/ia64/kernel/sal.c arch/ia64/sal.c
   11.12  softlink arch/ia64/kernel/minstate.h arch/ia64/minstate.h
   11.13 @@ -213,7 +214,8 @@ softlink include/asm-ia64/ioctl.h includ
   11.14  softlink include/asm-ia64/linkage.h include/asm-ia64/linkage.h
   11.15  softlink include/asm-ia64/machvec.h include/asm-ia64/machvec.h
   11.16  softlink include/asm-ia64/machvec_hpsim.h include/asm-ia64/machvec_hpsim.h
   11.17 -softlink include/asm-ia64/mca_asm.h include/asm-ia64/mca_asm.h
   11.18 +#softlink include/asm-ia64/mca_asm.h include/asm-ia64/mca_asm.h
   11.19 +cp_patch include/asm-ia64/mca_asm.h include/asm-ia64/mca_asm.h mca_asm.h
   11.20  softlink include/asm-ia64/mca.h include/asm-ia64/mca.h
   11.21  softlink include/asm-ia64/meminit.h include/asm-ia64/meminit.h
   11.22  softlink include/asm-ia64/mman.h include/asm-ia64/mman.h
    12.1 --- a/xen/arch/ia64/xenasm.S	Fri Apr 01 19:52:52 2005 +0000
    12.2 +++ b/xen/arch/ia64/xenasm.S	Fri Apr 01 20:27:37 2005 +0000
    12.3 @@ -132,7 +132,7 @@ 1:
    12.4  (p7)	br.cond.sptk	.stack_overlaps
    12.5  	;;
    12.6  	movl r25=PAGE_KERNEL
    12.7 -	dep r20=0,r13,50,14		// physical address of "current"
    12.8 +	dep r20=0,r13,60,4		// physical address of "current"
    12.9  	;;
   12.10  	or r23=r25,r20			// construct PA | page properties
   12.11  	mov r25=IA64_GRANULE_SHIFT<<2