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 0C0F8C433F5 for ; Fri, 17 Dec 2021 16:38:47 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id C2B4F834CF; Fri, 17 Dec 2021 17:38:13 +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="MD1v7pk7"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id DB0F28314C; Fri, 17 Dec 2021 17:37:42 +0100 (CET) Received: from mail-vk1-xa2b.google.com (mail-vk1-xa2b.google.com [IPv6:2607:f8b0:4864:20::a2b]) (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 161EE834A3 for ; Fri, 17 Dec 2021 17:37:34 +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-vk1-xa2b.google.com with SMTP id s1so1897108vks.9 for ; Fri, 17 Dec 2021 08:37:33 -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=fE9TwT6uBl8JC2d6/fQ5A7t4YcKS9hFH8A+nAlAzdDE=; b=MD1v7pk7nv9HoLhiLxtiz7pAi4fegmHQykdCXT1n4bDYuHcGIePL9JfrdUMh+b7RG8 bUvD4wdLOsH4WXrPtiy5yUyQmIEUnbcvwALeB+bQIgG6M/XrI9FYFQpBlnOllMx9ADeF A4UDL0mp4N69qzPmNp9GN/6d0LPlu7SJ/LpfU= 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=fE9TwT6uBl8JC2d6/fQ5A7t4YcKS9hFH8A+nAlAzdDE=; b=5k54QuBehNC8ulJ2f7uMQA4HV06mKqvWSEld9kipPzuLoCU+rO5dWpOK9i/wPz+H0w R+/xKtDWthqI7RTRdcmt6HlwmFnBx4PWRYaUMlt5UvONlyZG+/9TgpgM6b3uMolJtoE+ F9PkOy7SOvydVBjL39SnQQjeiQ120RUlNQvnLvUsHQcl8FVRpLb9iDqeLt7LUaIKAeHH //26tZ+qMzr8wN2xvHugYZbSrg7Dr72fFRfzLqP/s+BWONy2knIppULAeOaxi4+r1g/l qSefiCSkOvhQ1guHdsnHUVA0VUHJ4g6Z/xDxmJ0CawUOFGSLN9qCar0/2daXkRZq3gyu Nnew== X-Gm-Message-State: AOAM531FCJA9EU0HTDNQFOlsKfe/rvU6hpNWOosMI9vi1rrwb9GckW07 QAzeVYglWtQ6+/NuUk50llSfuLakrPF6lEKS2jmGBw== X-Google-Smtp-Source: ABdhPJx27XlZ9F0UJh3Qkdfm/DIV1Clm1CN1vWOvB3bKmVrspphLOt8JPOOZbRSLfafJiXefsYYeZdXOGspy23GDzoc= X-Received: by 2002:a05:6122:d11:: with SMTP id az17mr1536205vkb.22.1639759052581; Fri, 17 Dec 2021 08:37:32 -0800 (PST) MIME-Version: 1.0 References: <20211204155657.2913911-1-sjg@chromium.org> <20211204085647.v5.18.I2eff1cd4f12753d0d86e9751fa350458ef5789e0@changeid> <560e2401-9866-b396-c8bb-d166a75e1429@gmx.de> In-Reply-To: <560e2401-9866-b396-c8bb-d166a75e1429@gmx.de> From: Simon Glass Date: Fri, 17 Dec 2021 09:37:20 -0700 Message-ID: Subject: Re: [PATCH v5 18/28] efi: Show when allocated pages are used To: Heinrich Schuchardt Cc: Ilias Apalodimas , Christian Melki , Bin Meng , Tom Rini , Alexander Graf , U-Boot Mailing List 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 Thu, 9 Dec 2021 at 12:55, Heinrich Schuchardt wrote: > > On 12/4/21 07:56, Simon Glass wrote: > > Add a message here so that both paths of memory allocation are reported. > > > > Signed-off-by: Simon Glass > > --- > > > > (no changes since v2) > > > > Changes in v2: > > - Use log_info() instead of printf() > > > > lib/efi/efi_app.c | 3 ++- > > 1 file changed, 2 insertions(+), 1 deletion(-) > > > > diff --git a/lib/efi/efi_app.c b/lib/efi/efi_app.c > > index e454f1a1564..36e3f1de427 100644 > > --- a/lib/efi/efi_app.c > > +++ b/lib/efi/efi_app.c > > @@ -121,13 +121,14 @@ static efi_status_t setup_memory(struct efi_priv *priv) > > ret = boot->allocate_pages(EFI_ALLOCATE_MAX_ADDRESS, > > priv->image_data_type, pages, &addr); > > if (ret) { > > If AllocatePages() fails the system is out of memory. Just return to the > calling firmware with EFI_OUT_OF_RESOURCES. I have left this as it is as sometimes it is possible to allocate from the pool even if allocate_pages() fails. I hit this on an Intel platform some years ago. In any case your comment does not relate to this patch. Regards, Simon