Message ID | 1444675696-5075-9-git-send-email-aalonso@freescale.com |
---|---|
State | Awaiting Upstream |
Delegated to: | Stefano Babic |
Headers | show
Return-Path: <u-boot-bounces@lists.denx.de> 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 24C73140D96 for <incoming@patchwork.ozlabs.org>; Tue, 13 Oct 2015 05:51:24 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 5F0424B8CB; Mon, 12 Oct 2015 20:51:16 +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 0OXqY8UR5N-j; Mon, 12 Oct 2015 20:51:16 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id D7A494B8D3; Mon, 12 Oct 2015 20:51:07 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 537344B83E for <u-boot@lists.denx.de>; Mon, 12 Oct 2015 20:51:02 +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 yv2C949Qw1hz for <u-boot@lists.denx.de>; Mon, 12 Oct 2015 20:51:02 +0200 (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-bn1-obe.outbound.protection.outlook.com (mail-bn1on0143.outbound.protection.outlook.com [157.56.110.143]) by theia.denx.de (Postfix) with ESMTPS id 14EE44B8C3 for <u-boot@lists.denx.de>; Mon, 12 Oct 2015 20:50:53 +0200 (CEST) Received: from CO2PR03CA0018.namprd03.prod.outlook.com (10.141.194.145) by DM2PR0301MB1310.namprd03.prod.outlook.com (10.160.222.155) with Microsoft SMTP Server (TLS) id 15.1.293.16; Mon, 12 Oct 2015 18:50:51 +0000 Received: from BN1BFFO11FD008.protection.gbl (2a01:111:f400:7c10::1:117) by CO2PR03CA0018.outlook.office365.com (2a01:111:e400:1414::17) with Microsoft SMTP Server (TLS) id 15.1.286.15 via Frontend Transport; Mon, 12 Oct 2015 18:50:50 +0000 Authentication-Results: spf=fail (sender IP is 192.88.158.2) smtp.mailfrom=freescale.com; freescale.mail.onmicrosoft.com; dkim=none (message not signed) header.d=none; freescale.mail.onmicrosoft.com; dmarc=none action=none header.from=freescale.com; 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; Received: from az84smr01.freescale.net (192.88.158.2) by BN1BFFO11FD008.mail.protection.outlook.com (10.58.144.71) with Microsoft SMTP Server (TLS) id 15.1.293.9 via Frontend Transport; Mon, 12 Oct 2015 18:50:49 +0000 Received: from bluefly.am.freescale.net (bluefly.am.freescale.net [10.81.17.130]) by az84smr01.freescale.net (8.14.3/8.14.0) with ESMTP id t9CIoGxN024758; Mon, 12 Oct 2015 11:50:48 -0700 From: Adrian Alonso <aalonso@freescale.com> To: <u-boot@lists.denx.de>, <sbabic@denx.de> Date: Mon, 12 Oct 2015 13:48:15 -0500 Message-ID: <1444675696-5075-9-git-send-email-aalonso@freescale.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1444675696-5075-1-git-send-email-aalonso@freescale.com> References: <1444675696-5075-1-git-send-email-aalonso@freescale.com> X-EOPAttributedMessage: 0 X-Microsoft-Exchange-Diagnostics: 1; BN1BFFO11FD008; 1:PTVvUyeR3QM3dOgsibez5C2gIeTFgi7YzWxpmGXzpoQgxupx8VKyapvc1qy66HYsCwLrKfqY6u39t8/ZMqo9gal0mtvi4kldjNVo8x4fEnNLqCTDD6zCZHRsSzbKcuN5QBwM0P0DvfivKvwt9ZYZlon4E9xR0rYVjpIh4aP+PBRS12CuGSZYNXVqpsmnig9WahLP+hHnHcLxY3YRz6z90qVM2BrVXrkSfn1Y9JEsLcrq9FFML4eB7nvJCBFeANHBWV6A7OX8uQViuuyBzAkY1jq3al2aB4vXWSBNnvdUP14ZC6F2MAhrrVmvNAawIEvJgNhlxPFQKdG/7x68L6/5drCfFxLoFEMqxHYrEJ/qcmXqOCPY3i/BzDZLMMYNrDf10rrcAsCqv94dNGE09TPOrw== X-Forefront-Antispam-Report: CIP:192.88.158.2; CTRY:US; IPV:NLI; EFV:NLI; SFV:NSPM; SFS:(10019020)(6009001)(2980300002)(1110001)(1109001)(339900001)(189002)(199003)(189998001)(107886002)(92566002)(229853001)(64706001)(50226001)(2950100001)(5001960100002)(97736004)(87936001)(85426001)(5007970100001)(106466001)(81156007)(69596002)(5008740100001)(19580405001)(19580395003)(5003940100001)(86362001)(5001770100001)(47776003)(105606002)(77096005)(36756003)(46102003)(33646002)(6806005)(104016004)(48376002)(50986999)(76176999)(50466002)(4001430100001); DIR:OUT; SFP:1102; SCL:1; SRVR:DM2PR0301MB1310; H:az84smr01.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; MX:1; A:1; LANG:en; MIME-Version: 1.0 X-Microsoft-Exchange-Diagnostics: 1; DM2PR0301MB1310; 2:eJ4ZwlS0vX6oPcait4skiwC1AyC282WTWviTTUFyq1uy0+CATBNPGvyO+suL3YKUB4mlnv9ijhkmPdveLf42R0Daz8e+2UlyBUqqTc97bkGOSg4qZ/SjSAY0iDcLSrae8nGB7iplBIYEBFSWF0iwKzGGBVvchA6VExTLeUJC5UA=; 3:u8/jS6Mxbyw/iz+Ui7VbTt8Qc5BwJuzZy/30y5fl2c6OPpOZAJNdQ0nbrDEm9wTEKZ6KklBkd5ogQP3sg6kEphBw2CJqYWj5dvCaOdg69O39iASjGdJ9HLTSMMlesPjwb1kUeUsxgO3IL7Fg4PYcMfXy/Q5LwKmylKRSOX3AgeOOmF1W0W8+jlXDb2B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JOxkoo5kxKEjy7bxNFO7VPh7pb25MljVNfLBde1gNfbaAmqpgfLwZ/0i4aeiIL7/gyyJHz+d2lz4r92JbdLdQ= X-Microsoft-Antispam-PRVS: <DM2PR0301MB13102D0E5071478FA4BC3570A8310@DM2PR0301MB1310.namprd03.prod.outlook.com> X-Exchange-Antispam-Report-Test: UriScan:(101931422205132); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(2401047)(5005006)(520078)(8121501046)(3002001); SRVR:DM2PR0301MB1310; BCL:0; PCL:0; RULEID:; SRVR:DM2PR0301MB1310; X-Forefront-PRVS: 0727122FC6 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; DM2PR0301MB1310; 23:KZp1RITS9oJUMcHfCUuvmal3a0sc9f6Hta7C03t?= =?us-ascii?Q?50uq2MgbMxIlaf9fn7rqMpw2wkxNcgon2CAEgLytL0KOyQztE60N2s1efTUU?= =?us-ascii?Q?zVA9Eu8hPL8mWMlZreoz55VlKds6JC0er2qelJ0eu7QEuMepMZQ/6nb420eS?= =?us-ascii?Q?3np3U7bsXxrTq0kzVxBZuxyTbfvW+mwa0gDorQDMCtaTJ5VEJbV3ilknkZwQ?= =?us-ascii?Q?Nr1guTBBvpoVHmkQoKDJVj4XUFrXbys7KUYqBwYev9HPQUbtd3Naa6arNB+n?= =?us-ascii?Q?8EIz35spxXCxpSo8S9hQgeueirTGbEiAzCsC4lE9qJtIsaUXTUVNYGDeoQ6h?= =?us-ascii?Q?ka1VnN2JoO8BIaYqriHrPiuyAwQXCLja7T3IVm73FkGBB4voVsH11C/Uw+kU?= =?us-ascii?Q?CENrHC/sHz1I0YupqAxh0GqGLZ9ETm+soBJ3wPvv+8y2cFImQdeYOcA3rLHk?= =?us-ascii?Q?pQIAAt2/ZqFASNguLXFsprf+24Ug5lfkwiS6WO2UHkOAuyZVCMq/KUUgktJM?= =?us-ascii?Q?74cYnzEzCj/nhj0VQEC0OjIEqCQNnXwA5rZhm53u6qqBVBdtwkf7vWJuZjqm?= =?us-ascii?Q?im47vPLhMp36Muyqq4kCL3i9WynMWixOphBmEPgRWJ/chQiGqZt3DnMNYeUB?= =?us-ascii?Q?PUuR4/bJnqBcjseseGTqYZtBG4/ccAajRFniuQOig1suBTCfRFemU0SZsTZZ?= =?us-ascii?Q?wPFqXPPIiWPRHzWmXQUqjueqATl1jKb+m0w2WIdhlOqyApKQNgpIuPsjzSud?= =?us-ascii?Q?k64iO2t2l2/WuTz+fwmv6qHSH2drCYbQvc2feJin2N8zrN/Ga6JDu0oC+EPB?= =?us-ascii?Q?DG3ra706EdxPpxat7f4LIFWtMChT2OJdIjmCt0cYeDLZwl44CCYYGO97ZC7F?= =?us-ascii?Q?OoJFRSx028N6S+6HqtL0ng44bqlgS9p3NDtKi/tGBxMG5NN6qEREODRuPxOw?= =?us-ascii?Q?pvl2S8co1ARXCC67nJZl9mYHAlWu7pst03xMEEv+CaImm+59UcBf5N8B1azZ?= =?us-ascii?Q?p1JWaifABsp+UrgJmc8M+mMU7w7Yo/FZfhuX5YeZbb/OLGpWadKQUjeaucG9?= =?us-ascii?Q?EpgvWhzxVgvDGNcO2WmgXzja6uMXn/vDjFEyEdHT8U1ZDX04iDYt+vZUFWPe?= =?us-ascii?Q?nLr1Q86L9HW4=3D?= X-Microsoft-Exchange-Diagnostics: 1; DM2PR0301MB1310; 5:68kDSYYgosnk4BbUh1s5AwZQ9tIn0rWTO2UU6p/8SrAghXgkZOmnDejJEezlexaJHYT63ovXw+ivlsd3CdKKlYJBz+KylPOLD1PSbkZd7ipfn94RBJj8bbYqc7Si4T//L2qx/gX+IUxQ+BvR/dGsDw==; 24:e9EV5mKYszy6u8UYfeoPIqShDbcysf55ZjUM08DvjKDg1oLL/J2nioHKze9NySg7YUoYgqPvb+rKm8WAdc0DvvwMl6gjrVqvpa50m8KvAtk=; 20:E6fkTTK+MRMkgizjGRwnF3E+ZOQZYIVthNlx2+fKoyCztCFeynBkEaK5j5wRWGFqMq1G9Axxg0Hju62A6qjW3A== X-OriginatorOrg: freescale.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Oct 2015 18:50:49.3472 (UTC) X-MS-Exchange-CrossTenant-Id: 710a03f5-10f6-4d38-9ff4-a80b81da590d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=710a03f5-10f6-4d38-9ff4-a80b81da590d; Ip=[192.88.158.2]; Helo=[az84smr01.freescale.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM2PR0301MB1310 Cc: Fabio.Estevam@freescale.com, otavio@ossystems.com.br Subject: [U-Boot] [PATCH v3 09/10] imx: hab: add mx7 secure boot support X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.15 Precedence: list List-Id: U-Boot discussion <u-boot.lists.denx.de> List-Unsubscribe: <http://lists.denx.de/mailman/options/u-boot>, <mailto:u-boot-request@lists.denx.de?subject=unsubscribe> List-Archive: <http://lists.denx.de/pipermail/u-boot/> List-Post: <mailto:u-boot@lists.denx.de> List-Help: <mailto:u-boot-request@lists.denx.de?subject=help> List-Subscribe: <http://lists.denx.de/mailman/listinfo/u-boot>, <mailto:u-boot-request@lists.denx.de?subject=subscribe> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" <u-boot-bounces@lists.denx.de> |
diff --git a/arch/arm/imx-common/hab.c b/arch/arm/imx-common/hab.c index ee2da01..56b3c22 100644 --- a/arch/arm/imx-common/hab.c +++ b/arch/arm/imx-common/hab.c @@ -81,6 +81,8 @@ #define MX6DQ_PU_IROM_MMU_EN_VAR 0x009024a8 #define MX6DLS_PU_IROM_MMU_EN_VAR 0x00901dd0 #define MX6SL_PU_IROM_MMU_EN_VAR 0x00900a18 +#define IS_HAB_ENABLED_BIT \ + (is_soc_type(MXC_SOC_MX7) ? 0x2000000 : 0x2) /* * +------------+ 0x0 (DDR_UIMAGE_START) - @@ -273,7 +275,7 @@ bool is_hab_enabled(void) return ret; } - return (reg & 0x2) == 0x2; + return (reg & IS_HAB_ENABLED_BIT) == IS_HAB_ENABLED_BIT; } static inline uint8_t get_idx(uint8_t *list, uint8_t tgt) @@ -421,7 +423,7 @@ uint32_t authenticate_image(uint32_t ddr_start, uint32_t image_size) * crash. */ /* Check MMU enabled */ - if (get_cr() & CR_M) { + if (is_soc_type(MXC_SOC_MX6) && get_cr() & CR_M) { if (is_cpu_type(MXC_CPU_MX6Q) || is_cpu_type(MXC_CPU_MX6D)) { /*
Add mx7 secure boot support, add helper macro IS_HAB_ENABLED_BIT to get the corresponding bit mask per SoC (mx7 or mx6) to identify if securue boot feature is enabled/disabled. On authenticate_image only check for mmu enabled on mx6 SoC to force pu_irom_mmu_enabled so ROM code can perform mmu cache flush mx7 SoC ROM code does not have this issue as ROM enables cache support based on fuse settings. Signed-off-by: Adrian Alonso <aalonso@freescale.com> --- Changes for V2: - Split from original patch to track mx7 change set hab: rework support for imx6/imx7 Changes for V3: - Add helper macro to identify if secure boot is enabled per SoC family (mx6/mx7) - Improve commit log description arch/arm/imx-common/hab.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)