diff options
author | Jörg Hohensohn <hohensoh@rockbox.org> | 2004-01-28 20:43:31 +0000 |
---|---|---|
committer | Jörg Hohensohn <hohensoh@rockbox.org> | 2004-01-28 20:43:31 +0000 |
commit | 7789f9804ebf8e4b2a89b7e1eefff1577f737e13 (patch) | |
tree | 03eb897a0d692ff0c56a0781a7c18a6edd81c716 /firmware | |
parent | bf4460e4778d789e4c9ae9035cebe446ec8abb02 (diff) |
preparation for running directly from flash ROM
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@4283 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware')
-rw-r--r-- | firmware/app.lds | 4 | ||||
-rw-r--r-- | firmware/crt0.S | 19 |
2 files changed, 23 insertions, 0 deletions
diff --git a/firmware/app.lds b/firmware/app.lds index 83a09a81d0..bacc645044 100644 --- a/firmware/app.lds +++ b/firmware/app.lds @@ -117,6 +117,10 @@ SECTIONS .data : { *(.data) + . = ALIGN(0x4); + _datacopy = .; /* dummy here, only for ROM based */ + _datastart = .; + _dataend = .; } > DRAM .rodata : diff --git a/firmware/crt0.S b/firmware/crt0.S index 99aab83867..088ea0aff4 100644 --- a/firmware/crt0.S +++ b/firmware/crt0.S @@ -112,6 +112,19 @@ copy_l: bf copy_l nop + /* copy the .data section, for rombased execution */ + mov.l datacopy_k,r0 + mov.l data_k,r1 + mov.l dataend_k,r2 +copy_l2: + mov.l @r0,r3 + mov.l r3,@r1 + add #4,r0 + add #4,r1 + cmp/ge r2,r1 + bf copy_l2 + nop + /* Munge the main thread stack */ mov.l stack_k,r2 mov.l deadbeef_k,r0 @@ -150,6 +163,12 @@ iram_k: .long _iramstart iramend_k: .long _iramend +datacopy_k: + .long _datacopy +data_k: + .long _datastart +dataend_k: + .long _dataend main_k: .long _main vbr_k: |