summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/hab/habv4.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/hab/habv4.c b/drivers/hab/habv4.c
index 0238b98dfb..f74de009fc 100644
--- a/drivers/hab/habv4.c
+++ b/drivers/hab/habv4.c
@@ -168,6 +168,7 @@ struct habv4_rvt {
#define FSL_SIP_HAB_REPORT_STATUS 0x04
#define FSL_SIP_HAB_FAILSAFE 0x05
#define FSL_SIP_HAB_CHECK_TARGET 0x06
+#define FSL_SIP_HAB_GET_VERSION 0x07
static enum hab_status hab_sip_report_status(enum hab_config *config,
enum habv4_state *state)
@@ -193,6 +194,15 @@ static enum hab_status hab_sip_report_status(enum hab_config *config,
return (enum hab_status)res.a0;
}
+static uint32_t hab_sip_get_version(void)
+{
+ struct arm_smccc_res res;
+
+ arm_smccc_smc(FSL_SIP_HAB, FSL_SIP_HAB_GET_VERSION, 0, 0, 0, 0, 0, 0, &res);
+
+ return (uint32_t)res.a0;
+}
+
#define IMX8MQ_ROM_OCRAM_ADDRESS 0x9061C0
#define IMX8MM_ROM_OCRAM_ADDRESS 0x908040
#define IMX8MN_ROM_OCRAM_ADDRESS 0x908040
@@ -610,6 +620,8 @@ static int init_imx8m_hab_get_status(void)
/* can happen in multi-image builds and is not an error */
return 0;
+ pr_info("ROM version: 0x%x\n", hab_sip_get_version());
+
/*
* Nobody will check the return value if there were HAB errors, but the
* initcall will fail spectaculously with a strange error message.