From c8e9da26150111a56c75f7ce1427152d04457591 Mon Sep 17 00:00:00 2001 From: Shawn Nematbakhsh Date: Fri, 17 Jan 2025 08:58:49 -0800 Subject: [PATCH] soc: lowrisc: opentitan: Fix manifest sizing The actual manifest is 1024 bytes, but we previously had padding bytes due to the implementation of SECTION_FUNC(). The manifest is not executable code so SECTION_VAR() is appropriate and produces a section of the appropriate size. Fixes: #82822 Signed-off-by: Shawn Nematbakhsh --- soc/lowrisc/opentitan/Kconfig.defconfig | 2 +- soc/lowrisc/opentitan/rom_header.S | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/soc/lowrisc/opentitan/Kconfig.defconfig b/soc/lowrisc/opentitan/Kconfig.defconfig index 59c13c4ba81..94c92d69c41 100644 --- a/soc/lowrisc/opentitan/Kconfig.defconfig +++ b/soc/lowrisc/opentitan/Kconfig.defconfig @@ -21,6 +21,6 @@ config NUM_IRQS # The OpenTitan SoC requires a manifest in front of the # application binary. config ROM_START_OFFSET - default 0x404 + default 0x400 endif # SOC_OPENTITAN diff --git a/soc/lowrisc/opentitan/rom_header.S b/soc/lowrisc/opentitan/rom_header.S index e7b41235dab..2303614c4dc 100644 --- a/soc/lowrisc/opentitan/rom_header.S +++ b/soc/lowrisc/opentitan/rom_header.S @@ -17,7 +17,7 @@ GTEXT(__rom_header) * 0x6c47 (minor). The manifest format is documented here: * https://github.com/lowRISC/opentitan/blob/689a163294e1791bd30cfe096decf7f9233abad4/sw/host/opentitanlib/src/image/manifest.rs#L205 */ -SECTION_FUNC(rom_header, __rom_header) +SECTION_VAR(rom_header, __rom_header) .rept(225) .word 0 .endr