source: cpu/arm/mmp2/rawboot.fth

Last change on this file was 2243, checked in by wmb, 4 years ago

OLPC XO-1.75 - Moved the page table into the firmware RAM area, so the only precious thing in low memory is the vector table. This makes it easier to test memory.

File size: 852 bytes
Line 
1\ This is some glue code to convert the machine setup that QEMU gives us
2\ to the setup that start-forth (see arm/boot.fth) wants.
3\ We get here via a call instruction at origin+8, which is inserted below
4
5label stand-cold-code    ( r0: 0  r1: board-id  r2: &kernel-args  lr: &aif_header+8c )
6   here  origin 8 +  put-call  \ Insert call instruction
7
8   \ Put the arguments in safe registers
9   sub   r6,lr,#0x8c        \ r6 points to header (lr set by code at origin)
10   mov   r7,#0              \ r7: functions
11   add   r8,r6,`stack-offset`    \ r8: memtop - 2MiB above load address
12                            \ r9 is up
13   mov   r10,#0             \ r10: argc
14   mov   r11,r2             \ r11: argv (kernel args)
15   mov   r12,`initial-heap-size`  \ r12: initial-heap-size
16
17   b     'code start-forth  \ Branch to the generic startup code
18end-code
Note: See TracBrowser for help on using the repository browser.