summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorMichal Simek <monstr@monstr.eu>2010-11-15 09:54:43 +0000
committerMichal Simek <monstr@monstr.eu>2011-10-03 08:01:56 +0200
commitf3090fce77202a867ae23d0df91a2b54ed9ee6e4 (patch)
treec6a54f4c8d2e64c762ec006d17c0438c818ec12f /arch
parent86c1b2a86b59f3050413e78bfe40196ac3334c13 (diff)
downloadu-boot-imx-f3090fce77202a867ae23d0df91a2b54ed9ee6e4.zip
u-boot-imx-f3090fce77202a867ae23d0df91a2b54ed9ee6e4.tar.gz
u-boot-imx-f3090fce77202a867ae23d0df91a2b54ed9ee6e4.tar.bz2
microblaze: Save and restore first unused vector
Use one memory space to detect little/big endian platforms. The first unused address(0x28) is used instead 0x0 address (reset vectors). Detection rewrited reset vector setup from first stage bootloader. Workflow: 1. Store 0x28 to r7 2. Do little/big endian test 3. Restore r7 to 0x28 Signed-off-by: Michal Simek <monstr@monstr.eu>
Diffstat (limited to 'arch')
-rw-r--r--arch/microblaze/cpu/start.S6
1 files changed, 4 insertions, 2 deletions
diff --git a/arch/microblaze/cpu/start.S b/arch/microblaze/cpu/start.S
index 17c0e28..42104fa 100644
--- a/arch/microblaze/cpu/start.S
+++ b/arch/microblaze/cpu/start.S
@@ -51,8 +51,10 @@ _start:
* 4b) BIG endian - r10 contains 0x0 because 0x2 offset is on addr 0x3
*/
addik r6, r0, 0x2 /* BIG/LITTLE endian offset */
- swi r6, r0, 0
- lbui r10, r0, 0
+ lwi r7, r0, 0x28
+ swi r6, r0, 0x28 /* used first unused MB vector */
+ lbui r10, r0, 0x28 /* used first unused MB vector */
+ swi r7, r0, 0x28
/* add opcode instruction for 32bit jump - 2 instruction imm & brai */
addi r2, r0, 0xb0000000 /* hex b000 opcode imm */