};
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";
};
};
};
};
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";
};
};
};
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";
};
};
};
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";
};
};
};
};
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";
};
};
};
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";
};
};
};
};
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";
};
};
}
}
+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)
{
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);
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);
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 { \
*
*/
+#include <image.h>
#include <asm/arch/hardware.h>
#include <asm/io.h>
#include <dm/uclass.h>
#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)
{
*/
#include <efi_loader.h>
+#include <image.h>
#include <asm/arch/hardware.h>
#include <asm/io.h>
#include <cpu_func.h>
.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)
{
#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>
}
#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)
{