From 161c56fa31d37c7aadee0003764c006f6977c732 Mon Sep 17 00:00:00 2001 From: nagendra modadugu Date: Tue, 12 Mar 2024 10:03:55 -0700 Subject: [PATCH] soc: opentitan: update manifest format Fix calculation of the app entry point. Signed-off-by: nagendra modadugu --- soc/lowrisc/opentitan/rom_header.S | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/soc/lowrisc/opentitan/rom_header.S b/soc/lowrisc/opentitan/rom_header.S index 6bfedafa906..e7b41235dab 100644 --- a/soc/lowrisc/opentitan/rom_header.S +++ b/soc/lowrisc/opentitan/rom_header.S @@ -6,16 +6,24 @@ #include -/* imports */ -GTEXT(__start) +/* exports */ +GTEXT(__rom_header) -/* OpenTitan manifest consists of 896 bytes (224 words) containing signature, - * device ID, version info, etc. The test ROM ignores all of these fields - * except for entry point (final word in manifest). +/* OpenTitan manifest consists of 1024 bytes (256 words) of manifest + * containing signature, device ID, version info, etc. The test ROM + * ignores all of these fields except for entry point. + * + * The layout below conforms to manifest version: 0x71c3 (major), + * 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) - .rept(223) + .rept(225) .word 0 .endr /* Entry point is relative to the beginning of manifest. */ .word(__start - __rom_header) + /* Extensions entry table goes here. */ + .rept(30) + .word 0 + .endr