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 D59E4C433EF for ; Wed, 8 Sep 2021 13:39:27 +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 4FFE661164 for ; Wed, 8 Sep 2021 13:39:27 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 4FFE661164 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 1FC1D834A6; Wed, 8 Sep 2021 15:36:19 +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="nglAGlZ0"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 2AA958344A; Wed, 8 Sep 2021 15:35:19 +0200 (CEST) Received: from mail-wm1-x329.google.com (mail-wm1-x329.google.com [IPv6:2a00:1450:4864:20::329]) (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 087F6833CF for ; 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=sjg@chromium.org Received: by mail-wm1-x329.google.com with SMTP id z9-20020a7bc149000000b002e8861aff59so1676057wmi.0 for ; Wed, 08 Sep 2021 06:34:54 -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=mVD1vPGY3I8D3j9lmGegzsGIEvCVELq0slFgi9hA0dc=; b=nglAGlZ0buFgsNeNeOYgF6CRQr2gQeuEddsAiCS8hGl79kwBEQopLqNAtjyyLsIFMt Zko7dREBrDgO86HB8q8hVT59qDKZxb3tXEiXJNwdTJgwZfgZPY15ItZF8f2qj4GeWgxJ i47a3gUegQh7aRrUuImttRLKImJxb9PRv05fc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=mVD1vPGY3I8D3j9lmGegzsGIEvCVELq0slFgi9hA0dc=; b=HkKlauROawjPq9kt59s0SxkCMq6D3uz6PYxizS+Tr+1vgaa+uhvuJpSlBbAh8w0xuu sb+HAI59MxczlBjPaa5xhn07G+Zn7Ixdw1jfSTCvHx9iZddt16BImh56PksEV+GcLREC BiZSQG9urBdC8zjYT57YHDIY3L2dclfIxwaXQSNnkLYdnp+tNBzVwkzujdU4aIEHOCt0 xoczwjRnaQwR7V3F9+4qjYR4iP0X0iJDprp/RkSyU8ilaeIO+MT7c7aPHNT9RssAIEJw kNMpG3mZHDAJOIf1jiFHszfuEbOmzA1Sn+9K3Rcb3f5svKMLXsRSTSztjAAB4dR4w2iC iVkw== X-Gm-Message-State: AOAM532sDPawf9R7NuLQlh1tJZjG2noVRBm6MsmfC83I63btyM/neYEA BnIjhMSoKxbgSOj3ppRdn5ol0u6T0fiK8lrX X-Google-Smtp-Source: ABdhPJwjbQiIQGJQC75T7H0eD/BITHsdGHgiYbkH238gORULn5KG8WXP7S28Qr/kEXWyUQrD2u+EKw== X-Received: by 2002:a1c:2b04:: with SMTP id r4mr3634880wmr.168.1631108093195; Wed, 08 Sep 2021 06:34:53 -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.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 Sep 2021 06:34:52 -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 29/35] efi: Add a few comments to the stub Date: Wed, 8 Sep 2021 07:33:59 -0600 Message-Id: <20210908133405.696481-14-sjg@chromium.org> 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 Comment some functions that need more information. Signed-off-by: Simon Glass --- lib/efi/efi_stub.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/lib/efi/efi_stub.c b/lib/efi/efi_stub.c index b3393e47fae..156cbf0b928 100644 --- a/lib/efi/efi_stub.c +++ b/lib/efi/efi_stub.c @@ -225,6 +225,22 @@ static int get_codeseg32(void) return cs32; } +/** + * setup_info_table() - sets up a table containing information from EFI + * + * We must call exit_boot_services() before jumping out of the stub into U-Boot + * proper, so that U-Boot has full control of peripherals, memory, etc. + * + * Once we do this, we cannot call any boot-services functions so we must find + * out everything we need to before doing that. + * + * Set up a struct efi_info_hdr table which can hold various records (e.g. + * struct efi_entry_memmap) with information obtained from EFI. + * + * @priv: Pointer to our private information which contains the list + * @size: Size of the table to allocate + * @return 0 if OK, non-zero on error + */ static int setup_info_table(struct efi_priv *priv, int size) { struct efi_info_hdr *info; @@ -248,6 +264,12 @@ static int setup_info_table(struct efi_priv *priv, int size) return 0; } +/** + * add_entry_addr() - Add a new entry to the efi_info list + * + * @priv: Pointer to our private information which contains the list + * + */ static void add_entry_addr(struct efi_priv *priv, enum efi_entry_t type, void *ptr1, int size1, void *ptr2, int size2) { -- 2.33.0.153.gba50c8fa24-goog