mirror of
https://github.com/trezor/trezor-firmware.git
synced 2025-02-12 07:32:48 +00:00
refactor(core): add new linker scripts consts for memory cleanup
[no changelog]
This commit is contained in:
parent
7613fe310a
commit
70c577b67b
@ -25,6 +25,14 @@ _confidential_section_loadaddr = 0;
|
|||||||
_confidential_section_start = 0;
|
_confidential_section_start = 0;
|
||||||
_confidential_section_end = 0;
|
_confidential_section_end = 0;
|
||||||
|
|
||||||
|
_accessible_ram_0_start = MCU_CCMRAM;
|
||||||
|
_accessible_ram_0_end = MCU_CCMRAM + MCU_CCMRAM_SIZE;
|
||||||
|
_accessible_ram_1_start = MCU_SRAM;
|
||||||
|
_accessible_ram_1_end = MCU_SRAM + MCU_SRAM_SIZE;
|
||||||
|
|
||||||
|
_bootargs_ram_start = BOOTARGS_START;
|
||||||
|
_bootargs_ram_end = BOOTARGS_START + BOOTARGS_SIZE;
|
||||||
|
|
||||||
/* used by the startup code to wipe memory */
|
/* used by the startup code to wipe memory */
|
||||||
_startup_clear_ram_0_start = MCU_CCMRAM;
|
_startup_clear_ram_0_start = MCU_CCMRAM;
|
||||||
_startup_clear_ram_0_end = MCU_CCMRAM + MCU_CCMRAM_SIZE;
|
_startup_clear_ram_0_end = MCU_CCMRAM + MCU_CCMRAM_SIZE;
|
||||||
|
@ -25,6 +25,14 @@ _confidential_section_loadaddr = 0;
|
|||||||
_confidential_section_start = 0;
|
_confidential_section_start = 0;
|
||||||
_confidential_section_end = 0;
|
_confidential_section_end = 0;
|
||||||
|
|
||||||
|
_accessible_ram_0_start = MCU_CCMRAM;
|
||||||
|
_accessible_ram_0_end = MCU_CCMRAM + MCU_CCMRAM_SIZE;
|
||||||
|
_accessible_ram_1_start = MCU_SRAM;
|
||||||
|
_accessible_ram_1_end = MCU_SRAM + MCU_SRAM_SIZE;
|
||||||
|
|
||||||
|
_bootargs_ram_start = BOOTARGS_START;
|
||||||
|
_bootargs_ram_end = BOOTARGS_START + BOOTARGS_SIZE;
|
||||||
|
|
||||||
/* used by the startup code to wipe memory */
|
/* used by the startup code to wipe memory */
|
||||||
_startup_clear_ram_0_start = MCU_CCMRAM;
|
_startup_clear_ram_0_start = MCU_CCMRAM;
|
||||||
_startup_clear_ram_0_end = MCU_CCMRAM + MCU_CCMRAM_SIZE - BOOTARGS_SIZE;
|
_startup_clear_ram_0_end = MCU_CCMRAM + MCU_CCMRAM_SIZE - BOOTARGS_SIZE;
|
||||||
|
@ -25,6 +25,14 @@ _confidential_section_loadaddr = 0;
|
|||||||
_confidential_section_start = 0;
|
_confidential_section_start = 0;
|
||||||
_confidential_section_end = 0;
|
_confidential_section_end = 0;
|
||||||
|
|
||||||
|
_accessible_ram_0_start = MCU_CCMRAM;
|
||||||
|
_accessible_ram_0_end = MCU_CCMRAM + MCU_CCMRAM_SIZE;
|
||||||
|
_accessible_ram_1_start = MCU_SRAM;
|
||||||
|
_accessible_ram_1_end = MCU_SRAM + MCU_SRAM_SIZE;
|
||||||
|
|
||||||
|
_bootargs_ram_start = BOOTARGS_START;
|
||||||
|
_bootargs_ram_end = BOOTARGS_START + BOOTARGS_SIZE;
|
||||||
|
|
||||||
/* used by the startup code to wipe memory */
|
/* used by the startup code to wipe memory */
|
||||||
_startup_clear_ram_0_start = MCU_CCMRAM;
|
_startup_clear_ram_0_start = MCU_CCMRAM;
|
||||||
_startup_clear_ram_0_end = MCU_CCMRAM + MCU_CCMRAM_SIZE;
|
_startup_clear_ram_0_end = MCU_CCMRAM + MCU_CCMRAM_SIZE;
|
||||||
|
@ -25,6 +25,14 @@ _confidential_section_loadaddr = 0;
|
|||||||
_confidential_section_start = 0;
|
_confidential_section_start = 0;
|
||||||
_confidential_section_end = 0;
|
_confidential_section_end = 0;
|
||||||
|
|
||||||
|
_accessible_ram_0_start = MCU_CCMRAM;
|
||||||
|
_accessible_ram_0_end = MCU_CCMRAM + MCU_CCMRAM_SIZE;
|
||||||
|
_accessible_ram_1_start = MCU_SRAM;
|
||||||
|
_accessible_ram_1_end = MCU_SRAM + MCU_SRAM_SIZE;
|
||||||
|
|
||||||
|
_bootargs_ram_start = BOOTARGS_START;
|
||||||
|
_bootargs_ram_end = BOOTARGS_START + BOOTARGS_SIZE;
|
||||||
|
|
||||||
/* used by the startup code to wipe memory */
|
/* used by the startup code to wipe memory */
|
||||||
_startup_clear_ram_0_start = MCU_CCMRAM;
|
_startup_clear_ram_0_start = MCU_CCMRAM;
|
||||||
_startup_clear_ram_0_end = MCU_CCMRAM + MCU_CCMRAM_SIZE;
|
_startup_clear_ram_0_end = MCU_CCMRAM + MCU_CCMRAM_SIZE;
|
||||||
|
@ -28,6 +28,14 @@ _confidential_section_loadaddr = LOADADDR(.confidential);
|
|||||||
_confidential_section_start = ADDR(.confidential);
|
_confidential_section_start = ADDR(.confidential);
|
||||||
_confidential_section_end = ADDR(.confidential) + SIZEOF(.confidential);
|
_confidential_section_end = ADDR(.confidential) + SIZEOF(.confidential);
|
||||||
|
|
||||||
|
_accessible_ram_0_start = MCU_SRAM1;
|
||||||
|
_accessible_ram_0_end = MCU_SRAM3 + MCU_SRAM3_SIZE;
|
||||||
|
_accessible_ram_1_start = MCU_SRAM4;
|
||||||
|
_accessible_ram_1_end = MCU_SRAM4 + MCU_SRAM4_SIZE;
|
||||||
|
|
||||||
|
_bootargs_ram_start = BOOTARGS_START;
|
||||||
|
_bootargs_ram_end = BOOTARGS_START + BOOTARGS_SIZE;
|
||||||
|
|
||||||
/* used by the startup code to wipe memory */
|
/* used by the startup code to wipe memory */
|
||||||
_startup_clear_ram_0_start = MCU_SRAM1;
|
_startup_clear_ram_0_start = MCU_SRAM1;
|
||||||
_startup_clear_ram_0_end = MCU_SRAM1 + MCU_SRAM1_SIZE - BOOTARGS_SIZE;
|
_startup_clear_ram_0_end = MCU_SRAM1 + MCU_SRAM1_SIZE - BOOTARGS_SIZE;
|
||||||
@ -54,7 +62,6 @@ _shutdown_clear_ram_2_end = 0;
|
|||||||
_shutdown_clear_ram_3_start = 0;
|
_shutdown_clear_ram_3_start = 0;
|
||||||
_shutdown_clear_ram_3_end = 0;
|
_shutdown_clear_ram_3_end = 0;
|
||||||
|
|
||||||
|
|
||||||
SECTIONS {
|
SECTIONS {
|
||||||
.vector_table : ALIGN(CODE_ALIGNMENT) {
|
.vector_table : ALIGN(CODE_ALIGNMENT) {
|
||||||
KEEP(*(.vector_table));
|
KEEP(*(.vector_table));
|
||||||
|
@ -27,6 +27,14 @@ _confidential_section_loadaddr = LOADADDR(.confidential);
|
|||||||
_confidential_section_start = ADDR(.confidential);
|
_confidential_section_start = ADDR(.confidential);
|
||||||
_confidential_section_end = ADDR(.confidential) + SIZEOF(.confidential);
|
_confidential_section_end = ADDR(.confidential) + SIZEOF(.confidential);
|
||||||
|
|
||||||
|
_accessible_ram_0_start = MCU_SRAM1;
|
||||||
|
_accessible_ram_0_end = MCU_SRAM3 + MCU_SRAM3_SIZE;
|
||||||
|
_accessible_ram_1_start = MCU_SRAM4;
|
||||||
|
_accessible_ram_1_end = MCU_SRAM4 + MCU_SRAM4_SIZE;
|
||||||
|
|
||||||
|
_bootargs_ram_start = BOOTARGS_START;
|
||||||
|
_bootargs_ram_end = BOOTARGS_START + BOOTARGS_SIZE;
|
||||||
|
|
||||||
/* used by the startup code to wipe memory */
|
/* used by the startup code to wipe memory */
|
||||||
_startup_clear_ram_0_start = MCU_SRAM1;
|
_startup_clear_ram_0_start = MCU_SRAM1;
|
||||||
_startup_clear_ram_0_end = MCU_SRAM1 + MCU_SRAM1_SIZE - BOOTARGS_SIZE;
|
_startup_clear_ram_0_end = MCU_SRAM1 + MCU_SRAM1_SIZE - BOOTARGS_SIZE;
|
||||||
|
@ -30,6 +30,14 @@ _confidential_section_loadaddr = LOADADDR(.confidential);
|
|||||||
_confidential_section_start = ADDR(.confidential);
|
_confidential_section_start = ADDR(.confidential);
|
||||||
_confidential_section_end = ADDR(.confidential) + SIZEOF(.confidential);
|
_confidential_section_end = ADDR(.confidential) + SIZEOF(.confidential);
|
||||||
|
|
||||||
|
_accessible_ram_0_start = MCU_SRAM1;
|
||||||
|
_accessible_ram_0_end = MCU_SRAM3 + MCU_SRAM3_SIZE;
|
||||||
|
_accessible_ram_1_start = MCU_SRAM4;
|
||||||
|
_accessible_ram_1_end = MCU_SRAM4 + MCU_SRAM4_SIZE;
|
||||||
|
|
||||||
|
_bootargs_ram_start = BOOTARGS_START;
|
||||||
|
_bootargs_ram_end = BOOTARGS_START + BOOTARGS_SIZE;
|
||||||
|
|
||||||
/* used by the startup code to wipe memory */
|
/* used by the startup code to wipe memory */
|
||||||
_startup_clear_ram_0_start = MCU_SRAM1;
|
_startup_clear_ram_0_start = MCU_SRAM1;
|
||||||
_startup_clear_ram_0_end = MCU_SRAM1 + MCU_SRAM1_SIZE;
|
_startup_clear_ram_0_end = MCU_SRAM1 + MCU_SRAM1_SIZE;
|
||||||
|
@ -27,6 +27,14 @@ _confidential_section_loadaddr = LOADADDR(.confidential);
|
|||||||
_confidential_section_start = ADDR(.confidential);
|
_confidential_section_start = ADDR(.confidential);
|
||||||
_confidential_section_end = ADDR(.confidential) + SIZEOF(.confidential);
|
_confidential_section_end = ADDR(.confidential) + SIZEOF(.confidential);
|
||||||
|
|
||||||
|
_accessible_ram_0_start = MCU_SRAM1;
|
||||||
|
_accessible_ram_0_end = MCU_SRAM3 + MCU_SRAM3_SIZE;
|
||||||
|
_accessible_ram_1_start = MCU_SRAM4;
|
||||||
|
_accessible_ram_1_end = MCU_SRAM4 + MCU_SRAM4_SIZE;
|
||||||
|
|
||||||
|
_bootargs_ram_start = BOOTARGS_START;
|
||||||
|
_bootargs_ram_end = BOOTARGS_START + BOOTARGS_SIZE;
|
||||||
|
|
||||||
/* used by the startup code to wipe memory */
|
/* used by the startup code to wipe memory */
|
||||||
_startup_clear_ram_0_start = MCU_SRAM1;
|
_startup_clear_ram_0_start = MCU_SRAM1;
|
||||||
_startup_clear_ram_0_end = MCU_SRAM1 + MCU_SRAM1_SIZE;
|
_startup_clear_ram_0_end = MCU_SRAM1 + MCU_SRAM1_SIZE;
|
||||||
|
@ -28,6 +28,14 @@ _confidential_section_loadaddr = LOADADDR(.confidential);
|
|||||||
_confidential_section_start = ADDR(.confidential);
|
_confidential_section_start = ADDR(.confidential);
|
||||||
_confidential_section_end = ADDR(.confidential) + SIZEOF(.confidential);
|
_confidential_section_end = ADDR(.confidential) + SIZEOF(.confidential);
|
||||||
|
|
||||||
|
_accessible_ram_0_start = MCU_SRAM1;
|
||||||
|
_accessible_ram_0_end = MCU_SRAM6 + MCU_SRAM6_SIZE;
|
||||||
|
_accessible_ram_1_start = MCU_SRAM4;
|
||||||
|
_accessible_ram_1_end = MCU_SRAM4 + MCU_SRAM4_SIZE;
|
||||||
|
|
||||||
|
_bootargs_ram_start = BOOTARGS_START;
|
||||||
|
_bootargs_ram_end = BOOTARGS_START + BOOTARGS_SIZE;
|
||||||
|
|
||||||
/* used by the startup code to wipe memory */
|
/* used by the startup code to wipe memory */
|
||||||
_startup_clear_ram_0_start = MCU_SRAM1 + BOOTARGS_SIZE;
|
_startup_clear_ram_0_start = MCU_SRAM1 + BOOTARGS_SIZE;
|
||||||
_startup_clear_ram_0_end = MCU_SRAM1 + MCU_SRAM1_SIZE;
|
_startup_clear_ram_0_end = MCU_SRAM1 + MCU_SRAM1_SIZE;
|
||||||
|
@ -26,6 +26,15 @@ _bss_section_end = ADDR(.bss) + SIZEOF(.bss);
|
|||||||
_confidential_section_loadaddr = LOADADDR(.confidential);
|
_confidential_section_loadaddr = LOADADDR(.confidential);
|
||||||
_confidential_section_start = ADDR(.confidential);
|
_confidential_section_start = ADDR(.confidential);
|
||||||
_confidential_section_end = ADDR(.confidential) + SIZEOF(.confidential);
|
_confidential_section_end = ADDR(.confidential) + SIZEOF(.confidential);
|
||||||
|
|
||||||
|
_accessible_ram_0_start = MCU_SRAM1;
|
||||||
|
_accessible_ram_0_end = MCU_SRAM6 + MCU_SRAM6_SIZE;
|
||||||
|
_accessible_ram_1_start = MCU_SRAM4;
|
||||||
|
_accessible_ram_1_end = MCU_SRAM4 + MCU_SRAM4_SIZE;
|
||||||
|
|
||||||
|
_bootargs_ram_start = BOOTARGS_START;
|
||||||
|
_bootargs_ram_end = BOOTARGS_START + BOOTARGS_SIZE;
|
||||||
|
|
||||||
/* used by the startup code to wipe memory */
|
/* used by the startup code to wipe memory */
|
||||||
_startup_clear_ram_0_start = MCU_SRAM1 + BOOTARGS_SIZE;
|
_startup_clear_ram_0_start = MCU_SRAM1 + BOOTARGS_SIZE;
|
||||||
_startup_clear_ram_0_end = MCU_SRAM1 + MCU_SRAM1_SIZE;
|
_startup_clear_ram_0_end = MCU_SRAM1 + MCU_SRAM1_SIZE;
|
||||||
|
@ -31,6 +31,14 @@ _confidential_section_loadaddr = LOADADDR(.confidential);
|
|||||||
_confidential_section_start = ADDR(.confidential);
|
_confidential_section_start = ADDR(.confidential);
|
||||||
_confidential_section_end = ADDR(.confidential) + SIZEOF(.confidential);
|
_confidential_section_end = ADDR(.confidential) + SIZEOF(.confidential);
|
||||||
|
|
||||||
|
_accessible_ram_0_start = MCU_SRAM1;
|
||||||
|
_accessible_ram_0_end = MCU_SRAM6 + MCU_SRAM6_SIZE;
|
||||||
|
_accessible_ram_1_start = MCU_SRAM4;
|
||||||
|
_accessible_ram_1_end = MCU_SRAM4 + MCU_SRAM4_SIZE;
|
||||||
|
|
||||||
|
_bootargs_ram_start = BOOTARGS_START;
|
||||||
|
_bootargs_ram_end = BOOTARGS_START + BOOTARGS_SIZE;
|
||||||
|
|
||||||
/* used by the startup code to wipe memory */
|
/* used by the startup code to wipe memory */
|
||||||
_startup_clear_ram_0_start = MCU_SRAM1;
|
_startup_clear_ram_0_start = MCU_SRAM1;
|
||||||
_startup_clear_ram_0_end = MCU_SRAM1 + MCU_SRAM1_SIZE;
|
_startup_clear_ram_0_end = MCU_SRAM1 + MCU_SRAM1_SIZE;
|
||||||
|
@ -27,6 +27,14 @@ _confidential_section_loadaddr = LOADADDR(.confidential);
|
|||||||
_confidential_section_start = ADDR(.confidential);
|
_confidential_section_start = ADDR(.confidential);
|
||||||
_confidential_section_end = ADDR(.confidential) + SIZEOF(.confidential);
|
_confidential_section_end = ADDR(.confidential) + SIZEOF(.confidential);
|
||||||
|
|
||||||
|
_accessible_ram_0_start = MCU_SRAM1;
|
||||||
|
_accessible_ram_0_end = MCU_SRAM6 + MCU_SRAM6_SIZE;
|
||||||
|
_accessible_ram_1_start = MCU_SRAM4;
|
||||||
|
_accessible_ram_1_end = MCU_SRAM4 + MCU_SRAM4_SIZE;
|
||||||
|
|
||||||
|
_bootargs_ram_start = BOOTARGS_START;
|
||||||
|
_bootargs_ram_end = BOOTARGS_START + BOOTARGS_SIZE;
|
||||||
|
|
||||||
/* used by the startup code to wipe memory */
|
/* used by the startup code to wipe memory */
|
||||||
_startup_clear_ram_0_start = MCU_SRAM1;
|
_startup_clear_ram_0_start = MCU_SRAM1;
|
||||||
_startup_clear_ram_0_end = MCU_SRAM1 + MCU_SRAM1_SIZE;
|
_startup_clear_ram_0_end = MCU_SRAM1 + MCU_SRAM1_SIZE;
|
||||||
|
Loading…
Reference in New Issue
Block a user