public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH v3] imx6sx: Fix i.MX6SX HAB api function table offset
@ 2014-09-30 16:39 Nitin Garg
  2014-10-01  7:11 ` Stefano Babic
  0 siblings, 1 reply; 2+ messages in thread
From: Nitin Garg @ 2014-09-30 16:39 UTC (permalink / raw)
  To: u-boot

i.MX6SX ROM implements unified table sections.
The HAB function table is at offset 0x100. Update
the HAB function pointers accordingly.

Signed-off-by: Nitin Garg <nitin.garg@freescale.com>
Tested-by: Fabio Estevam <fabio.estevam@freescale.com>

---

Changes in v3:
-Removed CONFIG_ROM_UNIFIED_SECTIONS instead use
CONFIG_MX6SX

Changes in v2:
-Moved CONFIG_ROM_UNIFIED_SECTIONS to mx6_common.h
-Simplified hab.h changes
-Added Fabio as Tested-by

 arch/arm/include/asm/arch-mx6/hab.h |   16 +++++++++++-----
 1 file changed, 11 insertions(+), 5 deletions(-)

diff --git a/arch/arm/include/asm/arch-mx6/hab.h b/arch/arm/include/asm/arch-mx6/hab.h
index 1f12695..c9e5318 100644
--- a/arch/arm/include/asm/arch-mx6/hab.h
+++ b/arch/arm/include/asm/arch-mx6/hab.h
@@ -53,11 +53,17 @@ typedef void *hab_rvt_authenticate_image_t(uint8_t, ptrdiff_t,
 		void **, size_t *, hab_loader_callback_f_t);
 typedef void hapi_clock_init_t(void);
 
-#define HAB_RVT_REPORT_EVENT                   (*(uint32_t *)0x000000B4)
-#define HAB_RVT_REPORT_STATUS                  (*(uint32_t *)0x000000B8)
-#define HAB_RVT_AUTHENTICATE_IMAGE             (*(uint32_t *)0x000000A4)
-#define HAB_RVT_ENTRY                          (*(uint32_t *)0x00000098)
-#define HAB_RVT_EXIT                           (*(uint32_t *)0x0000009C)
+#ifdef CONFIG_MX6SX
+#define HAB_RVT_BASE			0x00000100
+#else
+#define HAB_RVT_BASE			0x00000094
+#endif
+
+#define HAB_RVT_ENTRY			(*(uint32_t *)(HAB_RVT_BASE + 0x04))
+#define HAB_RVT_EXIT			(*(uint32_t *)(HAB_RVT_BASE + 0x08))
+#define HAB_RVT_AUTHENTICATE_IMAGE	(*(uint32_t *)(HAB_RVT_BASE + 0x10))
+#define HAB_RVT_REPORT_EVENT		(*(uint32_t *)(HAB_RVT_BASE + 0x20))
+#define HAB_RVT_REPORT_STATUS		(*(uint32_t *)(HAB_RVT_BASE + 0x24))
 
 #define HAB_RVT_REPORT_EVENT_NEW               (*(uint32_t *)0x000000B8)
 #define HAB_RVT_REPORT_STATUS_NEW              (*(uint32_t *)0x000000BC)
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [U-Boot] [PATCH v3] imx6sx: Fix i.MX6SX HAB api function table offset
  2014-09-30 16:39 [U-Boot] [PATCH v3] imx6sx: Fix i.MX6SX HAB api function table offset Nitin Garg
@ 2014-10-01  7:11 ` Stefano Babic
  0 siblings, 0 replies; 2+ messages in thread
From: Stefano Babic @ 2014-10-01  7:11 UTC (permalink / raw)
  To: u-boot

Hi Nitin,

On 30/09/2014 18:39, Nitin Garg wrote:
> i.MX6SX ROM implements unified table sections.
> The HAB function table is at offset 0x100. Update
> the HAB function pointers accordingly.
> 
> Signed-off-by: Nitin Garg <nitin.garg@freescale.com>
> Tested-by: Fabio Estevam <fabio.estevam@freescale.com>
> 
> ---
> 

Applied to u-boot-imx, thanks!

Best regards,
Stefano Babic

-- 
=====================================================================
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
=====================================================================

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-10-01  7:11 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-09-30 16:39 [U-Boot] [PATCH v3] imx6sx: Fix i.MX6SX HAB api function table offset Nitin Garg
2014-10-01  7:11 ` Stefano Babic

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox