diff options
| -rw-r--r-- | README | 4 | ||||
| -rw-r--r-- | cpu/74xx_7xx/config.mk | 2 | ||||
| -rw-r--r-- | cpu/mpc512x/config.mk | 2 | ||||
| -rw-r--r-- | cpu/mpc5xx/config.mk | 2 | ||||
| -rw-r--r-- | cpu/mpc5xxx/config.mk | 2 | ||||
| -rw-r--r-- | cpu/mpc8220/config.mk | 2 | ||||
| -rw-r--r-- | cpu/mpc824x/config.mk | 2 | ||||
| -rw-r--r-- | cpu/mpc8260/config.mk | 2 | ||||
| -rw-r--r-- | cpu/mpc83xx/config.mk | 2 | ||||
| -rw-r--r-- | cpu/mpc85xx/config.mk | 3 | ||||
| -rw-r--r-- | cpu/mpc86xx/config.mk | 2 | ||||
| -rw-r--r-- | cpu/mpc86xx/start.S | 2 | ||||
| -rw-r--r-- | cpu/mpc8xx/config.mk | 2 | ||||
| -rw-r--r-- | cpu/ppc4xx/config.mk | 2 | ||||
| -rw-r--r-- | doc/README.standalone | 2 | ||||
| -rw-r--r-- | examples/stubs.c | 4 | ||||
| -rw-r--r-- | examples/test_burst_lib.S | 2 | ||||
| -rw-r--r-- | examples/x86-testapp.c | 6 | ||||
| -rw-r--r-- | include/asm-ppc/global_data.h | 2 | 
19 files changed, 24 insertions, 23 deletions
| @@ -3499,7 +3499,7 @@ GCC's implementation.  For PowerPC, the following registers have specific use:  	R1:	stack pointer -	R2:	TOC pointer +	R2:	reserved for system use  	R3-R4:	parameter passing and return values  	R5-R10: parameter passing  	R13:	small data area pointer @@ -3508,7 +3508,7 @@ For PowerPC, the following registers have specific use:  	(U-Boot also uses R14 as internal GOT pointer.) -    ==> U-Boot will use R29 to hold a pointer to the global data +    ==> U-Boot will use R2 to hold a pointer to the global data      Note: on PPC, we could use a static initializer (since the      address of the global data structure is known at compile time), diff --git a/cpu/74xx_7xx/config.mk b/cpu/74xx_7xx/config.mk index 417d99f33..324f62b83 100644 --- a/cpu/74xx_7xx/config.mk +++ b/cpu/74xx_7xx/config.mk @@ -23,4 +23,4 @@  PLATFORM_RELFLAGS += -fPIC -ffixed-r14 -meabi -fno-strict-aliasing -PLATFORM_CPPFLAGS += -DCONFIG_74xx_7xx -ffixed-r2 -ffixed-r29 -mstring +PLATFORM_CPPFLAGS += -DCONFIG_74xx_7xx -ffixed-r2 -mstring diff --git a/cpu/mpc512x/config.mk b/cpu/mpc512x/config.mk index 8a07c5a3b..5b7e1f268 100644 --- a/cpu/mpc512x/config.mk +++ b/cpu/mpc512x/config.mk @@ -22,4 +22,4 @@  PLATFORM_RELFLAGS += -fPIC -ffixed-r14 -meabi  PLATFORM_CPPFLAGS += -DCONFIG_MPC512X -DCONFIG_E300 \ -			-ffixed-r2 -ffixed-r29 -msoft-float -mcpu=603e +			-ffixed-r2 -msoft-float -mcpu=603e diff --git a/cpu/mpc5xx/config.mk b/cpu/mpc5xx/config.mk index 64cd60071..6d66c32be 100644 --- a/cpu/mpc5xx/config.mk +++ b/cpu/mpc5xx/config.mk @@ -30,7 +30,7 @@  PLATFORM_RELFLAGS += 	-fPIC -ffixed-r14 -meabi -PLATFORM_CPPFLAGS +=	-DCONFIG_5xx -ffixed-r2 -ffixed-r29 -mpowerpc -msoft-float +PLATFORM_CPPFLAGS +=	-DCONFIG_5xx -ffixed-r2 -mpowerpc -msoft-float  # Use default linker script.  Board port can override in board/*/config.mk  LDSCRIPT := $(SRCTREE)/cpu/mpc5xx/u-boot.lds diff --git a/cpu/mpc5xxx/config.mk b/cpu/mpc5xxx/config.mk index 0df51babd..b0ce2ee9e 100644 --- a/cpu/mpc5xxx/config.mk +++ b/cpu/mpc5xxx/config.mk @@ -23,7 +23,7 @@  PLATFORM_RELFLAGS += -fPIC -ffixed-r14 -meabi -PLATFORM_CPPFLAGS += -DCONFIG_MPC5xxx -ffixed-r2 -ffixed-r29 \ +PLATFORM_CPPFLAGS += -DCONFIG_MPC5xxx -ffixed-r2 \  		     -mstring -mcpu=603e -mmultiple  # Use default linker script.  Board port can override in board/*/config.mk diff --git a/cpu/mpc8220/config.mk b/cpu/mpc8220/config.mk index 8e3ba5428..5819048d0 100644 --- a/cpu/mpc8220/config.mk +++ b/cpu/mpc8220/config.mk @@ -23,7 +23,7 @@  PLATFORM_RELFLAGS += -fPIC -ffixed-r14 -meabi -PLATFORM_CPPFLAGS += -DCONFIG_MPC8220 -ffixed-r2 -ffixed-r29 \ +PLATFORM_CPPFLAGS += -DCONFIG_MPC8220 -ffixed-r2 \  		     -mstring -mcpu=603e -mmultiple  # Use default linker script.  Board port can override in board/*/config.mk diff --git a/cpu/mpc824x/config.mk b/cpu/mpc824x/config.mk index 66207f435..1bb0487bd 100644 --- a/cpu/mpc824x/config.mk +++ b/cpu/mpc824x/config.mk @@ -23,7 +23,7 @@  PLATFORM_RELFLAGS += -fPIC -ffixed-r14 -meabi -fno-strict-aliasing -PLATFORM_CPPFLAGS += -DCONFIG_MPC824X -ffixed-r2 -ffixed-r29 -mstring -mcpu=603e -msoft-float +PLATFORM_CPPFLAGS += -DCONFIG_MPC824X -ffixed-r2 -mstring -mcpu=603e -msoft-float  # Use default linker script.  Board port can override in board/*/config.mk  LDSCRIPT := $(SRCTREE)/cpu/mpc824x/u-boot.lds diff --git a/cpu/mpc8260/config.mk b/cpu/mpc8260/config.mk index 683b6fbf2..2cb027093 100644 --- a/cpu/mpc8260/config.mk +++ b/cpu/mpc8260/config.mk @@ -23,7 +23,7 @@  PLATFORM_RELFLAGS += -fPIC -ffixed-r14 -meabi -PLATFORM_CPPFLAGS += -DCONFIG_8260 -DCONFIG_CPM2 -ffixed-r2 -ffixed-r29 \ +PLATFORM_CPPFLAGS += -DCONFIG_8260 -DCONFIG_CPM2 -ffixed-r2 \  		     -mstring -mcpu=603e -mmultiple  # Use default linker script.  Board port can override in board/*/config.mk diff --git a/cpu/mpc83xx/config.mk b/cpu/mpc83xx/config.mk index ecf8a60bb..2f0f1ce1e 100644 --- a/cpu/mpc83xx/config.mk +++ b/cpu/mpc83xx/config.mk @@ -23,7 +23,7 @@  PLATFORM_RELFLAGS += -fPIC -ffixed-r14 -meabi  PLATFORM_CPPFLAGS += -DCONFIG_MPC83XX -DCONFIG_E300 \ -			-ffixed-r2 -ffixed-r29 -msoft-float +			-ffixed-r2 -msoft-float  # Use default linker script.  Board port can override in board/*/config.mk  LDSCRIPT := $(SRCTREE)/cpu/mpc83xx/u-boot.lds diff --git a/cpu/mpc85xx/config.mk b/cpu/mpc85xx/config.mk index 612107434..f6df702e5 100644 --- a/cpu/mpc85xx/config.mk +++ b/cpu/mpc85xx/config.mk @@ -23,4 +23,5 @@  PLATFORM_RELFLAGS += -fPIC -ffixed-r14 -meabi -PLATFORM_CPPFLAGS += -DCONFIG_MPC85xx -DCONFIG_E500 -ffixed-r2 -ffixed-r29 -Wa,-me500 -msoft-float -mno-string +PLATFORM_CPPFLAGS += -DCONFIG_MPC85xx -DCONFIG_E500 -ffixed-r2 \ +			-Wa,-me500 -msoft-float -mno-string diff --git a/cpu/mpc86xx/config.mk b/cpu/mpc86xx/config.mk index 3c54f4ad3..d767269ad 100644 --- a/cpu/mpc86xx/config.mk +++ b/cpu/mpc86xx/config.mk @@ -23,4 +23,4 @@  PLATFORM_RELFLAGS += -fPIC -ffixed-r14 -meabi -PLATFORM_CPPFLAGS += -DCONFIG_MPC86xx -ffixed-r2 -ffixed-r29 -mstring +PLATFORM_CPPFLAGS += -DCONFIG_MPC86xx -ffixed-r2 -mstring diff --git a/cpu/mpc86xx/start.S b/cpu/mpc86xx/start.S index fa9736bce..09f4ceedb 100644 --- a/cpu/mpc86xx/start.S +++ b/cpu/mpc86xx/start.S @@ -723,7 +723,7 @@ relocate_code:  	mr	r1,  r3		/* Set new stack pointer		*/  	mr	r9,  r4		/* Save copy of Global Data pointer	*/ -	mr	r29, r9		/* Save for DECLARE_GLOBAL_DATA_PTR	*/ +	mr	r2,  r9		/* Save for DECLARE_GLOBAL_DATA_PTR	*/  	mr	r10, r5		/* Save copy of Destination Address	*/  	mr	r3,  r5				/* Destination Address	*/ diff --git a/cpu/mpc8xx/config.mk b/cpu/mpc8xx/config.mk index bfa6625fa..6031e7f76 100644 --- a/cpu/mpc8xx/config.mk +++ b/cpu/mpc8xx/config.mk @@ -23,4 +23,4 @@  PLATFORM_RELFLAGS += -fPIC -ffixed-r14 -meabi -fno-strict-aliasing -PLATFORM_CPPFLAGS += -DCONFIG_8xx -ffixed-r2 -ffixed-r29 -mstring -mcpu=860 -msoft-float +PLATFORM_CPPFLAGS += -DCONFIG_8xx -ffixed-r2 -mstring -mcpu=860 -msoft-float diff --git a/cpu/ppc4xx/config.mk b/cpu/ppc4xx/config.mk index 4fd510899..311c97b73 100644 --- a/cpu/ppc4xx/config.mk +++ b/cpu/ppc4xx/config.mk @@ -22,7 +22,7 @@  #  PLATFORM_RELFLAGS += -fPIC -ffixed-r14 -meabi -fno-strict-aliasing -PLATFORM_CPPFLAGS += -DCONFIG_4xx -ffixed-r2 -ffixed-r29 -mstring -msoft-float +PLATFORM_CPPFLAGS += -DCONFIG_4xx -ffixed-r2 -mstring -msoft-float  cfg=$(shell grep configs $(OBJTREE)/include/config.h | sed 's/.*<\(configs.*\)>/\1/')  is440=$(shell grep CONFIG_440 $(TOPDIR)/include/$(cfg)) diff --git a/doc/README.standalone b/doc/README.standalone index 39988317e..f9237a65f 100644 --- a/doc/README.standalone +++ b/doc/README.standalone @@ -21,7 +21,7 @@ Design Notes on Exporting U-Boot Functions to Standalone Applications:  2. The pointer to the jump table is passed to the application in a     machine-dependent way. PowerPC, ARM and MIPS architectures use a     dedicated register to hold the pointer to the 'global_data' -   structure: r29 on PowerPC, r8 on ARM and k0 on MIPS. The x86 +   structure: r2 on PowerPC, r8 on ARM and k0 on MIPS. The x86     architecture does not use such a register; instead, the pointer to     the 'global_data' structure is passed as 'argv[-1]' pointer. diff --git a/examples/stubs.c b/examples/stubs.c index 571c4d50a..9b3cadde3 100644 --- a/examples/stubs.c +++ b/examples/stubs.c @@ -25,14 +25,14 @@ gd_t *global_data;  	: : "i"(XF_ ## x * sizeof(void *)) : "eax", "ecx");  #elif defined(CONFIG_PPC)  /* - * r29 holds the pointer to the global_data, r11 is a call-clobbered + * r2 holds the pointer to the global_data, r11 is a call-clobbered   * register   */  #define EXPORT_FUNC(x) \  	asm volatile (			\  "	.globl " #x "\n"		\  #x ":\n"				\ -"	lwz	%%r11, %0(%%r29)\n"	\ +"	lwz	%%r11, %0(%%r2)\n"	\  "	lwz	%%r11, %1(%%r11)\n"	\  "	mtctr	%%r11\n"		\  "	bctr\n"				\ diff --git a/examples/test_burst_lib.S b/examples/test_burst_lib.S index 5bb498142..aef4e3242 100644 --- a/examples/test_burst_lib.S +++ b/examples/test_burst_lib.S @@ -70,7 +70,7 @@ mmu_init:  	 * we can load the instruction and data TLB registers with the  	 * same values.  	 */ -	lwz	r9,20(r29)		/* gd->ram_size */ +	lwz	r9,20(r2)		/* gd->ram_size */  	addis	r9,r9,-0x80  	mr	r8, r9			/* Higher 8 Meg in SDRAM */ diff --git a/examples/x86-testapp.c b/examples/x86-testapp.c index a1ab319ae..e8603d9ba 100644 --- a/examples/x86-testapp.c +++ b/examples/x86-testapp.c @@ -30,11 +30,11 @@ asm volatile (						\  asm volatile (						\  "	.globl mon_" #x "\n"				\  "mon_" #x ":\n"						\ -"	lwz	%%r11, %0(%%r29)\n"			\ +"	lwz	%%r11, %0(%%r2)\n"			\  "	lwz	%%r11, %1(%%r11)\n"			\  "	mtctr	%%r11\n"				\  "	bctr\n"					\ -	: : "i"(offsetof(xxx_t, pfunc)), "i"(XF_ ## x * sizeof(void *)) : "r11", "r29"); +	: : "i"(offsetof(xxx_t, pfunc)), "i"(XF_ ## x * sizeof(void *)) : "r11", "r2");  #elif defined(__arm__)  #define EXPORT_FUNC(x)					\  asm volatile (						\ @@ -67,7 +67,7 @@ int main(void)  #if defined(__i386__)  	xxx_t *pq;  #elif defined(__powerpc__) -	register volatile xxx_t *pq asm("r29"); +	register volatile xxx_t *pq asm("r2");  #elif defined(__arm__)  	register volatile xxx_t *pq asm("r8");  #elif defined(__mips__) diff --git a/include/asm-ppc/global_data.h b/include/asm-ppc/global_data.h index aa6384c15..bacd02dad 100644 --- a/include/asm-ppc/global_data.h +++ b/include/asm-ppc/global_data.h @@ -163,7 +163,7 @@ typedef	struct	global_data {  #define	GD_FLG_SILENT	0x00004		/* Silent mode				*/  #if 1 -#define DECLARE_GLOBAL_DATA_PTR     register volatile gd_t *gd asm ("r29") +#define DECLARE_GLOBAL_DATA_PTR     register volatile gd_t *gd asm ("r2")  #else /* We could use plain global data, but the resulting code is bigger */  #define XTRN_DECLARE_GLOBAL_DATA_PTR	extern  #define DECLARE_GLOBAL_DATA_PTR     XTRN_DECLARE_GLOBAL_DATA_PTR \ |