rte_nb85e_cb-multi.ld 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. /* Linker script for the Midas labs RTE-NB85E-CB evaluation board
  2. (CONFIG_RTE_CB_NB85E), with the Multi debugger ROM monitor . */
  3. MEMORY {
  4. /* 1MB of SRAM; we can't use the last 96KB, because it's used by
  5. the monitor scratch-RAM. This memory is mirrored 4 times. */
  6. SRAM : ORIGIN = SRAM_ADDR, LENGTH = (SRAM_SIZE - MON_SCRATCH_SIZE)
  7. /* Monitor scratch RAM; only the interrupt vectors should go here. */
  8. MRAM : ORIGIN = MON_SCRATCH_ADDR, LENGTH = MON_SCRATCH_SIZE
  9. /* 16MB of SDRAM. */
  10. SDRAM : ORIGIN = SDRAM_ADDR, LENGTH = SDRAM_SIZE
  11. }
  12. #ifdef CONFIG_RTE_CB_NB85E_KSRAM
  13. # define KRAM SRAM
  14. #else
  15. # define KRAM SDRAM
  16. #endif
  17. SECTIONS {
  18. /* We can't use RAMK_KRAM_CONTENTS because that puts the whole
  19. kernel in a single ELF segment, and the Multi debugger (which
  20. we use to load the kernel) appears to have bizarre problems
  21. dealing with it. */
  22. .text : {
  23. __kram_start = . ;
  24. TEXT_CONTENTS
  25. } > KRAM
  26. .data : {
  27. DATA_CONTENTS
  28. BSS_CONTENTS
  29. RAMK_INIT_CONTENTS
  30. __kram_end = . ;
  31. BOOTMAP_CONTENTS
  32. /* The address at which the interrupt vectors are initially
  33. loaded by the loader. We can't load the interrupt vectors
  34. directly into their target location, because the monitor
  35. ROM for the GHS Multi debugger barfs if we try.
  36. Unfortunately, Multi also doesn't deal correctly with ELF
  37. sections where the LMA and VMA differ (it just ignores the
  38. LMA), so we can't use that feature to work around the
  39. problem! What we do instead is just put the interrupt
  40. vectors into a normal section, and have the
  41. `mach_early_init' function for Midas boards do the
  42. necessary copying and relocation at runtime (this section
  43. basically only contains `jr' instructions, so it's not
  44. that hard). */
  45. . = ALIGN (0x10) ;
  46. __intv_load_start = . ;
  47. INTV_CONTENTS
  48. } > KRAM
  49. .root ALIGN (4096) : { ROOT_FS_CONTENTS } > SDRAM
  50. }