diff options
| author | Michal Simek <michal.simek@amd.com> | 2022-06-24 14:15:00 +0200 | 
|---|---|---|
| committer | Michal Simek <michal.simek@amd.com> | 2022-06-24 14:15:00 +0200 | 
| commit | b6fe10afe99c708a1dbb2d01be084aca32521651 (patch) | |
| tree | b334343a1f01382f027fd7aebe8b0a30e112c3c8 | |
| parent | 986727ca11425942807e226fe50c16e4b223a4e5 (diff) | |
microblaze: Remove _start symbol handling at U-Boot start
Right now U-Boot runs all the time from the same address where it is loaded
but going to full relocation code starting address doesn't need to be fixed
and can be simply discovered from reading PC register. That's why use r20
to get PC address and subtract offset from the beginning to get starting
address.
Signed-off-by: Michal Simek <michal.simek@amd.com>
Link: https://lore.kernel.org/r/044b727c33dfbe662f68512d0da0775a4805f360.1655299267.git.michal.simek@amd.com
| -rw-r--r-- | arch/microblaze/cpu/start.S | 7 | 
1 files changed, 4 insertions, 3 deletions
| diff --git a/arch/microblaze/cpu/start.S b/arch/microblaze/cpu/start.S index c3d925c1d15..db3998f5450 100644 --- a/arch/microblaze/cpu/start.S +++ b/arch/microblaze/cpu/start.S @@ -14,15 +14,16 @@  	.global _start  _start:  	mts	rmsr, r0	/* disable cache */ +	mfs	r20, rpc +	addi	r20, r20, -4  	mts	rslr, r0 -	addi	r8, r0, _start -	mts	rshr, r8 +	mts	rshr, r20  #if defined(CONFIG_SPL_BUILD)  	addi	r1, r0, CONFIG_SPL_STACK_ADDR  #else -	add	r1, r0, r8 +	add	r1, r0, r20  #endif  	addi	r1, r1, -4	/* Decrement SP to top of memory */ | 
