From patchwork Mon Feb 23 12:09:09 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabio Estevam X-Patchwork-Id: 442451 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 A703414016B for ; Mon, 23 Feb 2015 23:09:43 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id E87B14A03F; Mon, 23 Feb 2015 13:09:39 +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 bc45dsmHgUwZ; Mon, 23 Feb 2015 13:09:39 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 7808E4A041; Mon, 23 Feb 2015 13:09:35 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id DCF594A020 for ; Mon, 23 Feb 2015 13:09:31 +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 rWdw9Mkw3goM for ; Mon, 23 Feb 2015 13:09:31 +0100 (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-bn1-obe.outbound.protection.outlook.com (mail-bn1bon0134.outbound.protection.outlook.com [157.56.111.134]) by theia.denx.de (Postfix) with ESMTPS id 646E14A01F for ; Mon, 23 Feb 2015 13:09:29 +0100 (CET) Received: from BN3PR0301CA0051.namprd03.prod.outlook.com (25.160.152.147) by BN1PR03MB251.namprd03.prod.outlook.com (10.255.200.18) with Microsoft SMTP Server (TLS) id 15.1.93.12; Mon, 23 Feb 2015 12:09:27 +0000 Received: from BN1AFFO11FD012.protection.gbl (2a01:111:f400:7c10::129) by BN3PR0301CA0051.outlook.office365.com (2a01:111:e400:401e::19) with Microsoft SMTP Server (TLS) id 15.1.99.9 via Frontend Transport; Mon, 23 Feb 2015 12:09:27 +0000 Received: from az84smr01.freescale.net (192.88.158.2) by BN1AFFO11FD012.mail.protection.outlook.com (10.58.52.72) with Microsoft SMTP Server (TLS) id 15.1.99.6 via Frontend Transport; Mon, 23 Feb 2015 12:09:26 +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 t1NC9M90017985; Mon, 23 Feb 2015 05:09:24 -0700 From: Fabio Estevam To: Date: Mon, 23 Feb 2015 09:09:09 -0300 Message-ID: <1424693349-12252-2-git-send-email-fabio.estevam@freescale.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1424693349-12252-1-git-send-email-fabio.estevam@freescale.com> References: <1424693349-12252-1-git-send-email-fabio.estevam@freescale.com> 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; cadcon.de; 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)(97736003)(2351001)(87936001)(19580395003)(19580405001)(33646002)(64706001)(68736005)(77096005)(6806004)(2950100001)(92566002)(69596002)(105606002)(76176999)(106466001)(86362001)(81156004)(47776003)(50986999)(50226001)(85426001)(104016003)(50466002)(46102003)(48376002)(62966003)(36756003)(77156002)(110136001)(229853001); DIR:OUT; SFP:1102; SCL:1; SRVR:BN1PR03MB251; 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:BN1PR03MB251; X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(5005003); SRVR:BN1PR03MB251; X-Forefront-PRVS: 0496DF6962 X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:;SRVR:BN1PR03MB251; X-OriginatorOrg: freescale.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Feb 2015 12:09:26.7991 (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: BN1PR03MB251 Cc: Fabio Estevam , u-boot@lists.denx.de Subject: [U-Boot] [PATCH 2/2] mx35: 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") mx35 does not boot anymore. Add a specific relocate_vectors macro that skips the vector relocation, as the i.MX35 SoC does not provide RAM at the high vectors address (0xFFFF0000), and (0x00000000) maps to ROM. This allows mx35 to boot again. Cc: Sebastian Priebe Signed-off-by: Fabio Estevam Tested-by: Stefano Babic --- Sebastian, I don't have access to a mx35 board. Could you please test this patch? Thanks arch/arm/cpu/arm1136/mx35/Makefile | 4 ++++ arch/arm/cpu/arm1136/mx35/relocate.S | 23 +++++++++++++++++++++++ 2 files changed, 27 insertions(+) create mode 100644 arch/arm/cpu/arm1136/mx35/relocate.S diff --git a/arch/arm/cpu/arm1136/mx35/Makefile b/arch/arm/cpu/arm1136/mx35/Makefile index c533215..796db9c 100644 --- a/arch/arm/cpu/arm1136/mx35/Makefile +++ b/arch/arm/cpu/arm1136/mx35/Makefile @@ -10,3 +10,7 @@ obj-y += generic.o obj-y += timer.o obj-y += mx35_sdram.o + +ifndef CONFIG_SPL_BUILD +obj-y += relocate.o +endif diff --git a/arch/arm/cpu/arm1136/mx35/relocate.S b/arch/arm/cpu/arm1136/mx35/relocate.S new file mode 100644 index 0000000..43003f8 --- /dev/null +++ b/arch/arm/cpu/arm1136/mx35/relocate.S @@ -0,0 +1,23 @@ +/* + * relocate - i.MX35-specific vector relocation + * + * Copyright (c) 2013 Albert ARIBAUD + * + * SPDX-License-Identifier: GPL-2.0+ + */ + +#include + +/* + * The i.MX35 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)