diff options
Diffstat (limited to 'cpu/mpc8260/start.S')
| -rw-r--r-- | cpu/mpc8260/start.S | 15 | 
1 files changed, 9 insertions, 6 deletions
| diff --git a/cpu/mpc8260/start.S b/cpu/mpc8260/start.S index 7d80af5ac..1fc70bc5e 100644 --- a/cpu/mpc8260/start.S +++ b/cpu/mpc8260/start.S @@ -56,7 +56,7 @@  /*   * Set up GOT: Global Offset Table   * - * Use r14 to access the GOT + * Use r12 to access the GOT   */  	START_GOT  	GOT_ENTRY(_GOT2_TABLE_) @@ -650,7 +650,9 @@ init_debug:  	/* RAM should now be operational */  #define VEC_WRD_CNT	((_end_of_vectors - _start + EXC_OFF_SYS_RESET) / 4) - +	mflr	r3 +	GET_GOT +	mtlr	r3  	lwz	r3, GOT(_end_of_vectors)  	rlwinm	r4, r3, 0, 18, 31	/* _end_of_vectors & 0x3FFF	*/  	lis	r5, VEC_WRD_CNT@h @@ -792,6 +794,7 @@ relocate_code:  	mr	r9,  r4		/* Save copy of Global Data pointer	*/  	mr	r10, r5		/* Save copy of Destination Address	*/ +	GET_GOT  	mr	r3,  r5				/* Destination Address	*/  	lis	r4, CONFIG_SYS_MONITOR_BASE@h		/* Source      Address	*/  	ori	r4, r4, CONFIG_SYS_MONITOR_BASE@l @@ -809,7 +812,7 @@ relocate_code:  	sub	r15, r10, r4  	/* First our own GOT */ -	add	r14, r14, r15 +	add	r12, r12, r15  	/* then the one used by the C code */  	add	r30, r30, r15 @@ -882,7 +885,7 @@ relocate_code:  in_ram:  	/* -	 * Relocation Function, r14 point to got2+0x8000 +	 * Relocation Function, r12 point to got2+0x8000  	 *  	 * Adjust got2 pointers, no need to check for 0, this code  	 * already puts a few entries in the table. @@ -958,6 +961,8 @@ clear_bss:  	 */  	.globl	trap_init  trap_init: +	mflr	r4			/* save link register		*/ +	GET_GOT  	lwz	r7, GOT(_start)  	lwz	r8, GOT(_end_of_vectors) @@ -965,8 +970,6 @@ trap_init:  	cmplw	0, r7, r8  	bgelr				/* return if r7>=r8 - just in case */ - -	mflr	r4			/* save link register		*/  1:  	lwz	r0, 0(r7)  	stw	r0, 0(r9) |