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 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 smtp.lore.kernel.org (Postfix) with ESMTPS id AC31FC433EF for ; Sat, 4 Dec 2021 15:59:12 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 8CB89830B9; Sat, 4 Dec 2021 16:58:26 +0100 (CET) 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="dgQ+M+NA"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 7573D82FAF; Sat, 4 Dec 2021 16:57:44 +0100 (CET) Received: from mail-oi1-x22f.google.com (mail-oi1-x22f.google.com [IPv6:2607:f8b0:4864:20::22f]) (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 00AA8830B9 for ; Sat, 4 Dec 2021 16:57:25 +0100 (CET) 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-oi1-x22f.google.com with SMTP id o4so12248031oia.10 for ; Sat, 04 Dec 2021 07:57:25 -0800 (PST) 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=fHkYPdzFTyBATzoHeEKHhyPm5eHc37pYdCguIegh95s=; b=dgQ+M+NABE2TDgYmdGKY1swduwnG19T4RjN0t6vyMlCIkf9Xkp6ptMaLcQUkHfO80A YOLjhn3OzFot7c37bRSmBLNVlVou7adCz26LmuvX+ydva9CADKch7xHNlG1Abif/lokN BtEY/pwMDhqlcBIBYkVaS0g+X1fmIAMzLq/rc= 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=fHkYPdzFTyBATzoHeEKHhyPm5eHc37pYdCguIegh95s=; b=EIF9n4LWU5f3Wf0K/m0IwtgPqFKoQUCXQ8riltcIddzNnNleXW1XiN0EJR8d7RLRfu K+Qh8gbTc7uSilLECUOQqJikEWLVCZ+jBU+OHiUdsZ2TSk5qSiGL4p0L41jF0JrmBg8d sM+UGtNUTzAFOuiZ33/i2d9aWHT3+pUebPW+KX6H/2M/FgzkRCKzUMLtkdHt/bIOo7qI +3yejoek/OiMh1B77AVHZ+0r2crn4f6RmndW7mBql/7qz0wilx37U+zgfKQtwGtPrCuy Y1MLsEnrj4wzeBQTqBjA5NGkunrNxntrP7x+MaYQ5XqnkRf6GJSKde5BmreoIlsevd9F LHtA== X-Gm-Message-State: AOAM532JTYd6uWCMPRdhDM7Nw2k9/KWlq8+OrH4TX9ZIDMUFD2icR463 lkKgGqaTHHZ7huuH4oxbeN96YJAwXljyUA== X-Google-Smtp-Source: ABdhPJzBQwjd/UYtAQmTPi1ETukRj0hMod9QEmAZX4+lHywovJFOCXuMR90ao26gASE3w5lqEtxjag== X-Received: by 2002:a05:6808:211c:: with SMTP id r28mr16196345oiw.155.1638633444507; Sat, 04 Dec 2021 07:57:24 -0800 (PST) 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 a12sm1230513otk.35.2021.12.04.07.57.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 04 Dec 2021 07:57:24 -0800 (PST) From: Simon Glass To: U-Boot Mailing List Cc: Ilias Apalodimas , Christian Melki , Bin Meng , Heinrich Schuchardt , Tom Rini , Simon Glass , Alexander Graf Subject: [PATCH v5 13/28] efi: Add a few comments to the stub Date: Sat, 4 Dec 2021 08:56:42 -0700 Message-Id: <20211204155657.2913911-10-sjg@chromium.org> X-Mailer: git-send-email 2.34.1.400.ga245620fadb-goog In-Reply-To: <20211204155657.2913911-1-sjg@chromium.org> References: <20211204155657.2913911-1-sjg@chromium.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.38 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 --- (no changes since v1) 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.34.1.400.ga245620fadb-goog