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 X-Spam-Level: X-Spam-Status: No, score=-19.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 19083C433F5 for ; Wed, 8 Sep 2021 13:35:39 +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 8706C611C8 for ; Wed, 8 Sep 2021 13:35:38 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 8706C611C8 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 B35DB833FE; Wed, 8 Sep 2021 15:34:54 +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="OWCjlKBb"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id A7783833BD; Wed, 8 Sep 2021 15:34:40 +0200 (CEST) Received: from mail-wr1-x436.google.com (mail-wr1-x436.google.com [IPv6:2a00:1450:4864:20::436]) (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 BCA0F83399 for ; Wed, 8 Sep 2021 15:34:32 +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-wr1-x436.google.com with SMTP id x6so3305840wrv.13 for ; Wed, 08 Sep 2021 06:34:32 -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=sWnwDpengI4qKBBhmo68wHxQXWqyOZwtiHEB0wEsvUM=; b=OWCjlKBbotLO+/SayBbPCultxYp4uRAVKoqrnYiow70d5EwlVDoBgIFv3Sf+qKtnCW iqLTTASB9HUOEGqsQkgqk/vTLSP7Ubjl4AqH9HZKKoGX7hfrURx+Zy6d5aR6QBaNJm+7 jmU4JeFuICa8Oo+ab25lt0mwOqTosQScG9CCE= 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=sWnwDpengI4qKBBhmo68wHxQXWqyOZwtiHEB0wEsvUM=; b=dTDdTXJ7JxiyzAun8+BC6upFzkf2zBiRDVMl5cjJkq9AR8FmB8cj7abV8Kw+e7S1QY ZRNL7GknyN6V1OkebJX0C+cAw2Lc3VfNZjRCnJNbYcyNvXWaKvOzAfakKxWsM8il6a6N CZMyMo3KCTsroUapkOcYPx/92lxXEXqXJ9ZSQVhxjFCvryxTs2xLnthzCyzRYRSkV/ou cXhzzdRWeFio1T/19vf77UxhOVsmoW40OW+3+QKlrZ+VhpqXMjNrZ4ay90u3BwxEWdwL uPFDeAUohhptnGRyScp9MO45nmmWNYdMsQVOojQsEXaEEPGUZyVpVyhIi4zsEwdwsD7b lwLw== X-Gm-Message-State: AOAM532071QGu61rbXdE8XvfOqk3mODqYau9NYt47YCud/ZDa2KlGAbN LOXbtbtTH0FTkPppfFPMSng4e0mcNOQooV8y X-Google-Smtp-Source: ABdhPJx9ZHoIwq78cmR2uMGaxMrDMSTvwpjhmSfIFAkUq6BcAP88UZ5TuQUIOaAk+S1YtZdutzLyWQ== X-Received: by 2002:a05:6000:1287:: with SMTP id f7mr4251809wrx.221.1631108071947; Wed, 08 Sep 2021 06:34:31 -0700 (PDT) Received: from sjg1.roam.corp.google.com (82-69-54-180.dsl.in-addr.zen.co.uk. [82.69.54.180]) by smtp.gmail.com with ESMTPSA id l2sm2209065wmi.1.2021.09.08.06.34.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 Sep 2021 06:34:31 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Cc: Ilias Apalodimas , Heinrich Schuchardt , Bin Meng , Tom Rini , Christian Melki , Simon Glass , Alexander Graf Subject: [PATCH 09/35] efi: Add a way to obtain boot services in the app Date: Wed, 8 Sep 2021 07:33:39 -0600 Message-Id: <20210908073355.9.I72ca3496a359815552442fccbd017f0474108e28@changeid> X-Mailer: git-send-email 2.33.0.153.gba50c8fa24-goog In-Reply-To: <20210908133405.696481-1-sjg@chromium.org> References: <20210908133405.696481-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 --- 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.153.gba50c8fa24-goog