Skip to content
Snippets Groups Projects
Commit 3166537a authored by Peng Fan's avatar Peng Fan Committed by Fabio Estevam
Browse files

imx9: soc: Print ELE information


The boot image includes Edgelock Enclave(ELE) Firmware. Print the
information out to let user know which version firmware is being used.

Signed-off-by: default avatarPeng Fan <peng.fan@nxp.com>
parent 44541def
No related branches found
No related tags found
No related merge requests found
......@@ -582,6 +582,39 @@ static int fixup_thermal_trips(void *blob, const char *name)
return 0;
}
void build_info(void)
{
u32 fw_version, sha1, res, status;
int ret;
printf("\nBuildInfo:\n");
ret = ele_get_fw_status(&status, &res);
if (ret) {
printf(" - ELE firmware status failed %d, 0x%x\n", ret, res);
} else if ((status & 0xff) == 1) {
ret = ele_get_fw_version(&fw_version, &sha1, &res);
if (ret) {
printf(" - ELE firmware version failed %d, 0x%x\n", ret, res);
} else {
printf(" - ELE firmware version %u.%u.%u-%x",
(fw_version & (0x00ff0000)) >> 16,
(fw_version & (0x0000fff0)) >> 4,
(fw_version & (0x0000000f)), sha1);
((fw_version & (0x80000000)) >> 31) == 1 ? puts("-dirty\n") : puts("\n");
}
} else {
printf(" - ELE firmware not included\n");
}
puts("\n");
}
int arch_misc_init(void)
{
build_info();
return 0;
}
int ft_system_setup(void *blob, struct bd_info *bd)
{
if (fixup_thermal_trips(blob, "cpu-thermal"))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment