summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Hughes <tomhughes@chromium.org>2021-10-05 23:27:27 +0000
committerCommit Bot <commit-bot@chromium.org>2021-10-06 20:00:42 +0000
commite88b7ee9aedbcf84dcb220db7244d6411e7f7318 (patch)
tree736bfe1f9cbc69eb200ca529550f4a2d7298590b
parent8951a455c689fe46f8ade669252dd00654def390 (diff)
downloadchrome-ec-e88b7ee9aedbcf84dcb220db7244d6411e7f7318.tar.gz
tree: Remove CONFIG_RO_HEAD_ROOM and CONFIG_RW_HEAD_ROOM
CONFIG_RO_HEAD_ROOM and CONFIG_RW_HEAD_ROOM are always defined as 0, so remove the values and associated code in order to simplify the code and improve readability. BRANCH=none BUG=b:172020503 TEST=./util/compare_build.sh -b all => MATCH Signed-off-by: Tom Hughes <tomhughes@chromium.org> Change-Id: Ie11d23befda674cc15dda9a2d66b9c43ea22d49e Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3205489 Reviewed-by: Ting Shen <phoenixshen@chromium.org> Reviewed-by: Mary Ruthven <mruthven@chromium.org>
-rw-r--r--common/system.c5
-rw-r--r--core/cortex-m/ec.lds.S6
-rw-r--r--include/config.h7
-rw-r--r--util/config_allowed.txt2
4 files changed, 0 insertions, 20 deletions
diff --git a/common/system.c b/common/system.c
index 1670857241..09d508bda5 100644
--- a/common/system.c
+++ b/common/system.c
@@ -681,11 +681,6 @@ static int system_run_image_copy_with_flags(enum ec_image copy,
init_addr = system_get_fw_reset_vector(base);
} else {
uintptr_t init = base + 4;
-
- /* Skip any head room in the RO image */
- if (copy == EC_IMAGE_RO)
- init += CONFIG_RO_HEAD_ROOM;
-
init_addr = *(uintptr_t *)(init);
/* Make sure the reset vector is inside the destination image */
diff --git a/core/cortex-m/ec.lds.S b/core/cortex-m/ec.lds.S
index fa35684e31..c5314111d0 100644
--- a/core/cortex-m/ec.lds.S
+++ b/core/cortex-m/ec.lds.S
@@ -145,12 +145,6 @@ SECTIONS
} > SHARED_LIB
#endif
.text : {
-#ifdef SECTION_IS_RO
- . = . + CONFIG_RO_HEAD_ROOM;
-#endif
-#ifdef SECTION_IS_RW
- . = . + CONFIG_RW_HEAD_ROOM;
-#endif
*(.text.vecttable)
. = ALIGN(4);
__image_data_offset = .;
diff --git a/include/config.h b/include/config.h
index 7bfc18e9a7..71f649bbc9 100644
--- a/include/config.h
+++ b/include/config.h
@@ -5190,13 +5190,6 @@
*/
#undef CONFIG_WP_ALWAYS
-/*
- * If needed to allocate some free space in the base of the RO or RW section
- * of the image, define these to be equal the required size of the free space.
- */
-#define CONFIG_RO_HEAD_ROOM 0
-#define CONFIG_RW_HEAD_ROOM 0
-
/* Firmware upgrade options. */
/* A different config for the same update. TODO(vbendeb): dedupe these */
#undef CONFIG_USB_UPDATE
diff --git a/util/config_allowed.txt b/util/config_allowed.txt
index f32725f5e4..64a49d36cd 100644
--- a/util/config_allowed.txt
+++ b/util/config_allowed.txt
@@ -768,7 +768,6 @@ CONFIG_ROM_BASE
CONFIG_ROM_SIZE
CONFIG_RO_HDR_MEM_OFF
CONFIG_RO_HDR_SIZE
-CONFIG_RO_HEAD_ROOM
CONFIG_RO_MEM_OFF
CONFIG_RO_MEM_SIZE
CONFIG_RO_PUBKEY_ADDR
@@ -797,7 +796,6 @@ CONFIG_RW_B_MEM_OFF
CONFIG_RW_B_SIGN_STORAGE_OFF
CONFIG_RW_B_SIG_ADDR
CONFIG_RW_B_STORAGE_OFF
-CONFIG_RW_HEAD_ROOM
CONFIG_RW_MEM_OFF
CONFIG_RW_MEM_SIZE
CONFIG_RW_ROM_RESIDENT_MEM_OFF