Felix Held submitted this change.

View Change

Approvals: Julius Werner: Looks good to me, approved build bot (Jenkins): Verified
libpayload/arch/arm64/mmu: Specify ttb_buffer section name explicitly

Although a section ".bss.ttb_buffer" is created automatically for
'ttb_buffer' with the GCC option '-fdata-sections', specify the section
name explicitly to make the name stand out to code readers, and to
reduce the chance of accidentally changing the section name by renaming
the variable.

Change-Id: I2930f238f63b555c4caa65709768afa314d9cf87
Signed-off-by: Yu-Ping Wu <yupingso@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/80014
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Julius Werner <jwerner@chromium.org>
---
M payloads/libpayload/arch/arm64/mmu.c
1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/payloads/libpayload/arch/arm64/mmu.c b/payloads/libpayload/arch/arm64/mmu.c
index 9fc227d..3822a89 100644
--- a/payloads/libpayload/arch/arm64/mmu.c
+++ b/payloads/libpayload/arch/arm64/mmu.c
@@ -42,10 +42,13 @@

static int free_idx;

-/* We refer to this in the linker script for ChormeOS's depthcharge payload
- * and to please not change the name without discussing with us.
- * Please contact: jwerner@chromium.org or yich@chromium.org */
-static uint8_t ttb_buffer[TTB_DEFAULT_SIZE] __aligned(GRANULE_SIZE);
+/*
+ * We refer to the section ".bss.ttb_buffer" in the linker script for ChromeOS's depthcharge
+ * payload. Please DO NOT change the section name without discussing with us.
+ * Please contact: jwerner@chromium.org or yich@chromium.org
+ */
+static uint8_t ttb_buffer[TTB_DEFAULT_SIZE] __aligned(GRANULE_SIZE)
+ __section(".bss.ttb_buffer");

static const char * const tag_to_string[] = {
[TYPE_NORMAL_MEM] = "normal",

To view, visit change 80014. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: coreboot
Gerrit-Branch: main
Gerrit-Change-Id: I2930f238f63b555c4caa65709768afa314d9cf87
Gerrit-Change-Number: 80014
Gerrit-PatchSet: 4
Gerrit-Owner: Yu-Ping Wu <yupingso@google.com>
Gerrit-Reviewer: Felix Held <felix-coreboot@felixheld.de>
Gerrit-Reviewer: Julius Werner <jwerner@chromium.org>
Gerrit-Reviewer: build bot (Jenkins) <no-reply@coreboot.org>
Gerrit-CC: Yi Chou <yich@google.com>
Gerrit-MessageType: merged