From e10dec0fe72c19320d2c93b905457a5327ec1235 Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Fri, 30 Apr 2021 15:47:10 +0200 Subject: bsps: Support RTEMS_NOINIT in linkcmds Update #3866. --- bsps/arm/include/bsp/arm-cp15-start.h | 6 +++++- bsps/arm/include/bsp/linker-symbols.h | 4 ++++ bsps/arm/shared/start/linkcmds.base | 7 +++++++ 3 files changed, 16 insertions(+), 1 deletion(-) (limited to 'bsps/arm') diff --git a/bsps/arm/include/bsp/arm-cp15-start.h b/bsps/arm/include/bsp/arm-cp15-start.h index 75cbdac848..2e32a1bd8a 100644 --- a/bsps/arm/include/bsp/arm-cp15-start.h +++ b/bsps/arm/include/bsp/arm-cp15-start.h @@ -77,6 +77,10 @@ typedef struct { .begin = (uint32_t) bsp_section_rtemsstack_begin, \ .end = (uint32_t) bsp_section_rtemsstack_end, \ .flags = ARMV7_MMU_DATA_READ_WRITE_CACHED \ + }, { \ + .begin = (uint32_t) bsp_section_noinit_begin, \ + .end = (uint32_t) bsp_section_noinit_end, \ + .flags = ARMV7_MMU_DATA_READ_WRITE_CACHED \ }, { \ .begin = (uint32_t) bsp_section_work_begin, \ .end = (uint32_t) bsp_section_work_end, \ @@ -99,7 +103,7 @@ typedef struct { .flags = ARMV7_MMU_DATA_READ_WRITE_CACHED \ } -#define ARMV7_CP15_START_WORKSPACE_ENTRY_INDEX 9 +#define ARMV7_CP15_START_WORKSPACE_ENTRY_INDEX 10 BSP_START_DATA_SECTION extern const arm_cp15_start_section_config arm_cp15_start_mmu_config_table[]; diff --git a/bsps/arm/include/bsp/linker-symbols.h b/bsps/arm/include/bsp/linker-symbols.h index 635ba5e5c4..38a849a95a 100644 --- a/bsps/arm/include/bsp/linker-symbols.h +++ b/bsps/arm/include/bsp/linker-symbols.h @@ -96,6 +96,10 @@ LINKER_SYMBOL(bsp_section_rtemsstack_begin) LINKER_SYMBOL(bsp_section_rtemsstack_end) LINKER_SYMBOL(bsp_section_rtemsstack_size) +LINKER_SYMBOL(bsp_section_noinit_begin) +LINKER_SYMBOL(bsp_section_noinit_end) +LINKER_SYMBOL(bsp_section_noinit_size) + LINKER_SYMBOL(bsp_section_work_begin) LINKER_SYMBOL(bsp_section_work_end) LINKER_SYMBOL(bsp_section_work_size) diff --git a/bsps/arm/shared/start/linkcmds.base b/bsps/arm/shared/start/linkcmds.base index a56e23fe93..1b88255e44 100644 --- a/bsps/arm/shared/start/linkcmds.base +++ b/bsps/arm/shared/start/linkcmds.base @@ -338,6 +338,13 @@ SECTIONS { } > REGION_WORK AT > REGION_WORK bsp_section_rtemsstack_size = bsp_section_rtemsstack_end - bsp_section_rtemsstack_begin; + .noinit (NOLOAD) : ALIGN_WITH_INPUT { + bsp_section_noinit_begin = .; + *(.noinit*) + bsp_section_noinit_end = .; + } > REGION_WORK AT > REGION_WORK + bsp_section_noinit_size = bsp_section_noinit_end - bsp_section_noinit_begin; + .work : ALIGN_WITH_INPUT { /* * The work section will occupy the remaining REGION_WORK region and -- cgit v1.2.3