From patchwork Sun Sep 25 15:02:08 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1682181 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=2a01:238:438b:c500:173d:9f52:ddab:ee01; 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=chromium.org header.i=@chromium.org header.a=rsa-sha256 header.s=google header.b=R+kckwez; 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 ECDSA (P-384)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Mb8Kq3vBJz1ypX for ; Mon, 26 Sep 2022 01:03:59 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id C2BA784BFB; Sun, 25 Sep 2022 17:03:27 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org 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=chromium.org header.i=@chromium.org header.b="R+kckwez"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 9718684BE1; Sun, 25 Sep 2022 17:03:20 +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,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE, SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.2 Received: from mail-io1-xd2f.google.com (mail-io1-xd2f.google.com [IPv6:2607:f8b0:4864:20::d2f]) (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 23BDA845EF for ; Sun, 25 Sep 2022 17:03:16 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@chromium.org Received: by mail-io1-xd2f.google.com with SMTP id p202so3424497iod.6 for ; Sun, 25 Sep 2022 08:03:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date; bh=mhpkXiMy4XeIxiLOk8Q3uRU0OMcECi18/5A2p8jxFDE=; b=R+kckwezmO4RHM66HaymA4O/Dd780bcJnhnOYoB++acqh/rdU/kIbIZ+GIjVsy6v9V z3a3jlpT4cvAk3pF8hwYw5XNm7LpxL75f6AyVAN/bt5JNhdIbxeLSznTwfXcgnODnUO5 WIPWH3TQrfwbGbhXIZDTbC+Tsbs/772KkhesE= 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:cc:to:from:x-gm-message-state:from:to:cc :subject:date; bh=mhpkXiMy4XeIxiLOk8Q3uRU0OMcECi18/5A2p8jxFDE=; b=Fd/a+vupAlrJlR+2Xqe8h3lKJLRN5wWgZpeNzopwKvOEM5KnaNA/CrZFwJmgnO+R8L xigmROsRT19LrouHw+gbovyO1LUcy32kz7ZZtHw5peR9QxoVNdTzcbEpnxgjZZid2N9c QO8oaOYs4gM3jYJLtVHDHHbAArJ5AhNtfHnIrLWGVRSVtBDgzdQE9pGcWOmC2E8XJOvh q/qwJ5eGC7gcALzhG+havbyjzW6c2m7EgCsCYSu+Ml/Utebv1c0DqARIRD2HURx6f9CA UiWhbr2lXtIoVeg9GHEao1hkQxGWWvfMOc2Q6MMW482kds15w6dWkdfdUlt4ITMfclCx qeRQ== X-Gm-Message-State: ACrzQf01oeXonc1dXJL4SHaykUbgnkdVz28PmGaKG4r2sxm1IeY/3U7u blzScs7XS7VOOPdW4DjEa5PmYyoaZeSTJQ== X-Google-Smtp-Source: AMsMyM699bZbhafX2WkjeKE0B+wlNWbymDm2kspx37/nRXkMklq02I4yOhfYvd3yyhzRKAyY1JyN6A== X-Received: by 2002:a6b:5b09:0:b0:6a1:4b90:5be9 with SMTP id v9-20020a6b5b09000000b006a14b905be9mr7866319ioh.119.1664118194320; Sun, 25 Sep 2022 08:03:14 -0700 (PDT) Received: from sjg1.roam.corp.google.com (c-67-190-102-125.hsd1.co.comcast.net. [67.190.102.125]) by smtp.gmail.com with ESMTPSA id u19-20020a926013000000b002f19d9838c6sm5360578ilb.25.2022.09.25.08.03.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 25 Sep 2022 08:03:13 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Cc: Tom Rini , Simon Glass , Alper Nebi Yasak , Andre Przywara , Heiko Schocher , Heiko Thiery , Heinrich Schuchardt , =?utf-8?q?Marek_Beh=C3=BAn?= , Michael Walle , Oleksandr Suvorov , =?utf-8?q?Pali_Roh?= =?utf-8?q?=C3=A1r?= , Ricardo Salveti , Stefan Roese , Vaishnav Achath Subject: [PATCH 05/45] spl: Use binman suffix allow symbols of any SPL etype Date: Sun, 25 Sep 2022 09:02:08 -0600 Message-Id: <20220925150248.2524421-6-sjg@chromium.org> X-Mailer: git-send-email 2.37.3.998.g577e59143f-goog In-Reply-To: <20220925150248.2524421-1-sjg@chromium.org> References: <20220925150248.2524421-1-sjg@chromium.org> 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 At present we use symbols for the u-boot-spl entry, but this is not always what we want. For example, sandbox actually jumps to a u-boot-spl-elf entry, since sandbox executables are ELF files. We already handle this with U-Boot by using the '-any' suffix. Add it for SPL as well. Signed-off-by: Simon Glass --- common/spl/spl.c | 16 ++++++++-------- include/spl.h | 8 ++++---- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/common/spl/spl.c b/common/spl/spl.c index e550d1cb174..55b638209ae 100644 --- a/common/spl/spl.c +++ b/common/spl/spl.c @@ -59,13 +59,13 @@ binman_sym_declare(ulong, u_boot_any, image_pos); binman_sym_declare(ulong, u_boot_any, size); #ifdef CONFIG_TPL -binman_sym_declare(ulong, u_boot_spl, image_pos); -binman_sym_declare(ulong, u_boot_spl, size); +binman_sym_declare(ulong, u_boot_spl_any, image_pos); +binman_sym_declare(ulong, u_boot_spl_any, size); #endif #ifdef CONFIG_VPL -binman_sym_declare(ulong, u_boot_vpl, image_pos); -binman_sym_declare(ulong, u_boot_vpl, size); +binman_sym_declare(ulong, u_boot_vpl_any, image_pos); +binman_sym_declare(ulong, u_boot_vpl_any, size); #endif #endif /* BINMAN_UBOOT_SYMBOLS */ @@ -159,10 +159,10 @@ ulong spl_get_image_pos(void) #ifdef CONFIG_VPL if (spl_next_phase() == PHASE_VPL) - return binman_sym(ulong, u_boot_vpl, image_pos); + return binman_sym(ulong, u_boot_vpl_any, image_pos); #endif return spl_next_phase() == PHASE_SPL ? - binman_sym(ulong, u_boot_spl, image_pos) : + binman_sym(ulong, u_boot_spl_any, image_pos) : binman_sym(ulong, u_boot_any, image_pos); } @@ -173,10 +173,10 @@ ulong spl_get_image_size(void) #ifdef CONFIG_VPL if (spl_next_phase() == PHASE_VPL) - return binman_sym(ulong, u_boot_vpl, size); + return binman_sym(ulong, u_boot_vpl_any, size); #endif return spl_next_phase() == PHASE_SPL ? - binman_sym(ulong, u_boot_spl, size) : + binman_sym(ulong, u_boot_spl_any, size) : binman_sym(ulong, u_boot_any, size); } diff --git a/include/spl.h b/include/spl.h index bac5ea29b7d..a89830d24fd 100644 --- a/include/spl.h +++ b/include/spl.h @@ -286,10 +286,10 @@ struct spl_load_info { */ binman_sym_extern(ulong, u_boot_any, image_pos); binman_sym_extern(ulong, u_boot_any, size); -binman_sym_extern(ulong, u_boot_spl, image_pos); -binman_sym_extern(ulong, u_boot_spl, size); -binman_sym_extern(ulong, u_boot_vpl, image_pos); -binman_sym_extern(ulong, u_boot_vpl, size); +binman_sym_extern(ulong, u_boot_spl_any, image_pos); +binman_sym_extern(ulong, u_boot_spl_any, size); +binman_sym_extern(ulong, u_boot_vpl_any, image_pos); +binman_sym_extern(ulong, u_boot_vpl_any, size); /** * spl_get_image_pos() - get the image position of the next phase