From patchwork Mon Aug 10 14:26:49 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Wunderlich X-Patchwork-Id: 1342854 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=fw-web.de Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=mailerdienst.de header.i=@mailerdienst.de header.a=rsa-sha256 header.s=20200217 header.b=fKuTnuA6; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4BQJQG4GpJz9sTh for ; Tue, 11 Aug 2020 00:34:46 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id E487F81B50; Mon, 10 Aug 2020 16:34:29 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=fw-web.de Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=mailerdienst.de header.i=@mailerdienst.de header.b="fKuTnuA6"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id A0CA981C17; Mon, 10 Aug 2020 16:27:16 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,SPF_HELO_NONE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from mxwww.masterlogin.de (mxwww.masterlogin.de [95.129.51.220]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 1D6E481260 for ; Mon, 10 Aug 2020 16:27:14 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=fw-web.de Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=linux@fw-web.de Received: from mxout4.routing.net (unknown [192.168.10.112]) by forward.mxwww.masterlogin.de (Postfix) with ESMTPS id 9C24D962F3; Mon, 10 Aug 2020 14:27:13 +0000 (UTC) Received: from mxbox1.masterlogin.de (unknown [192.168.10.88]) by mxout4.routing.net (Postfix) with ESMTP id 63D241014C8; Mon, 10 Aug 2020 14:27:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailerdienst.de; s=20200217; t=1597069633; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=WeZ2P3oSe6RFETx8dCdTRu9v9S9R+0Uf9F0lMCrlRzA=; b=fKuTnuA6oKBIs6AITbncEUO3BtEkjyh+iWR40tFIahOswT0gU3P5pAMgoulewo9iNwLQVB uGABlibIUk8xbOpaoIzAzq9zqZLlGlNHWMIV8JRzv0iWbG7UDhWpVUXR5uO28b+kUm9hdV OCR1sqvBW2atWcPdzMbntSQcklPdoFk= Received: from localhost.localdomain (fttx-pool-217.61.151.249.bambit.de [217.61.151.249]) by mxbox1.masterlogin.de (Postfix) with ESMTPSA id B001940501; Mon, 10 Aug 2020 14:27:12 +0000 (UTC) From: Frank Wunderlich To: u-boot@lists.denx.de Cc: Frank Wunderlich , GSS_MTK_Uboot_upstream , Ryder Lee , Weijie Gao , Oleksandr Rybalko Subject: [RFC PATCH 1/4] mt7622: Support to build 32 bits version. Date: Mon, 10 Aug 2020 16:26:49 +0200 Message-Id: <20200810142652.40669-2-linux@fw-web.de> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200810142652.40669-1-linux@fw-web.de> References: <20200810142652.40669-1-linux@fw-web.de> MIME-Version: 1.0 X-Mailman-Approved-At: Mon, 10 Aug 2020 16:34:27 +0200 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 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" X-Virus-Scanned: clamav-milter 0.102.3 at phobos.denx.de X-Virus-Status: Clean From: Oleksandr Rybalko allow building uboot in 32bit-mode for mt7622 to be compatible with bpi-r64 images Signed-off-by: Oleksandr Rybalko Signed-off-by: Frank Wunderlich --- arch/arm/mach-mediatek/Kconfig | 7 ++++++- arch/arm/mach-mediatek/mt7622/init.c | 6 +++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/arch/arm/mach-mediatek/Kconfig b/arch/arm/mach-mediatek/Kconfig index 0042e57017..46e10025e4 100644 --- a/arch/arm/mach-mediatek/Kconfig +++ b/arch/arm/mach-mediatek/Kconfig @@ -10,12 +10,17 @@ config MT8512 bool "MediaTek MT8512 SoC" default n +config ARCH_MEDIATEK_32 + bool "Build 32 bits version" + default n + choice prompt "MediaTek board select" config TARGET_MT7622 bool "MediaTek MT7622 SoC" - select ARM64 + select CPU_V7A if ARCH_MEDIATEK_32 + select ARM64 if !ARCH_MEDIATEK_32 help The MediaTek MT7622 is a ARM64-based SoC with a dual-core Cortex-A53. including UART, SPI, USB3.0, SD and MMC cards, NAND, SNFI, PWM, PCIe, diff --git a/arch/arm/mach-mediatek/mt7622/init.c b/arch/arm/mach-mediatek/mt7622/init.c index 7f6ce80f37..884c45e183 100644 --- a/arch/arm/mach-mediatek/mt7622/init.c +++ b/arch/arm/mach-mediatek/mt7622/init.c @@ -7,8 +7,10 @@ #include #include #include -#include #include +#ifdef CONFIG_ARM64 +#include +#endif int print_cpuinfo(void) { @@ -27,6 +29,7 @@ int dram_init(void) } +#ifdef CONFIG_ARM64 void reset_cpu(ulong addr) { psci_system_reset(); @@ -51,3 +54,4 @@ static struct mm_region mt7622_mem_map[] = { } }; struct mm_region *mem_map = mt7622_mem_map; +#endif From patchwork Mon Aug 10 14:26:50 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Wunderlich X-Patchwork-Id: 1342856 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=fw-web.de Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=mailerdienst.de header.i=@mailerdienst.de header.a=rsa-sha256 header.s=20200217 header.b=c1H92kFR; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4BQJQX01v1z9sTb for ; Tue, 11 Aug 2020 00:34:59 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 9AC63821D5; Mon, 10 Aug 2020 16:34:31 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=fw-web.de Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=mailerdienst.de header.i=@mailerdienst.de header.b="c1H92kFR"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id D4328819E8; Mon, 10 Aug 2020 16:27:16 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,SPF_HELO_NONE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from mxwww.masterlogin.de (mxwww.masterlogin.de [95.129.51.220]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 676FC819EA for ; Mon, 10 Aug 2020 16:27:14 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=fw-web.de Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=linux@fw-web.de Received: from mxout3.routing.net (unknown [192.168.10.111]) by forward.mxwww.masterlogin.de (Postfix) with ESMTPS id 2C706962FA; Mon, 10 Aug 2020 14:27:14 +0000 (UTC) Received: from mxbox1.masterlogin.de (unknown [192.168.10.88]) by mxout3.routing.net (Postfix) with ESMTP id 07613604D1; Mon, 10 Aug 2020 14:27:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailerdienst.de; s=20200217; t=1597069634; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=wqruqxaXRrI1BRcx8eD1AzEIIHZGwn2dVCkT2k+pq7g=; b=c1H92kFRgnxbwKiSuqyTKNlmJj/03cVbDr7vSDZr9Kb5UY93IYfqK4x8KMxEYPBm8paV7K rDFcYyJ3g8zky4mz3K/WmPGWIVoaCyUhY9esadNCKh+uLMd3uoJhqxBbZ1hgMU9OAMJmEB /ZlD/71dgVBkyw4miGhOv1inKM8wJUA= Received: from localhost.localdomain (fttx-pool-217.61.151.249.bambit.de [217.61.151.249]) by mxbox1.masterlogin.de (Postfix) with ESMTPSA id 638EB405E6; Mon, 10 Aug 2020 14:27:13 +0000 (UTC) From: Frank Wunderlich To: u-boot@lists.denx.de Cc: Frank Wunderlich , GSS_MTK_Uboot_upstream , Ryder Lee , Weijie Gao Subject: [RFC PATCH 2/4] mt7622: add lowlevel_init from 2014-04 Date: Mon, 10 Aug 2020 16:26:50 +0200 Message-Id: <20200810142652.40669-3-linux@fw-web.de> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200810142652.40669-1-linux@fw-web.de> References: <20200810142652.40669-1-linux@fw-web.de> MIME-Version: 1.0 X-Mailman-Approved-At: Mon, 10 Aug 2020 16:34:27 +0200 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 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" X-Virus-Scanned: clamav-milter 0.102.3 at phobos.denx.de X-Virus-Status: Clean From: Frank Wunderlich add low level initialisation to gain access to jumparch64 target in mt7622 ATF from 32bit uboot. jumparch64 allows switching from 32bit to 64bit to load 64bit kernel from 32bit uboot Signed-off-by: Frank Wunderlich --- arch/arm/mach-mediatek/mt7622/Makefile | 4 +++ arch/arm/mach-mediatek/mt7622/lowlevel_init.S | 33 +++++++++++++++++++ 2 files changed, 37 insertions(+) create mode 100755 arch/arm/mach-mediatek/mt7622/lowlevel_init.S diff --git a/arch/arm/mach-mediatek/mt7622/Makefile b/arch/arm/mach-mediatek/mt7622/Makefile index 886ab7e4eb..5fe4505ddf 100644 --- a/arch/arm/mach-mediatek/mt7622/Makefile +++ b/arch/arm/mach-mediatek/mt7622/Makefile @@ -1,3 +1,7 @@ # SPDX-License-Identifier: GPL-2.0 obj-y += init.o + +ifeq ($(CONFIG_ARCH_MEDIATEK_32),y) + obj-y += lowlevel_init.o +endif diff --git a/arch/arm/mach-mediatek/mt7622/lowlevel_init.S b/arch/arm/mach-mediatek/mt7622/lowlevel_init.S new file mode 100755 index 0000000000..bf20cbd1e7 --- /dev/null +++ b/arch/arm/mach-mediatek/mt7622/lowlevel_init.S @@ -0,0 +1,33 @@ +/* + * (C) Copyright 2012 Stephen Warren + * + * See file CREDITS for list of people who contributed to this + * project. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * version 2 as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + +.globl lowlevel_init +lowlevel_init: + /*Enable SMP bit*/ + mrc p15, 0, r0, c1, c0, 1 + orr r0, r0, #0x40 + mcr p15, 0, r0, c1, c0, 1 + mov pc, lr + +.global jumparch64_smc +jumparch64_smc: + mov r3, r2 + mov r2, r1 + mov r1, r0 + ldr r0, =0x82000200 /*please check MTK_SIP_KERNEL_TMP_AARCH32 in vendor/arm/atf/include/bl31/services/sip_svc.h*/ +# smc #0 + .word 0xe1600070 @ SMC #0 to enter monitor - hand assembled + b . From patchwork Mon Aug 10 14:26:51 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Wunderlich X-Patchwork-Id: 1342857 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=fw-web.de Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=mailerdienst.de header.i=@mailerdienst.de header.a=rsa-sha256 header.s=20200217 header.b=DpD4biyp; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4BQJQl3X3Sz9sTb for ; Tue, 11 Aug 2020 00:35:11 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id DDC66821EE; Mon, 10 Aug 2020 16:34:32 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=fw-web.de Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=mailerdienst.de header.i=@mailerdienst.de header.b="DpD4biyp"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 03AC8819EA; Mon, 10 Aug 2020 16:27:19 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,SPF_HELO_NONE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from mxwww.masterlogin.de (mxwww.masterlogin.de [IPv6:2a03:2900:1:1::b]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 18CF281817 for ; Mon, 10 Aug 2020 16:27:15 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=fw-web.de Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=linux@fw-web.de Received: from mxout4.routing.net (unknown [192.168.10.112]) by forward.mxwww.masterlogin.de (Postfix) with ESMTPS id D3D70962F9; Mon, 10 Aug 2020 14:27:14 +0000 (UTC) Received: from mxbox1.masterlogin.de (unknown [192.168.10.88]) by mxout4.routing.net (Postfix) with ESMTP id A29361014C8; Mon, 10 Aug 2020 14:27:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailerdienst.de; s=20200217; t=1597069634; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=xR/ZUp6Xkw7MizTjezYi0W7qmcCqXEBo95Rcq/Rb/fU=; b=DpD4biyp7qhc0AqLRwqnpRZhjjUbHg30gGUqfpygV05ru0T05zSZew3qNV5cR86HkQuBsz su3Fd8JzBRsn416icpflOZYQdAOo2Z/RfU/nU6zlo8raIbroGD0Q6KMcoLEC3mj2WtFflt Qy8JbjT3FfAEIOHbc/0MaaFV6wXGt8A= Received: from localhost.localdomain (fttx-pool-217.61.151.249.bambit.de [217.61.151.249]) by mxbox1.masterlogin.de (Postfix) with ESMTPSA id 0E0CA40501; Mon, 10 Aug 2020 14:27:14 +0000 (UTC) From: Frank Wunderlich To: u-boot@lists.denx.de Cc: Frank Wunderlich , GSS_MTK_Uboot_upstream , Ryder Lee , Weijie Gao Subject: [RFC PATCH 3/4] jumparch64: insert into bootm Date: Mon, 10 Aug 2020 16:26:51 +0200 Message-Id: <20200810142652.40669-4-linux@fw-web.de> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200810142652.40669-1-linux@fw-web.de> References: <20200810142652.40669-1-linux@fw-web.de> MIME-Version: 1.0 X-Mailman-Approved-At: Mon, 10 Aug 2020 16:34:27 +0200 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 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" X-Virus-Scanned: clamav-milter 0.102.3 at phobos.denx.de X-Virus-Status: Clean From: Frank Wunderlich if uboot is 32bit and linux-kernel is 64bit packed into armhf mkimage (like official kernels for bpi-r64) call jumparch64 to switch to 64bit mode after unpacking the kernel-image Signed-off-by: Frank Wunderlich --- arch/arm/lib/bootm.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/arch/arm/lib/bootm.c b/arch/arm/lib/bootm.c index 1206e306db..015a5f7f86 100644 --- a/arch/arm/lib/bootm.c +++ b/arch/arm/lib/bootm.c @@ -374,6 +374,16 @@ static void boot_jump_linux(bootm_headers_t *images, int flag) ES_TO_AARCH64); #endif } +#elif defined(CONFIG_ARCH_MEDIATEK_32) && defined(CONFIG_TARGET_MT7622) + extern void jumparch64_smc(ulong addr, ulong arg1, ulong arg2); + + /* + * Iverson 20150528 - show message for boot. + */ + debug("images->ep = %lx, images->ft_addr = %lx\n", images->ep, (unsigned long)images->ft_addr); + + announce_and_cleanup(0); + jumparch64_smc(images->ep, (unsigned long)images->ft_addr, 0); #else unsigned long machid = gd->bd->bi_arch_number; char *s; From patchwork Mon Aug 10 14:26:52 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Wunderlich X-Patchwork-Id: 1342858 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=fw-web.de Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=mailerdienst.de header.i=@mailerdienst.de header.a=rsa-sha256 header.s=20200217 header.b=XpysZlNq; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4BQJQx2js1z9sTh for ; Tue, 11 Aug 2020 00:35:21 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 13DDD82206; Mon, 10 Aug 2020 16:34:34 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=fw-web.de Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=mailerdienst.de header.i=@mailerdienst.de header.b="XpysZlNq"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 270B381817; Mon, 10 Aug 2020 16:27:19 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,SPF_HELO_NONE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from mxwww.masterlogin.de (mxwww.masterlogin.de [IPv6:2a03:2900:1:1::b]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id C54CB808B3 for ; Mon, 10 Aug 2020 16:27:15 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=fw-web.de Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=linux@fw-web.de Received: from mxout1.routing.net (unknown [192.168.10.81]) by forward.mxwww.masterlogin.de (Postfix) with ESMTPS id 7BFA9962FB; Mon, 10 Aug 2020 14:27:15 +0000 (UTC) Received: from mxbox1.masterlogin.de (unknown [192.168.10.88]) by mxout1.routing.net (Postfix) with ESMTP id 5734240176; Mon, 10 Aug 2020 14:27:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailerdienst.de; s=20200217; t=1597069635; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=K/QkT6TTSDD3OZrjfd61bWSs6t6LQflmDLlKUmjwCL4=; b=XpysZlNqgEOXgzl2FQzcDTKKa314RKP8eSqxcbNtWylnqxtN2hajUfI/XWvh9XuSU1aYax 1pbjf2RsG4a4GwUNR0cbDNKw1sIQtG/doNxxSsLnFgWxd8yMWtD8EcMVVj/drwsyPadlVx 8BnqNy3/vBg9PjPTCjtLZIhPHUwMLmk= Received: from localhost.localdomain (fttx-pool-217.61.151.249.bambit.de [217.61.151.249]) by mxbox1.masterlogin.de (Postfix) with ESMTPSA id A9B174064C; Mon, 10 Aug 2020 14:27:14 +0000 (UTC) From: Frank Wunderlich To: u-boot@lists.denx.de Cc: Frank Wunderlich , GSS_MTK_Uboot_upstream , Ryder Lee , Weijie Gao Subject: [RFC PATCH 4/4] jumparch64: add go64 Date: Mon, 10 Aug 2020 16:26:52 +0200 Message-Id: <20200810142652.40669-5-linux@fw-web.de> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200810142652.40669-1-linux@fw-web.de> References: <20200810142652.40669-1-linux@fw-web.de> MIME-Version: 1.0 X-Mailman-Approved-At: Mon, 10 Aug 2020 16:34:27 +0200 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 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" X-Virus-Scanned: clamav-milter 0.102.3 at phobos.denx.de X-Virus-Status: Clean From: Frank Wunderlich adding a new uboot command go64 which allows booting 64bit kernel-image from 32bit uboot using the jumparch64 target in mt7622 ATF Signed-off-by: Frank Wunderlich --- cmd/boot.c | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/cmd/boot.c b/cmd/boot.c index 36aba22b30..1448eb3854 100644 --- a/cmd/boot.c +++ b/cmd/boot.c @@ -53,6 +53,32 @@ U_BOOT_CMD( " passing 'arg' as arguments" ); +#if defined(CONFIG_ARCH_MEDIATEK_32) && defined(CONFIG_TARGET_MT7622) +static int do_go64(struct cmd_tbl *cmdtp, int flag, int argc, char * const argv[]) +{ + ulong addr; + + if (argc < 2) + return CMD_RET_USAGE; + + addr = simple_strtoul(argv[1], NULL, 16); + + printf ("## Starting application at 0x%08lX ...\n", addr); + + extern void jumparch64_smc(ulong addr, ulong arg1, ulong arg2); + jumparch64_smc(addr, 0, 0); + + return 0; +} + +U_BOOT_CMD( + go64, CONFIG_SYS_MAXARGS, 1, do_go64, + "start 64bit application at address 'addr'", + "addr [arg ...]\n - start 64bit application at address 'addr'\n" + " passing 'arg' as arguments" +); +#endif + #endif U_BOOT_CMD(