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 02DC2C433F5 for ; Fri, 17 Dec 2021 16:38:56 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 99DFD8352D; Fri, 17 Dec 2021 17:38:16 +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="R7BDM/Ve"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id CC64A83492; Fri, 17 Dec 2021 17:37:41 +0100 (CET) Received: from mail-ua1-x92a.google.com (mail-ua1-x92a.google.com [IPv6:2607:f8b0:4864:20::92a]) (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 0AC9583458 for ; Fri, 17 Dec 2021 17:37:32 +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@google.com Received: by mail-ua1-x92a.google.com with SMTP id r15so5447510uao.3 for ; Fri, 17 Dec 2021 08:37:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=jg0+Q8w6rfwWdNn/zRhBo38SaXM/i6UraWVnphZFiGo=; b=R7BDM/Veful7R3pW3z5c95gYaMruHtYpi5fNbRIIIR12og1Md5qPKsQDvF0oUuvI5F T3JqHgqSJAnEDFuf06SNyBGLEyh6jL2gPHdlOk1IrcfIg2+ugs3mWCgwLZua0zTL7/NG fOBgrPiSvoJBi3uvgQ04FoP5GnWIybr+nZr9U= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=jg0+Q8w6rfwWdNn/zRhBo38SaXM/i6UraWVnphZFiGo=; b=SxPVkM0wr04VtkGWO6sB8J+Fpa90jumgWaeiEQVBdLT98c1Im2MVSoUdTBBfxS/xHY OO3clD3jZBO2kP/Lw5PWzzPYmsInNX1ewM94g2FxLra0U+jOmKDPLK3H2CcvMc4vK2fn 77JLSWhOaDZoBih9xXLoEWRqBbQaX0vOcVUbhXZEklkqwfciRnvXprU5/P/on3abzQBZ 01hPXa5MMfunAwOqgbVEkCVfHU5fDPop1+fEhv2892fLl2dCUk6vdsRrX/W5mweCeOmm hWiUX2NKT11+7PmuNK969jUZU1sljpCmDZhWE8KkJXysM/OsRPbdyaB/ov2c6PBn6z7C q+iA== X-Gm-Message-State: AOAM532D+2qeQhLgS7Pz0mUj3SsPdoEsAaaEt7BZ1jTcJkxpK7C7eWsY 5E8qC0WjHnIxxKPHYqhcsoY4NTQIzrZGHlvxlECwjg== X-Google-Smtp-Source: ABdhPJymgPypKyZqXB3YygFg8MAfg6RNgFwWxRWHxlaUNHbxXUSfZury8mmGGc04GkuYzL0pTu/nKBba7ulNAyU6380= X-Received: by 2002:a9f:2423:: with SMTP id 32mr1413837uaq.140.1639759050650; Fri, 17 Dec 2021 08:37:30 -0800 (PST) MIME-Version: 1.0 References: <20211204155657.2913911-1-sjg@chromium.org> <20211204155657.2913911-12-sjg@chromium.org> <55f6aec1-5b25-350d-9bdb-2db115de5c9b@gmx.de> In-Reply-To: <55f6aec1-5b25-350d-9bdb-2db115de5c9b@gmx.de> From: Simon Glass Date: Fri, 17 Dec 2021 09:37:18 -0700 Message-ID: Subject: Re: [PATCH v5 15/28] efi: Move exit_boot_services into a function To: Heinrich Schuchardt Cc: U-Boot Mailing List , Ilias Apalodimas , Christian Melki , Bin Meng , Tom Rini , Alexander Graf Content-Type: text/plain; charset="UTF-8" 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 Hi Heinrich, On Sat, 4 Dec 2021 at 12:13, Heinrich Schuchardt wrote: > > On 12/4/21 16:56, Simon Glass wrote: > > At present this code is inline in the app and stub. But they do the same > > thing. The difference is that the stub does it immediately and the app > > doesn't want to do it until the end (when it boots a kernel) or not at > > all, if returning to UEFI. > > > > Move it into a function so it can be called as needed. > > > > Also store the memory map so that it can be accessed within the app if > > needed. > > > > Signed-off-by: Simon Glass > > --- > > > > (no changes since v2) > > > > Changes in v2: > > - Add a sentence about what the patch does > > > > include/efi.h | 32 ++++++++++++++++++++++ > > lib/efi/efi.c | 68 ++++++++++++++++++++++++++++++++++++++++++++++ > > lib/efi/efi_app.c | 3 ++ > > lib/efi/efi_stub.c | 66 ++++++++------------------------------------ > > 4 files changed, 114 insertions(+), 55 deletions(-) > > [..] > > +/** > > + * efi_store_memory_map() - Collect the memory-map info from EFI > > + * > > + * Collect the memory info and store it for later use, e.g. in calling > > + * exit_boot_services() > > + * > > + * @priv: Pointer to private EFI structure > > + * @return 0 if OK, non-zero on error > > %s/@return/Return:/ I will have to try to remember that. We are on our 3rd comment style now. > > Cf. > https://www.kernel.org/doc/html/latest/doc-guide/kernel-doc.html#function-documentation > [..] > > Missing function description > > > +int efi_call_exit_boot_services(void) Putting your comment above the code you refer to defeats 'patman status -C', so could you please put it below? The comment is in the header file as this is an exported function. Regards, Simon