From 50c363d07e2a72b73bacde9136ab9de9616f7830 Mon Sep 17 00:00:00 2001 From: henryk Date: Wed, 21 Nov 2007 05:40:46 +0000 Subject: Add tragically failed (and commented out) attempt to remap ram to addr 0 git-svn-id: https://svn.openpcd.org:2342/trunk@341 6dc7ffe9-61d6-0310-9af1-9938baff3ed1 --- openpicc/os/boot/boot.s | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'openpicc') diff --git a/openpicc/os/boot/boot.s b/openpicc/os/boot/boot.s index cbd9be7..f75bed1 100644 --- a/openpicc/os/boot/boot.s +++ b/openpicc/os/boot/boot.s @@ -40,6 +40,7 @@ .equ F_BIT, 0x40 /* when F bit is set, FIQ is disabled */ .equ AT91C_BASE_AIC, (0xFFFFF000) +.equ AT91C_BASE_MC, (0xFFFFFF00) .equ AT91C_BASE_PIOA, 0xFFFFF400 .equ AT91C_BASE_TC0, 0xFFFA0000 .equ AT91C_TC_SWTRG, (1 << 2) @@ -53,6 +54,7 @@ .equ AIC_EOICR, (304) /*.equ PIO_LED1, (1 << 25)*/ .equ PIO_LED1, (1 << 12) +.equ MC_RCR, 0xFFFFFF00 start: _start: @@ -126,12 +128,26 @@ _mainCRTStartup: .end_set_loop: + /* Load absolute address and jump there to get from pc=0x0000... to pc=0x0010... */ + ldr lr, _here + bx lr + +.here: + /* Perform remap FIXME doesn't work (not even the absolute jump above seems to help)*/ + /*ldr r0, =AT91C_BASE_MC + mov r1, #0x01 + str r1, [r0, #0]*/ + + /* call main */ mov r0, #0 /* no arguments */ mov r1, #0 /* no argv either */ ldr lr, =main bx lr +_here: + .word .here + endless_loop: b endless_loop -- cgit v1.2.3