From patchwork Tue Jan 10 16:19:31 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Rini X-Patchwork-Id: 1724162 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.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: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=konsulko.com header.i=@konsulko.com header.a=rsa-sha256 header.s=google header.b=eF8vH9Yt; 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 ECDSA (P-384)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4NrwzH2zV4z23gB for ; Wed, 11 Jan 2023 03:20:59 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 91C6E855F9; Tue, 10 Jan 2023 17:20:31 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=konsulko.com 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=konsulko.com header.i=@konsulko.com header.b="eF8vH9Yt"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 0A6FC854F4; Tue, 10 Jan 2023 17:19:56 +0100 (CET) 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,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-yw1-x1132.google.com (mail-yw1-x1132.google.com [IPv6:2607:f8b0:4864:20::1132]) (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 0BAB5854F4 for ; Tue, 10 Jan 2023 17:19:52 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=trini@konsulko.com Received: by mail-yw1-x1132.google.com with SMTP id 00721157ae682-4d13cb4bbffso40400997b3.3 for ; Tue, 10 Jan 2023 08:19:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=konsulko.com; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=td580RFaFRvUoJZutZkOgLipyqNedSI7DynRsUth7Gk=; b=eF8vH9Yt+Vr9/QoDgBI7loXyeB6OAB96ncH2a547xZpVjDhhomt522cRihdkJ/Xx7Z tO3WjkOHt6LhlB2IXofoRdlEkUZvCS3bbg4Tta27ulpotsPfCQ32O+ess0Wr5ZXLD5e2 jeZXo+dT3/EKkL488J3iv3njzlR3lhsAPvR0k= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=td580RFaFRvUoJZutZkOgLipyqNedSI7DynRsUth7Gk=; b=Rq4pmgGFCfJhlsgJC/WZUIwu0rQ6OjMKR1RMl9sK4mBMhNazwS0fe5ieQT40mXhgBe YwejS0qXrUANTVXu+UgAatiqrq/0ncxQj+LSnGo+N++KVyjGs4Cz9vDfmHeq/rkPx8GT pcwlsp6MLcVxEmX3Rqj3PpBi6HC3EZhOv2iuKxBDZG534wlWyXv4TcLL2PvY745QDDe/ YUEE8/RFl9WxA3/NRxnFcb6DqElXDVy61+g6IpLtktnNdKWl/ubo1SfAQJgU6ekpzTcB kgBHJ16BU4fGoEagwlT5qYvKS55PX6CXXP0YUOP5hGOEht3xWOpU4hXFAofLewchMPxs Zr8g== X-Gm-Message-State: AFqh2krkHABikUXJEpTSvRzVUzCqLA4fyTOJFAPSAe8zO/ElZZrfol63 9Z2YZ0Lt8zVylNh4fnliewtnWB3X0o2GjgdVCQo= X-Google-Smtp-Source: AMrXdXve1de63zWKLgEZ9pKEJgJhHm906LfBDsCbQO2WtbEyCBSFwvYrz47nVubc7CRh9WHTt6LIVA== X-Received: by 2002:a05:7500:4d19:b0:f0:31e9:3e50 with SMTP id lb25-20020a0575004d1900b000f031e93e50mr1318130gab.24.1673367590422; Tue, 10 Jan 2023 08:19:50 -0800 (PST) Received: from bill-the-cat.lan (2603-6081-7b00-6400-2c2f-ce0f-8dee-7136.res6.spectrum.com. [2603:6081:7b00:6400:2c2f:ce0f:8dee:7136]) by smtp.gmail.com with ESMTPSA id d12-20020a05620a240c00b006fcc3858044sm7557110qkn.86.2023.01.10.08.19.49 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Jan 2023 08:19:49 -0800 (PST) From: Tom Rini To: u-boot@lists.denx.de Subject: [PATCH 04/19] arm: Rework usage of CONFIG_ARMV[78]_SECURE_BASE in linker scripts Date: Tue, 10 Jan 2023 11:19:31 -0500 Message-Id: <20230110161946.3816866-4-trini@konsulko.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230110161946.3816866-1-trini@konsulko.com> References: <20230110161946.3816866-1-trini@konsulko.com> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 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.6 at phobos.denx.de X-Virus-Status: Clean In order to avoid defining CONFIG_ARMV[78_]SECURE_BASE as empty in the linker scripts, if not already defined, add and use __ARMV[78_]SECURE_BASE for when the base is not defined and we want the linker scripts to continue. Signed-off-by: Tom Rini --- arch/arm/cpu/armv8/u-boot.lds | 6 ++++-- arch/arm/cpu/u-boot.lds | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/arch/arm/cpu/armv8/u-boot.lds b/arch/arm/cpu/armv8/u-boot.lds index 8fe4682dd2ae..fb6a30c922f7 100644 --- a/arch/arm/cpu/armv8/u-boot.lds +++ b/arch/arm/cpu/armv8/u-boot.lds @@ -51,10 +51,12 @@ SECTIONS } #ifndef CONFIG_ARMV8_SECURE_BASE -#define CONFIG_ARMV8_SECURE_BASE +#define __ARMV8_SECURE_BASE #define __ARMV8_PSCI_STACK_IN_RAM +#else +#define __ARMV8_SECURE_BASE CONFIG_ARMV8_SECURE_BASE #endif - .secure_text CONFIG_ARMV8_SECURE_BASE : + .secure_text __ARMV8_SECURE_BASE : AT(ADDR(.__secure_start) + SIZEOF(.__secure_start)) { *(._secure.text) diff --git a/arch/arm/cpu/u-boot.lds b/arch/arm/cpu/u-boot.lds index f25f72b2e0d8..fc4f63d83489 100644 --- a/arch/arm/cpu/u-boot.lds +++ b/arch/arm/cpu/u-boot.lds @@ -77,11 +77,13 @@ SECTIONS } #ifndef CONFIG_ARMV7_SECURE_BASE -#define CONFIG_ARMV7_SECURE_BASE +#define __ARMV7_SECURE_BASE #define __ARMV7_PSCI_STACK_IN_RAM +#else +#define __ARMV7_SECURE_BASE CONFIG_ARMV7_SECURE_BASE #endif - .secure_text CONFIG_ARMV7_SECURE_BASE : + .secure_text __ARMV7_SECURE_BASE : AT(ADDR(.__secure_start) + SIZEOF(.__secure_start)) { *(._secure.text)