diff options
Diffstat (limited to 'libgloss')
-rw-r--r-- | libgloss/m68k/fido-crt0.S | 13 | ||||
-rw-r--r-- | libgloss/m68k/fido.sc | 24 |
2 files changed, 24 insertions, 13 deletions
diff --git a/libgloss/m68k/fido-crt0.S b/libgloss/m68k/fido-crt0.S index 1a585367d..89910514d 100644 --- a/libgloss/m68k/fido-crt0.S +++ b/libgloss/m68k/fido-crt0.S @@ -239,12 +239,15 @@ SYM (_start): bgt .LdataCopyLoop #endif /* ROM */ +#ifdef FIDO_ram + /* For ROM configs, the linker script ensures that + _vector_table is placed at the proper place. For RAM + configs, we have to adjust it ourselves. */ + movel IMM (SYM (_vector_table)), FIDO_CTX0_VBR +#endif + #ifndef FIDO_redboot -/* - * Setup interrupt vectors for secondary contexts. We do not need to - * worry about _vector_table, since the linker script ensures that - * _vector_table is placed at the proper place. - */ + /* Setup interrupt vectors for secondary contexts. */ movel IMM (SYM (_vector_table1)), FIDO_CTX1_VBR movel IMM (SYM (_vector_table2)), FIDO_CTX2_VBR movel IMM (SYM (_vector_table3)), FIDO_CTX3_VBR diff --git a/libgloss/m68k/fido.sc b/libgloss/m68k/fido.sc index 30ce508ad..07aa6e366 100644 --- a/libgloss/m68k/fido.sc +++ b/libgloss/m68k/fido.sc @@ -1,5 +1,9 @@ -SRAM_ORIGIN=0x3000000 -SRAM_LENGTH=0x100000 +SRAM_ORIGIN=0x03000000 +SRAM_LENGTH=0x00100000 + +# HEAPEND must be in the same memory region as DATA. STACK should be +# above HEAPEND, also in the same region, for configurations which +# need __stack. case $MODE in rom) @@ -7,29 +11,33 @@ case $MODE in TEXT=rom DATA=sram DATALOAD="rom" - STACK=0x30ffffc + STACK=0x030ffffc HEAPEND=0x03080000 ;; sram) CRT0=ram TEXT=sram DATA=sdram - STACK=0x30ffffc - HEAPEND=0x03080000 + STACK=0x021ffffc + HEAPEND=0x02180000 + # Leave the rest of SDRAM for manual use. ;; sdram) CRT0=ram TEXT=sdram DATA=sdram - STACK=0x30ffffc - HEAPEND=0x03080000 + STACK=0x021ffffc + HEAPEND=0x02180000 + # Leave the rest of SDRAM for manual use. ;; redboot) CRT0=redboot # We need to avoid the area used by RedBoot SRAM_ORIGIN=0x3080000 SRAM_LENGTH=0x80000 - TEXT=sdram + # Put code for RedBoot apps in SRAM, since the fido1100 has + # trouble running code from SDRAM. + TEXT=sram DATA=sdram STACK=0 HEAPEND=0x027f0000 |