From patchwork Mon Feb 23 12:09:08 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabio Estevam X-Patchwork-Id: 442450 X-Patchwork-Delegate: sbabic@denx.de 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 03E3E14016B for ; Mon, 23 Feb 2015 23:09:35 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 00F4D4A02F; Mon, 23 Feb 2015 13:09:34 +0100 (CET) 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 te3uh9X6Wolo; Mon, 23 Feb 2015 13:09:33 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 73FF94A020; Mon, 23 Feb 2015 13:09:33 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id C13B44A020 for ; Mon, 23 Feb 2015 13:09:30 +0100 (CET) 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 Qi5AOSqeyqdy for ; Mon, 23 Feb 2015 13:09:30 +0100 (CET) X-Greylist: delayed 1050 seconds by postgrey-1.34 at theia; Mon, 23 Feb 2015 13:09:28 CET 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-bl2-obe.outbound.protection.outlook.com (mail-bl2on0115.outbound.protection.outlook.com [65.55.169.115]) by theia.denx.de (Postfix) with ESMTPS id 2B7EA4A01F for ; Mon, 23 Feb 2015 13:09:28 +0100 (CET) Received: from CH1PR03CA008.namprd03.prod.outlook.com (10.255.156.153) by BY2PR03MB253.namprd03.prod.outlook.com (10.242.37.15) with Microsoft SMTP Server (TLS) id 15.1.93.12; Mon, 23 Feb 2015 12:09:25 +0000 Received: from BN1AFFO11FD010.protection.gbl (10.255.156.132) by CH1PR03CA008.outlook.office365.com (10.255.156.153) with Microsoft SMTP Server (TLS) id 15.1.93.16 via Frontend Transport; Mon, 23 Feb 2015 12:09:25 +0000 Received: from az84smr01.freescale.net (192.88.158.2) by BN1AFFO11FD010.mail.protection.outlook.com (10.58.52.70) with Microsoft SMTP Server (TLS) id 15.1.99.6 via Frontend Transport; Mon, 23 Feb 2015 12:09:24 +0000 Received: from fabio-Latitude-E6410.am.freescale.net ([10.29.244.18]) by az84smr01.freescale.net (8.14.3/8.14.0) with ESMTP id t1NC9M8x017985; Mon, 23 Feb 2015 05:09:22 -0700 From: Fabio Estevam To: Date: Mon, 23 Feb 2015 09:09:08 -0300 Message-ID: <1424693349-12252-1-git-send-email-fabio.estevam@freescale.com> X-Mailer: git-send-email 1.9.1 X-EOPAttributedMessage: 0 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=fabio.estevam@freescale.com; gmail.com; dkim=none (message not signed) header.d=none; X-Forefront-Antispam-Report: CIP:192.88.158.2; CTRY:US; IPV:NLI; EFV:NLI; SFV:NSPM; SFS:(10019020)(6009001)(339900001)(199003)(189002)(50226001)(62966003)(92566002)(47776003)(68736005)(48376002)(85426001)(50466002)(36756003)(77156002)(64706001)(77096005)(105606002)(2351001)(69596002)(46102003)(81156004)(97736003)(87936001)(106466001)(229853001)(50986999)(110136001)(6806004)(33646002)(19580395003)(19580405001)(104016003)(86362001); DIR:OUT; SFP:1102; SCL:1; SRVR:BY2PR03MB253; H:az84smr01.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; A:1; MX:1; LANG:en; MIME-Version: 1.0 X-Microsoft-Antispam: UriScan:; X-Microsoft-Antispam: BCL:0;PCL:0;RULEID:;SRVR:BY2PR03MB253; X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(5005003); SRVR:BY2PR03MB253; X-Forefront-PRVS: 0496DF6962 X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:;SRVR:BY2PR03MB253; X-OriginatorOrg: freescale.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Feb 2015 12:09:24.8288 (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] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY2PR03MB253 Cc: Fabio Estevam , u-boot@lists.denx.de, Magnus Lilja Subject: [U-Boot] [PATCH 1/2] mx31: Fix boot hang by avoiding vector relocation X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.15 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" Since commit 3ff46cc42b9d73d0 ("arm: relocate the exception vectors") mx31 does not boot anymore. Add a specific relocate_vectors macro that skips the vector relocation, as the i.MX31 SoC does not provide RAM at the high vectors address (0xFFFF0000), and (0x00000000) maps to ROM. This allows mx31 to boot again. Cc: Anatolij Gustschin Cc: Magnus Lilja Signed-off-by: Fabio Estevam --- Anatolij/Maguns, I don't have access to a mx31 board. Could you please test this patch? Thanks arch/arm/cpu/arm1136/mx31/Makefile | 4 ++++ arch/arm/cpu/arm1136/mx31/relocate.S | 23 +++++++++++++++++++++++ 2 files changed, 27 insertions(+) create mode 100644 arch/arm/cpu/arm1136/mx31/relocate.S diff --git a/arch/arm/cpu/arm1136/mx31/Makefile b/arch/arm/cpu/arm1136/mx31/Makefile index 9670ed9..dcbd570 100644 --- a/arch/arm/cpu/arm1136/mx31/Makefile +++ b/arch/arm/cpu/arm1136/mx31/Makefile @@ -8,3 +8,7 @@ obj-y += generic.o obj-y += timer.o obj-y += devices.o + +ifndef CONFIG_SPL_BUILD +obj-y += relocate.o +endif diff --git a/arch/arm/cpu/arm1136/mx31/relocate.S b/arch/arm/cpu/arm1136/mx31/relocate.S new file mode 100644 index 0000000..1c556df --- /dev/null +++ b/arch/arm/cpu/arm1136/mx31/relocate.S @@ -0,0 +1,23 @@ +/* + * relocate - i.MX31-specific vector relocation + * + * Copyright (c) 2013 Albert ARIBAUD + * + * SPDX-License-Identifier: GPL-2.0+ + */ + +#include + +/* + * The i.MX31 SoC is very specific with respect to exceptions: it + * does not provide RAM at the high vectors address (0xFFFF0000), + * thus only the low address (0x00000000) is useable; but that is + * in ROM, so let's avoid relocating the vectors. + */ + .section .text.relocate_vectors,"ax",%progbits + +ENTRY(relocate_vectors) + + bx lr + +ENDPROC(relocate_vectors)