From patchwork Tue Feb 19 14:25:28 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Vincent_Stehl=C3=A9?= X-Patchwork-Id: 221709 X-Patchwork-Delegate: trini@ti.com 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 4D5512C008D for ; Wed, 20 Feb 2013 01:27:01 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 742944A144; Tue, 19 Feb 2013 15:26:56 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at theia.denx.de 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 7ANgUZ7LDguU; Tue, 19 Feb 2013 15:26:56 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 7AD754A147; Tue, 19 Feb 2013 15:26:54 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id AEA134A147 for ; Tue, 19 Feb 2013 15:26:51 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at theia.denx.de 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 vGn1nyNTywRS for ; Tue, 19 Feb 2013 15:26:40 +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 devils.ext.ti.com (devils.ext.ti.com [198.47.26.153]) by theia.denx.de (Postfix) with ESMTPS id E9E0F4A144 for ; Tue, 19 Feb 2013 15:26:37 +0100 (CET) Received: from dlelxv30.itg.ti.com ([172.17.2.17]) by devils.ext.ti.com (8.13.7/8.13.7) with ESMTP id r1JEQGER016137; Tue, 19 Feb 2013 08:26:17 -0600 Received: from DFLE72.ent.ti.com (dfle72.ent.ti.com [128.247.5.109]) by dlelxv30.itg.ti.com (8.13.8/8.13.8) with ESMTP id r1JEQGmT015910; Tue, 19 Feb 2013 08:26:16 -0600 Received: from dlelxv23.itg.ti.com (172.17.1.198) by dfle72.ent.ti.com (128.247.5.109) with Microsoft SMTP Server id 14.1.323.3; Tue, 19 Feb 2013 08:26:16 -0600 Received: from svrhermes.tif.ti.com (svrhermes.tif.ti.com [137.167.130.169]) by dlelxv23.itg.ti.com (8.13.8/8.13.8) with ESMTP id r1JEQFrA005641; Tue, 19 Feb 2013 08:26:15 -0600 Received: from unb0919505.tif.ti.com (unb0919505.tif.ti.com [137.167.100.142]) by svrhermes.tif.ti.com (Postfix) with ESMTP id 4747837011; Tue, 19 Feb 2013 15:26:15 +0100 (MET) Received: from vstehle by unb0919505.tif.ti.com with local (Exim 4.76) (envelope-from ) id 1U7o98-0003PR-QT; Tue, 19 Feb 2013 15:26:14 +0100 From: =?UTF-8?q?Vincent=20Stehl=C3=A9?= To: Date: Tue, 19 Feb 2013 15:25:28 +0100 Message-ID: <1361283928-12762-1-git-send-email-v-stehle@ti.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <50B4B136.1020402@codethink.co.uk> References: <50B4B136.1020402@codethink.co.uk> MIME-Version: 1.0 Cc: c.dall@virtualopensystems.com, joachim.wietzke@h-da.de, clemens.fischer@h-da.de, marc.zyngier@arm.com, u-boot@lists.denx.de Subject: [U-Boot] [PATCH] Fix omap5 hyp mode for second cpu X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.11 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 Make it work on PandaBoard 5 with 5432 ES2 and Linux. Signed-off-by: Vincent Stehlé --- Hi, Here are some necessary adaptations for OMAP5 ES2, as magic value has changed. In the mean time, we make the secondary cpu routine a bit closer to what romcode does. Best regards, V. arch/arm/lib/bootm.c | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/arch/arm/lib/bootm.c b/arch/arm/lib/bootm.c index 02852d6..dd8f42e 100644 --- a/arch/arm/lib/bootm.c +++ b/arch/arm/lib/bootm.c @@ -56,16 +56,21 @@ asm ( "ldr r12, =0x102\n" "mov r0, pc\n" "smc 0x1\n" - "ldr r1, =0x48281804\n" // AUX_CORE_BOOT_1 + "ldr r1, =0x48281800\n" /* AUX_CORE_BOOT_0 */ "mov r2, #0\n" - "str r2, [r1]\n" + "str r2, [r1]\n" /* AUX_CORE_BOOT_0 */ + "str r2, [r1, #4]\n" /* AUX_CORE_BOOT_1 */ "isb\n" "dsb\n" + "mov r3, #0xf0\n" "1: wfe\n" - "ldr r2, [r1]\n" - "cmp r2, #0\n" - "movne pc, r2\n" - "b 1b\n" + "ldr r2, [r1]\n" /* AUX_CORE_BOOT_0 */ + "ands r2, r2, r3\n" + "beq 1b\n" + "ldr r2, [r1, #4]\n" /* AUX_CORE_BOOT_1 */ + "cmp r2, #0\n" + "beq 1b\n" + "bx r2\n" ".popsection\n" ); @@ -378,7 +383,7 @@ void hyp_enable(void) { "ldr r1, =0x48281800\n" // AUX_CORE_BOOT_1 "ldr r2, =__hyp_init_sec\n" "str r2, [r1, #4]\n" - "mov r2, #0x200\n" + "mov r2, #0x20\n" "str r2, [r1]\n" // AUX_CORE_BOOT_0 "isb\n" "dmb\n"