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 7A921C433EF for ; Tue, 26 Oct 2021 03:35:53 +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 EFBA860E0B for ; Tue, 26 Oct 2021 03:35:52 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org EFBA860E0B 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 D97D18362C; Tue, 26 Oct 2021 05:33:44 +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="Feyx3FYR"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 71F5A83564; Tue, 26 Oct 2021 05:31:51 +0200 (CEST) Received: from mail-io1-xd2b.google.com (mail-io1-xd2b.google.com [IPv6:2607:f8b0:4864:20::d2b]) (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 045F783542 for ; Tue, 26 Oct 2021 05:31:31 +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-xd2b.google.com with SMTP id p142so18439276iod.0 for ; Mon, 25 Oct 2021 20:31:30 -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=FB3U1XTKScfD89GiqBhyie67CuPSOPL6Avhq0Umkf+U=; b=Feyx3FYRAcm183XbJxv06gD//y4OrpwEwBqWrFkJERBHdR0gPBBDw7ftJQK2Aj3c60 4FZNPsHhfS6oI9ucZfsv5yPUKv78skzgXX/09xyQGaDqV6hYv1j9FDBBusPd+FxVmthk PG2UyHeH+GKAEIfxixcZ5z1lYAgwYiP+W/cfs= 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=FB3U1XTKScfD89GiqBhyie67CuPSOPL6Avhq0Umkf+U=; b=eIS//n2/PjL/9vVOCrc6MuEOJRmSh2aZBP2/vaiqKU87gASthSBweDY9nuAGJGbz18 cbrVDb3ZIEKbj7HB+s0jg/ukoIX8QU/9zO6mP/3DE3uNxMTMvoi7pLG7y9k4XV3ENT0c qCq1uBo4KCMKjocNIQ5hDxNBqHl0ItP2QOo+c7ym2MkWkTGgKq0pOZjQAj/bGnYvcHE/ StzAe3N4bOhOpRa3ymz204Q2RnG2J9f9qYqAo6GAB+7jHEHkxv/7KWT0XtcsoANdSqot C1uYKIfnlIrwuGShpEv92m/4snHdrludBy86fheLHcodGpgFh6OMz1vx+6LSXsDMjtB/ Rbaw== X-Gm-Message-State: AOAM530gq1Ge73fnj0TRZw1ZvRaoVNw2wlugOjnFaghCPv1IOHoL9DNi XMiCdYlacUlwu+rm5KbK/2GjOZ9HAiPVvw== X-Google-Smtp-Source: ABdhPJyF2BGexjBdKyuxPufw2AB0HneZQ2ByVrAyW2SNd9Jnac8OdEHGlEnkLR7diumMXWhGEUcWYw== X-Received: by 2002:a05:6602:2e05:: with SMTP id o5mr13080296iow.204.1635219089583; Mon, 25 Oct 2021 20:31:29 -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 s10sm10127203ild.78.2021.10.25.20.31.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Oct 2021 20:31:29 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Cc: Ilias Apalodimas , Christian Melki , Bin Meng , Tom Rini , Heinrich Schuchardt , Simon Glass , Alexander Graf Subject: [PATCH v3 26/35] efi: Add a few comments to the stub Date: Mon, 25 Oct 2021 21:30:49 -0600 Message-Id: <20211026033058.430010-15-sjg@chromium.org> X-Mailer: git-send-email 2.33.0.1079.g6e70778dc9-goog In-Reply-To: <20211026033058.430010-1-sjg@chromium.org> References: <20211026033058.430010-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 --- (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.33.0.1079.g6e70778dc9-goog