diff options
Diffstat (limited to 'firmware/target/mips/ingenic_x1000/spl.lds')
-rw-r--r-- | firmware/target/mips/ingenic_x1000/spl.lds | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/firmware/target/mips/ingenic_x1000/spl.lds b/firmware/target/mips/ingenic_x1000/spl.lds index 39b5939a6a..e8bf9d4700 100644 --- a/firmware/target/mips/ingenic_x1000/spl.lds +++ b/firmware/target/mips/ingenic_x1000/spl.lds | |||
@@ -1,23 +1,22 @@ | |||
1 | #include "config.h" | 1 | #include "config.h" |
2 | #include "cpu.h" | ||
2 | 3 | ||
3 | OUTPUT_FORMAT("elf32-littlemips") | 4 | OUTPUT_FORMAT("elf32-littlemips") |
4 | OUTPUT_ARCH(MIPS) | 5 | OUTPUT_ARCH(MIPS) |
5 | ENTRY(_start) | 6 | ENTRY(_start) |
6 | STARTUP(target/mips/ingenic_x1000/crt0.o) | 7 | STARTUP(target/mips/ingenic_x1000/crt0.o) |
7 | 8 | ||
8 | #define DRAMORIG 0x80000000 | ||
9 | #define DRAMSIZE (MEMORYSIZE * 0x100000) | ||
10 | #define USED_DRAM 16K | ||
11 | |||
12 | /* TCSM is 16 KiB and is mapped starting at address 0xf4000000. | ||
13 | * | ||
14 | * The SPL is loaded to TCSM + 0x1000. The area below that is stack space. | ||
15 | * The first 2 KiB of SPL is just headers. The code begins at TCSM + 0x1800. | ||
16 | * The maskrom will jump to that address (via jalr) after loading the SPL. | ||
17 | */ | ||
18 | MEMORY { | 9 | MEMORY { |
19 | TCSM : ORIGIN = 0xf4001800, LENGTH = 0x2800 | 10 | /* First 4k of TCSM is used by mask ROM for stack + variables, |
20 | DRAM : ORIGIN = DRAMORIG + DRAMSIZE - USED_DRAM, LENGTH = USED_DRAM | 11 | * and the next 2k are occupied by SPL header */ |
12 | TCSM : ORIGIN = X1000_TCSM_BASE + 0x1800, | ||
13 | LENGTH = X1000_TCSM_SIZE - 0x1800 | ||
14 | |||
15 | /* Small area of DRAM is required for NAND bounce buffers, | ||
16 | * though not strictly necessary as ECC isn't really practical | ||
17 | * this early in the boot */ | ||
18 | DRAM : ORIGIN = X1000_DRAM_END - 16K, | ||
19 | LENGTH = 16K | ||
21 | } | 20 | } |
22 | 21 | ||
23 | SECTIONS | 22 | SECTIONS |