From patchwork Sun Oct 24 23:58:04 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jim Posen X-Patchwork-Id: 1545467 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20210112 header.b=iowtKRyy; dkim-atps=neutral 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=) 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 bilbo.ozlabs.org (Postfix) with ESMTPS id 4HcwC82qM8z9s0r for ; Mon, 25 Oct 2021 11:03:16 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 25E0683458; Mon, 25 Oct 2021 02:03:01 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="iowtKRyy"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 3238F83460; Mon, 25 Oct 2021 01:58:27 +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=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-qv1-xf2a.google.com (mail-qv1-xf2a.google.com [IPv6:2607:f8b0:4864:20::f2a]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 50241834A9 for ; Mon, 25 Oct 2021 01:58:22 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=jim.posen@gmail.com Received: by mail-qv1-xf2a.google.com with SMTP id t1so6159053qvb.1 for ; Sun, 24 Oct 2021 16:58:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=1beq6z4wThE/rtb21/uJJwK3trL7/j4DU8m0l75BiwU=; b=iowtKRyyUNgzzl/sVEw2pKehoggItbEB4Nml+WFG3YBlVMgIIri4tH+cVEAAOkWR5E diiKBG5/1aavwi3kwB1jKLfwDzBMN20rg/Uxhvo3UFrHW4ms+yPDq/17wjJPOlcsQg1g WV/4lFiuXTgKSfCEBeqygWjy4KgRshQ/PvsnOjLlw63dL5aMtrRG2Lk+CDWarUBhegC9 MYICi2wg7HzenYYgkNXKY9f1xU/RdWxFnXhy4u8PumRGqxbDa1yl+vtFS6gt7BCs9QVc sO6g9GZaYHGcrF2VQHsIvNwJakb0R1FCJhgWRPrVseaXBmTEsvEkLRS1R/zbRd8ljvYT 3PBQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=1beq6z4wThE/rtb21/uJJwK3trL7/j4DU8m0l75BiwU=; b=DUBTVIoUkmIVmMJIHtUeIad1PBRnIlVy9yhl9pXbZAQzDYO/Ta7dBZdmM3SjTgLYuK XKLNul5+1hFN6Hts8sFwvyMamNWxVNPELbeKrWeovgiTy9q0JiymnvFhXXbmSLjgPK2S 3lenWhDHpy8XQgjQhIVTi1CqO4MBLzC6YrNpXvHzQ0BLMogaIO4dWA70Le7XNnHub53r 2B/HqU0JaXyR7y2Lm9UnJ9cSXEZRTqlRr7UHJbz+YOMge+OOL/Qx9fTdDpg6pymBR4bt DgxmTDV8F3Uzn6SnM2CT/DiU0RhMSH3anPlQyOXdi4XoMc+hIWTe3HNf4f6EriUqW+xu eIHg== X-Gm-Message-State: AOAM5318yCWIEWBFiUUVLRl5+GLu7WXt3yAL4STY1fmyepNfuZ6CrxQS baLHoSemLgZoHxo3h7TmaSV33RhgFjc= X-Google-Smtp-Source: ABdhPJw14RalS2VgNRA9SB3iLVrnexybcpeyesXv0aSLCuyikmOvYkSCgiz95ocZq/X+gHAsu6Jtmg== X-Received: by 2002:ad4:5d4b:: with SMTP id jk11mr8011614qvb.11.1635119900852; Sun, 24 Oct 2021 16:58:20 -0700 (PDT) Received: from phantom.myfiosgateway.com ([68.237.40.64]) by smtp.gmail.com with ESMTPSA id c9sm6848573qte.43.2021.10.24.16.58.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 24 Oct 2021 16:58:20 -0700 (PDT) From: Jim Posen To: u-boot@lists.denx.de Cc: trini@konsulko.com, mbrugger@suse.com, Jim Posen , Minkyu Kang Subject: [RFC PATCH 1/5] Compile for ARMv7-A with virtualization extensions Date: Sun, 24 Oct 2021 19:58:04 -0400 Message-Id: <20211024235808.1926508-2-jim.posen@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211024235808.1926508-1-jim.posen@gmail.com> References: <20211024235808.1926508-1-jim.posen@gmail.com> MIME-Version: 1.0 X-Mailman-Approved-At: Mon, 25 Oct 2021 02:02:55 +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.103.2 at phobos.denx.de X-Virus-Status: Clean In order to assemble instructions that read the ELR_hyp register, which is part of the ARMv7-A virtualization extensions, the assembler target architecture needs to be changed. Signed-off-by: Jim Posen --- arch/arm/Makefile | 4 ++++ arch/arm/mach-bcm283x/Kconfig | 3 +++ arch/arm/mach-exynos/Kconfig | 1 + 3 files changed, 8 insertions(+) diff --git a/arch/arm/Makefile b/arch/arm/Makefile index 6c9a00c5a4..68c6b06a0e 100644 --- a/arch/arm/Makefile +++ b/arch/arm/Makefile @@ -14,8 +14,12 @@ arch-$(CONFIG_CPU_SA1100) =-march=armv4 arch-$(CONFIG_CPU_PXA) = arch-$(CONFIG_CPU_ARM1136) =-march=armv5t arch-$(CONFIG_CPU_ARM1176) =-march=armv5t +ifeq ($(CONFIG_CPU_V7_HAS_VIRT),y) +arch-$(CONFIG_CPU_V7A) =-march=armv7ve +else arch-$(CONFIG_CPU_V7A) =$(call cc-option, -march=armv7-a, \ $(call cc-option, -march=armv7)) +endif arch-$(CONFIG_CPU_V7M) =-march=armv7-m arch-$(CONFIG_CPU_V7R) =-march=armv7-r ifeq ($(CONFIG_ARM64_CRC32),y) diff --git a/arch/arm/mach-bcm283x/Kconfig b/arch/arm/mach-bcm283x/Kconfig index b3287ce8bc..500a504c35 100644 --- a/arch/arm/mach-bcm283x/Kconfig +++ b/arch/arm/mach-bcm283x/Kconfig @@ -8,6 +8,7 @@ config BCM2836 depends on ARCH_BCM283X select ARMV7_LPAE select CPU_V7A + select CPU_V7_HAS_VIRT config BCM2837 bool "Broadcom BCM2837 SoC support" @@ -19,6 +20,7 @@ config BCM2837_32B select BCM2837 select ARMV7_LPAE select CPU_V7A + select CPU_V7_HAS_VIRT config BCM2837_64B bool "Broadcom BCM2837 SoC 64-bit support" @@ -36,6 +38,7 @@ config BCM2711_32B select BCM2711 select ARMV7_LPAE select CPU_V7A + select CPU_V7_HAS_VIRT select PHYS_64BIT config BCM2711_64B diff --git a/arch/arm/mach-exynos/Kconfig b/arch/arm/mach-exynos/Kconfig index 7df0e17617..6d0e95ba44 100644 --- a/arch/arm/mach-exynos/Kconfig +++ b/arch/arm/mach-exynos/Kconfig @@ -19,6 +19,7 @@ config ARCH_EXYNOS5 bool "Exynos5 SoC family" select BOARD_EARLY_INIT_F select CPU_V7A + select CPU_V7_HAS_VIRT select SHA_HW_ACCEL imply CMD_HASH imply CRC32_VERIFY