diff options
| author | Tom Rini <[email protected]> | 2026-07-16 12:04:21 -0600 |
|---|---|---|
| committer | Tom Rini <[email protected]> | 2026-07-16 12:04:21 -0600 |
| commit | 4e7a9bb0885e75853687956002e69875e0ef64e6 (patch) | |
| tree | c1d64d06e7a5d729653265614ef685041424f315 | |
| parent | 1708f49de9cb6ba9a24735faa9679f6f9146cbd4 (diff) | |
| parent | a5567f46697a733a9ad03eaec9941c8d80e6fb40 (diff) | |
Merge patch series "arm: k3: replace tifsstub runtime filter with per-state FIT configurations"
Aristo Chen <[email protected]> says:
The AM62x family (TI EVMs, phytec phycore, toradex verdin) ships
two or three mutually-exclusive tifsstub variants per tispl.bin FIT
image (tifsstub-hs, tifsstub-fs, tifsstub-gp), all assigned the same
load address 0x9dc00000. The current platform code loads every
variant and discards the wrong ones at runtime by zeroing *p_size in
board_fit_image_post_process() (arch/arm/mach-k3/r5/common.c).
This runtime-filter approach has become a friction point. An earlier
attempt to add FIT-image load-address overlap detection to mkimage
flagged the shared 0x9dc00000 as an apparent conflict, and the
workaround in that series was to shift each tifsstub by 64KB
increments. Bryan Brattlof reviewed that change at the time [1] and
pointed out that the real semantics are "load one of three at
runtime", and that moving the binaries was not necessarily safe given
downstream IPC assumptions about the fixed load address. The series
was ultimately reverted upstream, which leaves the underlying
question open: any future static FIT validator needs a way to
understand that these three images do not actually collide. The same
point is being discussed at the spec level in flat-image-tree issue
#32 [2], where a "mutually-exclusive-group" property has been floated
to express runtime-resolved overlaps to static tooling.
This series fixes the problem structurally without moving any
binaries and without a spec extension. Each board's binman dtsi is
updated so the tispl.bin FIT carries one configuration per security
state (conf-hs-se, conf-hs-fs, conf-gp), each containing only the
matching tifsstub. board_fit_config_name_match() in each affected
board reads the SoC security state via get_device_type() and selects
the correct configuration up front, via a shared helper
k3_fit_config_match_security_state() added in arch/arm/mach-k3/
common.c. Each FIT configuration ends up with exactly one tifsstub at
0x9dc00000, so the overlap goes away from any static validator's
perspective and no platform-specific runtime knowledge is needed to
pick the right firmware.
Series ordering is intentional and bisectable. Patch 1 introduces
the helper, migrates the TI EVMs, and leaves the runtime filter in
place. Phytec phycore and toradex verdin boards still use their old
single-config dtsi at this point, and the runtime filter continues
to do the right thing for them in the meantime. Patch 2 migrates the
phytec phycore-am62 SoMs. Patch 3 migrates the toradex Verdin AM62
modules; their previous board_fit_config_name_match() returned 0
unconditionally, which after the dtsi split would have selected the
first listed configuration regardless of silicon and broken HS-SE
parts, so this patch is also a latent-bug fix on top of the migration.
Patch 4 drops the now-dead runtime filter.
Changes since v1, all addressing review feedback from Anshul Dalal:
1. Patch 1: use strncmp() in k3_fit_config_match_security_state()
instead of strcmp() with a redundant ternary, since the suffix
length is already known.
2. Patches 1, 2 and 3: drop the CONFIG_SPL_LOAD_FIT #if guard
around board_fit_config_name_match() on the TI EVM, phycore
and verdin boards. SPL_LOAD_FIT is always selected on ARCH_K3
and LTO drops the function in any build that does not use it.
3. The move of enum k3_device_type and get_device_type() from
arch/arm/mach-k3/common.h to arch/arm/mach-k3/include/mach/
hardware.h in patch 1 is kept as-is. common.h is currently
mach-k3-internal and is not in the include search path for
board files; making it public would be a larger refactor that
Anshul has offered to take on separately [3].
Patch 4 is unchanged from v1; Acked-by from Neha Malcom Francis and
Reviewed-by from Anshul Dalal collected on v1 are carried forward.
Patch 1 has small non-behavioral changes vs v1, so v1 tags from
Alexander Sverdlin (Reviewed-by), Neha Malcom Francis (Acked-by),
and Akashdeep Kaur (Tested-by) are not carried forward and are
pending re-confirmation against v2.
Boot tested on AM625 SK GP silicon end-to-end through TFA, OP-TEE,
A53 SPL, U-Boot proper, and Linux 6.5. The two "Skipping
authentication on GP device" messages in the SPL banner confirm only
the GP tifsstub variant is present in the selected FIT
configuration; loading any HS variant on GP silicon would fail TIFS
authentication before reaching that point. Building (R5 SPL + A53
SPL + U-Boot proper) was verified clean against v2 on am62x_evm,
phycore_am62x, and verdin-am62 defconfigs.
Akashdeep Kaur tested v1 on AM62PX HS-FS and AM62X HS-SE devices,
including deep-sleep suspend/resume. v2 changes are non-behavioral
so the same code paths exercise as v1, but explicit re-test on v2
would be welcome.
[1] https://lore.kernel.org/u-boot/[email protected]/
[2] https://github.com/open-source-firmware/flat-image-tree/issues/32
[3] https://lore.kernel.org/u-boot/[email protected]/
Link: https://lore.kernel.org/r/[email protected]
| -rw-r--r-- | arch/arm/dts/k3-am625-phycore-som-binman.dtsi | 42 | ||||
| -rw-r--r-- | arch/arm/dts/k3-am625-sk-binman.dtsi | 61 | ||||
| -rw-r--r-- | arch/arm/dts/k3-am625-verdin-wifi-dev-binman.dtsi | 42 | ||||
| -rw-r--r-- | arch/arm/dts/k3-am62a-phycore-som-binman.dtsi | 15 | ||||
| -rw-r--r-- | arch/arm/dts/k3-am62a-sk-binman.dtsi | 28 | ||||
| -rw-r--r-- | arch/arm/dts/k3-am62p-sk-binman.dtsi | 28 | ||||
| -rw-r--r-- | arch/arm/dts/k3-am62p5-verdin-wifi-dev-binman.dtsi | 15 | ||||
| -rw-r--r-- | arch/arm/mach-k3/common.c | 27 | ||||
| -rw-r--r-- | arch/arm/mach-k3/common.h | 10 | ||||
| -rw-r--r-- | arch/arm/mach-k3/include/mach/hardware.h | 11 | ||||
| -rw-r--r-- | arch/arm/mach-k3/r5/common.c | 14 | ||||
| -rw-r--r-- | board/phytec/phycore_am62ax/phycore-am62ax.c | 6 | ||||
| -rw-r--r-- | board/phytec/phycore_am62x/phycore-am62x.c | 6 | ||||
| -rw-r--r-- | board/ti/am62ax/evm.c | 6 | ||||
| -rw-r--r-- | board/ti/am62px/evm.c | 6 | ||||
| -rw-r--r-- | board/ti/am62x/evm.c | 6 | ||||
| -rw-r--r-- | board/toradex/verdin-am62/verdin-am62.c | 5 | ||||
| -rw-r--r-- | board/toradex/verdin-am62p/verdin-am62p.c | 5 |
18 files changed, 241 insertions, 92 deletions
diff --git a/arch/arm/dts/k3-am625-phycore-som-binman.dtsi b/arch/arm/dts/k3-am625-phycore-som-binman.dtsi index 0499c719396..6d57a5d9ffa 100644 --- a/arch/arm/dts/k3-am625-phycore-som-binman.dtsi +++ b/arch/arm/dts/k3-am625-phycore-som-binman.dtsi @@ -314,13 +314,24 @@ }; configurations { - default = "conf-0"; + default = "conf-hs-fs"; - conf-0 { - description = "k3-am625-phyboard-lyra-rdk"; + conf-hs-fs { + description = "k3-am625-phyboard-lyra-rdk-hs-fs"; + firmware = "atf"; + loadables = "tee", "tifsstub-fs", "dm", "spl"; + fdt = "fdt-0"; + }; + conf-hs-se { + description = "k3-am625-phyboard-lyra-rdk-hs-se"; + firmware = "atf"; + loadables = "tee", "tifsstub-hs", "dm", "spl"; + fdt = "fdt-0"; + }; + conf-gp { + description = "k3-am625-phyboard-lyra-rdk-gp"; firmware = "atf"; - loadables = "tee", "tifsstub-hs", "tifsstub-fs", - "tifsstub-gp", "dm", "spl"; + loadables = "tee", "tifsstub-gp", "dm", "spl"; fdt = "fdt-0"; }; }; @@ -552,13 +563,24 @@ }; configurations { - default = "conf-0"; + default = "conf-hs-fs"; - conf-0 { - description = "k3-am625-phyboard-lyra-rdk"; + conf-hs-fs { + description = "k3-am625-phyboard-lyra-rdk-hs-fs"; + firmware = "atf"; + loadables = "tee", "tifsstub-fs", "dm", "spl"; + fdt = "fdt-0"; + }; + conf-hs-se { + description = "k3-am625-phyboard-lyra-rdk-hs-se"; + firmware = "atf"; + loadables = "tee", "tifsstub-hs", "dm", "spl"; + fdt = "fdt-0"; + }; + conf-gp { + description = "k3-am625-phyboard-lyra-rdk-gp"; firmware = "atf"; - loadables = "tee", "tifsstub-hs", "tifsstub-fs", - "tifsstub-gp", "dm", "spl"; + loadables = "tee", "tifsstub-gp", "dm", "spl"; fdt = "fdt-0"; }; }; diff --git a/arch/arm/dts/k3-am625-sk-binman.dtsi b/arch/arm/dts/k3-am625-sk-binman.dtsi index ba29a047406..1717621a850 100644 --- a/arch/arm/dts/k3-am625-sk-binman.dtsi +++ b/arch/arm/dts/k3-am625-sk-binman.dtsi @@ -263,12 +263,21 @@ }; configurations { - default = "conf-0"; - conf-0 { - description = "k3-am625-sk-falcon"; + default = "conf-hs-fs"; + conf-hs-fs { + description = "k3-am625-sk-falcon-hs-fs"; + firmware = "atf"; + loadables = "tee", "tifsstub-fs", "dm"; + }; + conf-hs-se { + description = "k3-am625-sk-falcon-hs-se"; + firmware = "atf"; + loadables = "tee", "tifsstub-hs", "dm"; + }; + conf-gp { + description = "k3-am625-sk-falcon-gp"; firmware = "atf"; - loadables = "tee", "tifsstub-hs", "tifsstub-fs", - "tifsstub-gp", "dm"; + loadables = "tee", "tifsstub-gp", "dm"; }; }; }; @@ -376,13 +385,24 @@ }; configurations { - default = "conf-0"; + default = "conf-hs-fs"; - conf-0 { - description = "k3-am625-sk"; + conf-hs-fs { + description = "k3-am625-sk-hs-fs"; + firmware = "atf"; + loadables = "tee", "tifsstub-fs", "dm", "spl"; + fdt = "fdt-0"; + }; + conf-hs-se { + description = "k3-am625-sk-hs-se"; firmware = "atf"; - loadables = "tee", "tifsstub-hs", "tifsstub-fs", - "tifsstub-gp", "dm", "spl"; + loadables = "tee", "tifsstub-hs", "dm", "spl"; + fdt = "fdt-0"; + }; + conf-gp { + description = "k3-am625-sk-gp"; + firmware = "atf"; + loadables = "tee", "tifsstub-gp", "dm", "spl"; fdt = "fdt-0"; }; }; @@ -497,13 +517,24 @@ }; configurations { - default = "conf-0"; + default = "conf-hs-fs"; - conf-0 { - description = "k3-am625-sk"; + conf-hs-fs { + description = "k3-am625-sk-hs-fs"; + firmware = "atf"; + loadables = "tee", "tifsstub-fs", "dm", "spl"; + fdt = "fdt-0"; + }; + conf-hs-se { + description = "k3-am625-sk-hs-se"; + firmware = "atf"; + loadables = "tee", "tifsstub-hs", "dm", "spl"; + fdt = "fdt-0"; + }; + conf-gp { + description = "k3-am625-sk-gp"; firmware = "atf"; - loadables = "tee", "tifsstub-hs", "tifsstub-fs", - "tifsstub-gp", "dm", "spl"; + loadables = "tee", "tifsstub-gp", "dm", "spl"; fdt = "fdt-0"; }; }; diff --git a/arch/arm/dts/k3-am625-verdin-wifi-dev-binman.dtsi b/arch/arm/dts/k3-am625-verdin-wifi-dev-binman.dtsi index e72065209f2..35b7f8b256e 100644 --- a/arch/arm/dts/k3-am625-verdin-wifi-dev-binman.dtsi +++ b/arch/arm/dts/k3-am625-verdin-wifi-dev-binman.dtsi @@ -299,13 +299,24 @@ }; configurations { - default = "conf-0"; + default = "conf-hs-fs"; - conf-0 { - description = "k3-am625-verdin-wifi-dev"; + conf-hs-fs { + description = "k3-am625-verdin-wifi-dev-hs-fs"; + firmware = "atf"; + loadables = "tee", "tifsstub-fs", "dm", "spl"; + fdt = "fdt-0"; + }; + conf-hs-se { + description = "k3-am625-verdin-wifi-dev-hs-se"; + firmware = "atf"; + loadables = "tee", "tifsstub-hs", "dm", "spl"; + fdt = "fdt-0"; + }; + conf-gp { + description = "k3-am625-verdin-wifi-dev-gp"; firmware = "atf"; - loadables = "tee", "tifsstub-hs", "tifsstub-fs", - "tifsstub-gp", "dm", "spl"; + loadables = "tee", "tifsstub-gp", "dm", "spl"; fdt = "fdt-0"; }; }; @@ -418,13 +429,24 @@ }; configurations { - default = "conf-0"; + default = "conf-hs-fs"; - conf-0 { - description = "k3-am625-verdin-wifi-dev"; + conf-hs-fs { + description = "k3-am625-verdin-wifi-dev-hs-fs"; + firmware = "atf"; + loadables = "tee", "tifsstub-fs", "dm", "spl"; + fdt = "fdt-0"; + }; + conf-hs-se { + description = "k3-am625-verdin-wifi-dev-hs-se"; + firmware = "atf"; + loadables = "tee", "tifsstub-hs", "dm", "spl"; + fdt = "fdt-0"; + }; + conf-gp { + description = "k3-am625-verdin-wifi-dev-gp"; firmware = "atf"; - loadables = "tee", "tifsstub-hs", "tifsstub-fs", - "tifsstub-gp", "dm", "spl"; + loadables = "tee", "tifsstub-gp", "dm", "spl"; fdt = "fdt-0"; }; }; diff --git a/arch/arm/dts/k3-am62a-phycore-som-binman.dtsi b/arch/arm/dts/k3-am62a-phycore-som-binman.dtsi index 6f82a40908f..cdc9a100a04 100644 --- a/arch/arm/dts/k3-am62a-phycore-som-binman.dtsi +++ b/arch/arm/dts/k3-am62a-phycore-som-binman.dtsi @@ -247,13 +247,18 @@ }; configurations { - default = "conf-0"; + default = "conf-hs-fs"; - conf-0 { - description = "k3-am62a7-phyboard-lyra-rdk"; + conf-hs-fs { + description = "k3-am62a7-phyboard-lyra-rdk-hs-fs"; + firmware = "atf"; + loadables = "tee", "dm", "spl", "tifsstub-fs"; + fdt = "fdt-0"; + }; + conf-hs-se { + description = "k3-am62a7-phyboard-lyra-rdk-hs-se"; firmware = "atf"; - loadables = "tee", "dm", "spl", - "tifsstub-hs", "tifsstub-fs"; + loadables = "tee", "dm", "spl", "tifsstub-hs"; fdt = "fdt-0"; }; }; diff --git a/arch/arm/dts/k3-am62a-sk-binman.dtsi b/arch/arm/dts/k3-am62a-sk-binman.dtsi index 49c90f5855c..6e7deb218e9 100644 --- a/arch/arm/dts/k3-am62a-sk-binman.dtsi +++ b/arch/arm/dts/k3-am62a-sk-binman.dtsi @@ -185,11 +185,16 @@ }; configurations { - default = "conf-0"; - conf-0 { - description = "k3-am62a7-sk-falcon"; + default = "conf-hs-fs"; + conf-hs-fs { + description = "k3-am62a7-sk-falcon-hs-fs"; + firmware = "atf"; + loadables = "tee", "dm", "tifsstub-fs"; + }; + conf-hs-se { + description = "k3-am62a7-sk-falcon-hs-se"; firmware = "atf"; - loadables = "tee", "dm", "tifsstub-hs", "tifsstub-fs"; + loadables = "tee", "dm", "tifsstub-hs"; }; }; }; @@ -284,13 +289,18 @@ }; configurations { - default = "conf-0"; + default = "conf-hs-fs"; - ti_spl_conf_0: conf-0 { - description = "k3-am62a7-sk"; + ti_spl_conf_0: conf-hs-fs { + description = "k3-am62a7-sk-hs-fs"; + firmware = "atf"; + loadables = "tee", "dm", "spl", "tifsstub-fs"; + fdt = "fdt-0"; + }; + conf-hs-se { + description = "k3-am62a7-sk-hs-se"; firmware = "atf"; - loadables = "tee", "dm", "spl", - "tifsstub-hs", "tifsstub-fs"; + loadables = "tee", "dm", "spl", "tifsstub-hs"; fdt = "fdt-0"; }; }; diff --git a/arch/arm/dts/k3-am62p-sk-binman.dtsi b/arch/arm/dts/k3-am62p-sk-binman.dtsi index cca56b76d69..c56ecad85a6 100644 --- a/arch/arm/dts/k3-am62p-sk-binman.dtsi +++ b/arch/arm/dts/k3-am62p-sk-binman.dtsi @@ -206,11 +206,16 @@ }; configurations { - default = "conf-0"; - conf-0 { - description = "k3-am62p5-sk-falcon"; + default = "conf-hs-fs"; + conf-hs-fs { + description = "k3-am62p5-sk-falcon-hs-fs"; firmware = "atf"; - loadables = "tee", "dm", "tifsstub-hs", "tifsstub-fs"; + loadables = "tee", "dm", "tifsstub-fs"; + }; + conf-hs-se { + description = "k3-am62p5-sk-falcon-hs-se"; + firmware = "atf"; + loadables = "tee", "dm", "tifsstub-hs"; }; }; }; @@ -309,13 +314,18 @@ }; configurations { - default = "conf-0"; + default = "conf-hs-fs"; - conf-0 { - description = "k3-am62px-sk"; + conf-hs-fs { + description = "k3-am62px-sk-hs-fs"; + firmware = "atf"; + loadables = "tee", "dm", "spl", "tifsstub-fs"; + fdt = "fdt-0"; + }; + conf-hs-se { + description = "k3-am62px-sk-hs-se"; firmware = "atf"; - loadables = "tee", "dm", "spl", - "tifsstub-hs", "tifsstub-fs"; + loadables = "tee", "dm", "spl", "tifsstub-hs"; fdt = "fdt-0"; }; }; diff --git a/arch/arm/dts/k3-am62p5-verdin-wifi-dev-binman.dtsi b/arch/arm/dts/k3-am62p5-verdin-wifi-dev-binman.dtsi index 2682ba13afb..307cac5ebc7 100644 --- a/arch/arm/dts/k3-am62p5-verdin-wifi-dev-binman.dtsi +++ b/arch/arm/dts/k3-am62p5-verdin-wifi-dev-binman.dtsi @@ -252,13 +252,18 @@ }; configurations { - default = "conf-0"; + default = "conf-hs-fs"; - conf-0 { - description = "k3-am62p5-verdin-wifi-dev"; + conf-hs-fs { + description = "k3-am62p5-verdin-wifi-dev-hs-fs"; + firmware = "atf"; + loadables = "tee", "tifsstub-fs", "dm", "spl"; + fdt = "fdt-0"; + }; + conf-hs-se { + description = "k3-am62p5-verdin-wifi-dev-hs-se"; firmware = "atf"; - loadables = "tee", "tifsstub-hs", "tifsstub-fs", - "dm", "spl"; + loadables = "tee", "tifsstub-hs", "dm", "spl"; fdt = "fdt-0"; }; }; diff --git a/arch/arm/mach-k3/common.c b/arch/arm/mach-k3/common.c index 19a6e24f38b..6e382efdb3b 100644 --- a/arch/arm/mach-k3/common.c +++ b/arch/arm/mach-k3/common.c @@ -191,6 +191,33 @@ enum k3_device_type get_device_type(void) } } +int k3_fit_config_match_security_state(const char *name) +{ + const char *suffix; + size_t name_len, suffix_len; + + switch (get_device_type()) { + case K3_DEVICE_TYPE_HS_SE: + suffix = "-hs-se"; + break; + case K3_DEVICE_TYPE_HS_FS: + suffix = "-hs-fs"; + break; + case K3_DEVICE_TYPE_GP: + suffix = "-gp"; + break; + default: + return -EINVAL; + } + + name_len = strlen(name); + suffix_len = strlen(suffix); + if (name_len < suffix_len) + return -EINVAL; + + return strncmp(name + name_len - suffix_len, suffix, suffix_len); +} + #if defined(CONFIG_DISPLAY_CPUINFO) static const char *get_device_type_name(void) { diff --git a/arch/arm/mach-k3/common.h b/arch/arm/mach-k3/common.h index 466ad22f895..37ff98d8992 100644 --- a/arch/arm/mach-k3/common.h +++ b/arch/arm/mach-k3/common.h @@ -32,15 +32,6 @@ enum k3_firewall_region_type { K3_FIREWALL_REGION_BACKGROUND }; -enum k3_device_type { - K3_DEVICE_TYPE_BAD, - K3_DEVICE_TYPE_GP, - K3_DEVICE_TYPE_TEST, - K3_DEVICE_TYPE_EMU, - K3_DEVICE_TYPE_HS_FS, - K3_DEVICE_TYPE_HS_SE, -}; - void setup_k3_mpu_regions(void); int early_console_init(void); void disable_linefill_optimization(void); @@ -55,7 +46,6 @@ const struct k3_speed_grade_map *k3_get_speed_grade_map(void); void k3_fix_rproc_clock(const char *path); void mmr_unlock(uintptr_t base, u32 partition); bool is_rom_loaded_sysfw(struct rom_extended_boot_data *data); -enum k3_device_type get_device_type(void); struct ti_sci_handle *get_ti_sci_handle(void); void do_board_detect(void); void ti_secure_image_check_binary(void **p_image, size_t *p_size); diff --git a/arch/arm/mach-k3/include/mach/hardware.h b/arch/arm/mach-k3/include/mach/hardware.h index b337a71956f..2c771a1195f 100644 --- a/arch/arm/mach-k3/include/mach/hardware.h +++ b/arch/arm/mach-k3/include/mach/hardware.h @@ -124,8 +124,19 @@ struct rom_extended_boot_data { u32 num_components; }; +enum k3_device_type { + K3_DEVICE_TYPE_BAD, + K3_DEVICE_TYPE_GP, + K3_DEVICE_TYPE_TEST, + K3_DEVICE_TYPE_EMU, + K3_DEVICE_TYPE_HS_FS, + K3_DEVICE_TYPE_HS_SE, +}; + u32 get_boot_device(void); const char *get_reset_reason(void); +enum k3_device_type get_device_type(void); +int k3_fit_config_match_security_state(const char *name); #define writel_verify(val, addr) \ do { \ diff --git a/arch/arm/mach-k3/r5/common.c b/arch/arm/mach-k3/r5/common.c index 484d96f9536..13736ca5dbc 100644 --- a/arch/arm/mach-k3/r5/common.c +++ b/arch/arm/mach-k3/r5/common.c @@ -348,19 +348,7 @@ void board_fit_image_post_process(const void *fit, int node, void **p_image, } if (i < IMAGE_AMT && i > IMAGE_ID_DM_FW) { - int device_type = get_device_type(); - - if ((device_type == K3_DEVICE_TYPE_HS_SE && - strcmp(os, "tifsstub-hs")) || - (device_type == K3_DEVICE_TYPE_HS_FS && - strcmp(os, "tifsstub-fs")) || - (device_type == K3_DEVICE_TYPE_GP && - strcmp(os, "tifsstub-gp"))) { - *p_size = 0; - } else { - debug("tifsstub-type: %s\n", os); - } - + debug("tifsstub-type: %s\n", os); return; } diff --git a/board/phytec/phycore_am62ax/phycore-am62ax.c b/board/phytec/phycore_am62ax/phycore-am62ax.c index 3e1c4102cc1..b22ffe9072f 100644 --- a/board/phytec/phycore_am62ax/phycore-am62ax.c +++ b/board/phytec/phycore_am62ax/phycore-am62ax.c @@ -8,6 +8,7 @@ #include <asm/io.h> #include <spl.h> #include <fdt_support.h> +#include <image.h> #include "../common/am6_som_detection.h" @@ -57,3 +58,8 @@ void spl_board_init(void) dram_init_banksize(); } #endif + +int board_fit_config_name_match(const char *name) +{ + return k3_fit_config_match_security_state(name); +} diff --git a/board/phytec/phycore_am62x/phycore-am62x.c b/board/phytec/phycore_am62x/phycore-am62x.c index 6df521d789f..376379767cf 100644 --- a/board/phytec/phycore_am62x/phycore-am62x.c +++ b/board/phytec/phycore_am62x/phycore-am62x.c @@ -9,6 +9,7 @@ #include <spl.h> #include <asm/arch/k3-ddr.h> #include <fdt_support.h> +#include <image.h> #include "phycore-ddr-data.h" #include "../common/k3/k3_ddrss_patch.h" @@ -237,3 +238,8 @@ void spl_board_init(void) MCU_CTRL_DEVICE_CLKOUT_32K_CTRL); } #endif + +int board_fit_config_name_match(const char *name) +{ + return k3_fit_config_match_security_state(name); +} diff --git a/board/ti/am62ax/evm.c b/board/ti/am62ax/evm.c index 4916eec3b2b..adb784e69a8 100644 --- a/board/ti/am62ax/evm.c +++ b/board/ti/am62ax/evm.c @@ -6,6 +6,7 @@ * */ +#include <image.h> #include <asm/arch/hardware.h> #include <asm/io.h> #include <dm/uclass.h> @@ -17,6 +18,11 @@ #include "../common/fdt_ops.h" #include "../common/k3_32k_lfosc.h" +int board_fit_config_name_match(const char *name) +{ + return k3_fit_config_match_security_state(name); +} + #if defined(CONFIG_XPL_BUILD) void spl_perform_board_fixups(struct spl_image_info *spl_image) { diff --git a/board/ti/am62px/evm.c b/board/ti/am62px/evm.c index 8fde47fb1be..9fa0a1c9f72 100644 --- a/board/ti/am62px/evm.c +++ b/board/ti/am62px/evm.c @@ -7,6 +7,7 @@ */ #include <efi_loader.h> +#include <image.h> #include <asm/arch/hardware.h> #include <asm/io.h> #include <cpu_func.h> @@ -43,6 +44,11 @@ struct efi_capsule_update_info update_info = { .images = fw_images, }; +int board_fit_config_name_match(const char *name) +{ + return k3_fit_config_match_security_state(name); +} + #if IS_ENABLED(CONFIG_SPL_BUILD) void spl_board_init(void) { diff --git a/board/ti/am62x/evm.c b/board/ti/am62x/evm.c index 49e58ad6d6c..90beed341b6 100644 --- a/board/ti/am62x/evm.c +++ b/board/ti/am62x/evm.c @@ -18,6 +18,7 @@ #include <fdt_support.h> #include <fdt_simplefb.h> #include <asm/io.h> +#include <image.h> #include <asm/arch/hardware.h> #include <dm/uclass.h> #include <asm/arch/k3-ddr.h> @@ -135,6 +136,11 @@ int board_late_init(void) } #endif +int board_fit_config_name_match(const char *name) +{ + return k3_fit_config_match_security_state(name); +} + #if defined(CONFIG_XPL_BUILD) void spl_board_init(void) { diff --git a/board/toradex/verdin-am62/verdin-am62.c b/board/toradex/verdin-am62/verdin-am62.c index 26af1af2069..a174cc43ade 100644 --- a/board/toradex/verdin-am62/verdin-am62.c +++ b/board/toradex/verdin-am62/verdin-am62.c @@ -12,6 +12,7 @@ #include <dm/uclass.h> #include <env.h> #include <fdt_support.h> +#include <image.h> #include <init.h> #include <k3-ddrss.h> #include <spl.h> @@ -57,12 +58,10 @@ phys_addr_t board_get_usable_ram_top(phys_size_t total_size) return 0x9C000000; } -#if defined(CONFIG_SPL_LOAD_FIT) int board_fit_config_name_match(const char *name) { - return 0; + return k3_fit_config_match_security_state(name); } -#endif #if IS_ENABLED(CONFIG_OF_LIBFDT) && IS_ENABLED(CONFIG_OF_BOARD_SETUP) int ft_board_setup(void *blob, struct bd_info *bd) diff --git a/board/toradex/verdin-am62p/verdin-am62p.c b/board/toradex/verdin-am62p/verdin-am62p.c index ec7775e06a7..1e7fcc9fd9d 100644 --- a/board/toradex/verdin-am62p/verdin-am62p.c +++ b/board/toradex/verdin-am62p/verdin-am62p.c @@ -14,6 +14,7 @@ #include <dm/uclass.h> #include <env.h> #include <fdt_support.h> +#include <image.h> #include <init.h> #include <k3-ddrss.h> #include <spl.h> @@ -83,12 +84,10 @@ int dram_init_banksize(void) return ret; } -#if IS_ENABLED(CONFIG_SPL_LOAD_FIT) int board_fit_config_name_match(const char *name) { - return 0; + return k3_fit_config_match_security_state(name); } -#endif #if IS_ENABLED(CONFIG_OF_LIBFDT) && IS_ENABLED(CONFIG_OF_BOARD_SETUP) int ft_board_setup(void *blob, struct bd_info *bd) |
