From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 547CBC433EF for ; Sat, 25 Sep 2021 00:34:25 +0000 (UTC) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id CDC7D6124B for ; Sat, 25 Sep 2021 00:34:24 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org CDC7D6124B Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 0B801834F2; Sat, 25 Sep 2021 02:34:11 +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="Spo2Uq3h"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 7BE39834DF; Sat, 25 Sep 2021 02:31:57 +0200 (CEST) Received: from mail-oo1-xc34.google.com (mail-oo1-xc34.google.com [IPv6:2607:f8b0:4864:20::c34]) (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 9F35E834FE for ; Sat, 25 Sep 2021 02:31:14 +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-oo1-xc34.google.com with SMTP id g4-20020a4ab044000000b002900bf3b03fso3853436oon.1 for ; Fri, 24 Sep 2021 17:31:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Xi2DnuiciXazlGWU0xCG0Pb03SiMJwN4I5Cp1lVUdE0=; b=Spo2Uq3hISWmagU7kiN0kIedQXpcoLaM39UrsniyVAFfPc65pMeYfyrGp14vjeyaMS Sgx1h5ea0sEu2XGJ112uv5b+5dsL/6jHM378sXz/0ULTC39L4diVow7Xb2CyQRgRnrWa KF/HDIHsMrHtGnedojniMX6zIHArzB/eDIFHA= 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=Xi2DnuiciXazlGWU0xCG0Pb03SiMJwN4I5Cp1lVUdE0=; b=O+cKUW5Fe6UcJzzY+hJo8Y4KlH3d3aQWDsyqJsrw0x6UBxwv4TE3ZthrJqeiYt0G1B OZC8QQfZhAoNLNyndo5MpEIrJMfwSDqXzaIcfoDjHTA7UXozdvsr2QKwuZB6rAn0CscJ JFo0E5PuGTMxICYMe9bu7nxE9hrsfSlemICs/mWqA5Cv3+Oh7x3dvZnO4yfWQP8CMp5p 55bi7jcsoYjPUgQmWMrZ6NZG+0RZYaZO5Siv7w9+oq1tb4O1b8YZvdoby6OImdQxNmQj IIoJrkkNhpWQf/tx82O0YpvjQSqI/SlVEh3sfoJ+kFneLxxm3ix6dvW+u0mjafDky2nD wfdw== X-Gm-Message-State: AOAM5335QgKm6ltEfZGVPhBbCnLUsa0CCSaD/GDVyd9R/ONs31MiwNqp EbRX3jSzEwHF2/bMyu6JQhBNemJDFLqnmA== X-Google-Smtp-Source: ABdhPJxUTzCNihQMLaV7ml9uYTPfIJ6G2ZuFMTC03IwKgLrjGCkuAJQQWSzTWuecCLrkt/34DIbZqg== X-Received: by 2002:a05:6820:410:: with SMTP id o16mr10958478oou.36.1632529873075; Fri, 24 Sep 2021 17:31:13 -0700 (PDT) Received: from kiwi.bld.corp.google.com (c-67-190-101-114.hsd1.co.comcast.net. [67.190.101.114]) by smtp.gmail.com with ESMTPSA id y83sm2491462oia.47.2021.09.24.17.31.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 24 Sep 2021 17:31:12 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Cc: Heinrich Schuchardt , Bin Meng , Christian Melki , Tom Rini , Ilias Apalodimas , Simon Glass , Alexander Graf Subject: [PATCH v2 13/39] efi: Add a way to obtain boot services in the app Date: Fri, 24 Sep 2021 18:30:29 -0600 Message-Id: <20210924183029.v2.13.I72ca3496a359815552442fccbd017f0474108e28@changeid> X-Mailer: git-send-email 2.33.0.685.g46640cef36-goog In-Reply-To: <20210925003055.759305-1-sjg@chromium.org> References: <20210925003055.759305-1-sjg@chromium.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 Add a function to return this information along with a stub for the efi_info_get() function, since calling it otherwise hangs U-Boot. Signed-off-by: Simon Glass --- (no changes since v1) include/efi.h | 8 +++++++- lib/efi/efi_app.c | 10 ++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/include/efi.h b/include/efi.h index 18c13e0370a..b5835422b95 100644 --- a/include/efi.h +++ b/include/efi.h @@ -444,9 +444,15 @@ extern char _binary_u_boot_bin_start[], _binary_u_boot_bin_end[]; * * @return pointer to EFI system table */ - struct efi_system_table *efi_get_sys_table(void); +/** + * efi_get_boot() - Get access to the EFI boot services table + * + * @return pointer to EFI boot services table + */ +struct efi_boot_services *efi_get_boot(void); + /** * efi_get_ram_base() - Find the base of RAM * diff --git a/lib/efi/efi_app.c b/lib/efi/efi_app.c index 907bacd716a..f61665686c5 100644 --- a/lib/efi/efi_app.c +++ b/lib/efi/efi_app.c @@ -31,11 +31,21 @@ struct efi_system_table *efi_get_sys_table(void) return global_priv->sys_table; } +struct efi_boot_services *efi_get_boot(void) +{ + return global_priv->boot; +} + unsigned long efi_get_ram_base(void) { return global_priv->ram_base; } +int efi_info_get(enum efi_entry_t type, void **datap, int *sizep) +{ + return -ENOSYS; +} + static efi_status_t setup_memory(struct efi_priv *priv) { struct efi_boot_services *boot = priv->boot; -- 2.33.0.685.g46640cef36-goog