diff options
author | Ye Li <ye.li@nxp.com> | 2017-11-21 20:29:38 -0600 |
---|---|---|
committer | Ye Li <ye.li@nxp.com> | 2017-11-21 20:52:56 -0600 |
commit | 1d42ecc53dc05735c8ef134221c4d532c32c62b9 (patch) | |
tree | ec8a7cd7fc96ac35e8d987b981c68fea81bb80db | |
parent | f80227dedf4122bbc73523e0d2eaa9e728b43ef3 (diff) |
MLK-16930 imx6: hab: Fix secure boot build error and warning
Found secure boot build error and warning for some i.MX6 platforms without
CONFIG_ROM_UNIFIED_SECTIONS defined. Fix them in this patch.
In file included from arch/arm/imx-common/hab.c:14:0:
arch/arm/imx-common/hab.c: In function ‘hab_rvt_report_event’:
./arch/arm/include/asm/imx-common/hab.h:152:59: error: ‘HAB_RVT_BASE_ARM64’ undeclared (first use in this function)
^
arch/arm/imx-common/hab.c:23:29: note: in expansion of macro ‘HAB_RVT_REPORT_EVENT_ARM64’
((hab_rvt_report_event_t *)HAB_RVT_REPORT_EVENT_ARM64) : \
^
arch/arm/imx-common/hab.c:153:30: note: in expansion of macro ‘hab_rvt_report_event_p’
hab_rvt_report_event_func = hab_rvt_report_event_p;
^
./arch/arm/include/asm/imx-common/hab.h:152:59: note: each undeclared identifier is reported only once for each function it appears in
^
arch/arm/imx-common/hab.c:23:29: note: in expansion of macro ‘HAB_RVT_REPORT_EVENT_ARM64’
((hab_rvt_report_event_t *)HAB_RVT_REPORT_EVENT_ARM64) : \
arch/arm/imx-common/hab.c:126:23: warning: 'gd_save' defined but not used [-Wunused-variable]
static volatile gd_t *gd_save;
Signed-off-by: Ye Li <ye.li@nxp.com>
Acked-by: Peng Fan <peng.fan@nxp.com>
-rw-r--r-- | arch/arm/imx-common/hab.c | 3 | ||||
-rw-r--r-- | arch/arm/include/asm/imx-common/hab.h | 15 |
2 files changed, 11 insertions, 7 deletions
diff --git a/arch/arm/imx-common/hab.c b/arch/arm/imx-common/hab.c index 62c51c37f8..dfda5ee771 100644 --- a/arch/arm/imx-common/hab.c +++ b/arch/arm/imx-common/hab.c @@ -122,8 +122,9 @@ DECLARE_GLOBAL_DATA_PTR; * | | * +------------+ + CSF_PAD_SIZE */ - +#ifdef CONFIG_ARM64 static volatile gd_t *gd_save; +#endif static bool is_hab_enabled(void); diff --git a/arch/arm/include/asm/imx-common/hab.h b/arch/arm/include/asm/imx-common/hab.h index 3b1b3767f3..a2476ad287 100644 --- a/arch/arm/include/asm/imx-common/hab.h +++ b/arch/arm/include/asm/imx-common/hab.h @@ -140,17 +140,20 @@ typedef void hapi_clock_init_t(void); #define HAB_ENG_SW 0xff /* Software engine */ #ifdef CONFIG_ROM_UNIFIED_SECTIONS -#define HAB_RVT_BASE_ARM64 0x00000880 +#ifdef CONFIG_ARM64 +#define HAB_RVT_BASE 0x00000880 +#else #define HAB_RVT_BASE 0x00000100 +#endif #else #define HAB_RVT_BASE 0x00000094 #endif -#define HAB_RVT_ENTRY_ARM64 ((ulong)*(uint32_t *)(HAB_RVT_BASE_ARM64 + 0x08)) -#define HAB_RVT_EXIT_ARM64 ((ulong)*(uint32_t *)(HAB_RVT_BASE_ARM64 + 0x10)) -#define HAB_RVT_AUTHENTICATE_IMAGE_ARM64 ((ulong)*(uint32_t *)(HAB_RVT_BASE_ARM64 + 0x20)) -#define HAB_RVT_REPORT_EVENT_ARM64 ((ulong)*(uint32_t *)(HAB_RVT_BASE_ARM64 + 0x40)) -#define HAB_RVT_REPORT_STATUS_ARM64 ((ulong)*(uint32_t *)(HAB_RVT_BASE_ARM64 + 0x48)) +#define HAB_RVT_ENTRY_ARM64 ((ulong)*(uint32_t *)(HAB_RVT_BASE + 0x08)) +#define HAB_RVT_EXIT_ARM64 ((ulong)*(uint32_t *)(HAB_RVT_BASE + 0x10)) +#define HAB_RVT_AUTHENTICATE_IMAGE_ARM64 ((ulong)*(uint32_t *)(HAB_RVT_BASE + 0x20)) +#define HAB_RVT_REPORT_EVENT_ARM64 ((ulong)*(uint32_t *)(HAB_RVT_BASE + 0x40)) +#define HAB_RVT_REPORT_STATUS_ARM64 ((ulong)*(uint32_t *)(HAB_RVT_BASE + 0x48)) #define HAB_RVT_ENTRY ((ulong)*(uint32_t *)(HAB_RVT_BASE + 0x04)) #define HAB_RVT_EXIT ((ulong)*(uint32_t *)(HAB_RVT_BASE + 0x08)) |