From patchwork Tue Sep 30 16:00:07 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nitin Garg X-Patchwork-Id: 395035 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id 65784140078 for ; Wed, 1 Oct 2014 02:00:40 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 25C424B634; Tue, 30 Sep 2014 18:00:38 +0200 (CEST) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id NB2ip2UIuGnu; Tue, 30 Sep 2014 18:00:37 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 93B564B62B; Tue, 30 Sep 2014 18:00:37 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 120944B62B for ; Tue, 30 Sep 2014 18:00:33 +0200 (CEST) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id uZQ27K9URSJF for ; Tue, 30 Sep 2014 18:00:32 +0200 (CEST) X-Greylist: delayed 1161 seconds by postgrey-1.32 at theia; Tue, 30 Sep 2014 18:00:28 CEST X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from na01-by2-obe.outbound.protection.outlook.com (mail-by2on0132.outbound.protection.outlook.com [207.46.100.132]) by theia.denx.de (Postfix) with ESMTPS id 442674B625 for ; Tue, 30 Sep 2014 18:00:28 +0200 (CEST) Received: from BL2PR03MB241.namprd03.prod.outlook.com (10.255.231.15) by BL2PR03MB1011.namprd03.prod.outlook.com (10.141.182.149) with Microsoft SMTP Server (TLS) id 15.0.1039.15; Tue, 30 Sep 2014 16:00:25 +0000 Received: from CH1PR03CA004.namprd03.prod.outlook.com (10.255.156.149) by BL2PR03MB241.namprd03.prod.outlook.com (10.255.231.15) with Microsoft SMTP Server (TLS) id 15.0.1039.15; Tue, 30 Sep 2014 16:00:24 +0000 Received: from BY2FFO11FD051.protection.gbl (10.255.156.132) by CH1PR03CA004.outlook.office365.com (10.255.156.149) with Microsoft SMTP Server (TLS) id 15.0.1039.15 via Frontend Transport; Tue, 30 Sep 2014 16:00:23 +0000 Received: from az84smr01.freescale.net (192.88.158.2) by BY2FFO11FD051.mail.protection.outlook.com (10.1.15.188) with Microsoft SMTP Server (TLS) id 15.0.1029.15 via Frontend Transport; Tue, 30 Sep 2014 16:00:20 +0000 Received: from b37173-desktop.am.freescale.net (b37173-desktop.am.freescale.net [10.81.16.106]) by az84smr01.freescale.net (8.14.3/8.14.0) with ESMTP id s8UG09dJ008153; Tue, 30 Sep 2014 09:00:09 -0700 From: Nitin Garg To: Stefano Babic Date: Tue, 30 Sep 2014 11:00:07 -0500 Message-ID: <1412092807-27387-1-git-send-email-nitin.garg@freescale.com> X-Mailer: git-send-email 1.7.9.5 X-EOPAttributedMessage: 0 X-Forefront-Antispam-Report: CIP:192.88.158.2; CTRY:US; IPV:CAL; IPV:NLI; EFV:NLI; SFV:NSPM; SFS:(10019020)(6009001)(199003)(189002)(19580405001)(97736003)(48376002)(31966008)(6806004)(19580395003)(4396001)(36756003)(44976005)(50466002)(120916001)(87286001)(84676001)(106466001)(21056001)(92566001)(105606002)(102836001)(50226001)(64706001)(89996001)(77156001)(104166001)(99396003)(81156004)(87936001)(88136002)(20776003)(47776003)(10300001)(93916002)(92726001)(62966002)(69596002)(85852003)(95666004)(104016003)(85306004)(50986999)(229853001)(107046002)(76482002)(33646002)(86362001)(68736004)(26826002)(110136001)(80022003)(46102003)(32563001); DIR:OUT; SFP:1102; SCL:1; SRVR:BL2PR03MB241; H:az84smr01.freescale.net; FPR:; MLV:ovrnspm; PTR:InfoDomainNonexistent; A:1; MX:1; LANG:en; MIME-Version: 1.0 X-Microsoft-Antispam: UriScan:;UriScan:; X-Microsoft-Antispam: BCL:0;PCL:0;RULEID:;SRVR:BL2PR03MB241; X-Exchange-Antispam-Report-Test: UriScan:; X-Forefront-PRVS: 0350D7A55D Received-SPF: Fail (protection.outlook.com: domain of freescale.com does not designate 192.88.158.2 as permitted sender) receiver=protection.outlook.com; client-ip=192.88.158.2; helo=az84smr01.freescale.net; Authentication-Results: spf=fail (sender IP is 192.88.158.2) smtp.mailfrom=nitin.garg@freescale.com; X-Microsoft-Antispam: BCL:0;PCL:0;RULEID:;SRVR:BL2PR03MB1011; X-OriginatorOrg: freescale.com Cc: Fabio Estevam , u-boot@lists.denx.de Subject: [U-Boot] [PATCH v2] imx6sx: Fix i.MX6SX HAB api function table offset X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.13 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de 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 Tested-by: Fabio Estevam --- 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 +++++++++++----- include/configs/mx6_common.h | 4 ++++ 2 files changed, 15 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..c53709b 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_ROM_UNIFIED_SECTIONS +#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) diff --git a/include/configs/mx6_common.h b/include/configs/mx6_common.h index 135a3f5..824e73f 100644 --- a/include/configs/mx6_common.h +++ b/include/configs/mx6_common.h @@ -30,4 +30,8 @@ #define CONFIG_MP +#ifdef CONFIG_MX6SX +#define CONFIG_ROM_UNIFIED_SECTIONS +#endif + #endif