summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMary Ruthven <mruthven@chromium.org>2021-11-09 17:10:56 -0600
committerCommit Bot <commit-bot@chromium.org>2021-11-18 04:51:10 +0000
commitf1e3d8db677dcde92e900bc2c0e137bd9fee514d (patch)
tree770bcbd4a628801fd82a72d7b53d743ae12f2a4e
parent5402eb74eaec24a351e66ee6e2898db17c489923 (diff)
downloadchrome-ec-f1e3d8db677dcde92e900bc2c0e137bd9fee514d.tar.gz
Revert "core: add chip-specific memory regions definition mechanism"
This reverts commit b42dd73603844c03b44d88a4513df330ee168496. BUG=b:200823466 TEST=make buildall -j Change-Id: I42b0fb4b0b5b0b08b9db45c57adb79ad2f111a26 Signed-off-by: Mary Ruthven <mruthven@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3273431 Reviewed-by: Vadim Sukhomlinov <sukhomlinov@chromium.org>
-rw-r--r--core/cortex-m/ec.lds.S18
-rw-r--r--include/config.h10
-rw-r--r--include/link_defs.h7
3 files changed, 0 insertions, 35 deletions
diff --git a/core/cortex-m/ec.lds.S b/core/cortex-m/ec.lds.S
index 3a9c79ed61..147e84cecb 100644
--- a/core/cortex-m/ec.lds.S
+++ b/core/cortex-m/ec.lds.S
@@ -53,13 +53,6 @@ MEMORY
ORIGIN = CONFIG_PROGRAM_MEMORY_BASE + FW_MEM_OFF(SECTION), \
LENGTH = FW_SIZE(SECTION)
#endif /* CONFIG_EXTERNAL_STORAGE */
-
-#ifdef CONFIG_CHIP_MEMORY_REGIONS
-#define REGION(name, attr, start, size) \
- name(attr) : ORIGIN = (start), LENGTH = (size)
-#include "memory_regions.inc"
-#undef REGION
-#endif /* CONFIG_MEMORY_REGIONS */
}
SECTIONS
@@ -439,17 +432,6 @@ SECTIONS
#else
__image_size = __hey_flash_used;
#endif
-
-#ifdef CONFIG_CHIP_MEMORY_REGIONS
-#define REGION(name, attr, start, size) \
- .name(NOLOAD) : { \
- __##name##_start = .; \
- *(SORT(.name.*)) \
- } > name
-#include "memory_regions.inc"
-#undef REGION
-#endif /* CONFIG_CHIP_MEMORY_REGIONS */
-
#if !(defined(SECTION_IS_RO) && defined(CONFIG_FLASH))
/DISCARD/ : { *(.google) }
#endif
diff --git a/include/config.h b/include/config.h
index 651b643ede..6fc45aa807 100644
--- a/include/config.h
+++ b/include/config.h
@@ -940,16 +940,6 @@
/*****************************************************************************/
/*
- * The chip needs to define special SRAM memory regions as linker sections.
- * Those regions are defined in the special-purpose preprocessed file in
- * chip/<chip_name>/memory_regions.inc using the following macro:
- * REGION(name, attributes, start_address, size)
- *
- * Note: these 'special' regions are NOT cleared at startup contrary to .bss.
- */
-#undef CONFIG_CHIP_MEMORY_REGIONS
-
-/*
* Chip needs to do pre-init very early in main(), and provides chip_pre_init()
* to do so.
*/
diff --git a/include/link_defs.h b/include/link_defs.h
index e9075c730f..dd0f9dd7d6 100644
--- a/include/link_defs.h
+++ b/include/link_defs.h
@@ -104,11 +104,4 @@ extern const void *__data_lma_start;
extern const void *__data_start;
extern const void *__data_end;
-/* Helper for special chip-specific memory sections */
-#if defined(CONFIG_CHIP_MEMORY_REGIONS) || defined(CONFIG_DRAM_BASE)
-#define __SECTION(name) __attribute__((section("." STRINGIFY(name) ".50_auto")))
-#else
-#define __SECTION(name)
-#endif /* CONFIG_MEMORY_REGIONS */
-
#endif /* __CROS_EC_LINK_DEFS_H */