From: "Laszlo Ersek" <lersek@redhat.com>
To: devel@edk2.groups.io, kraxel@redhat.com
Cc: Jiewen Yao <jiewen.yao@intel.com>,
Oliver Steffen <osteffen@redhat.com>,
Ard Biesheuvel <ardb+tianocore@kernel.org>
Subject: Re: [edk2-devel] [PATCH v2 4/4] OvmfPkg/PlatformPei: log pei memory cap details
Date: Mon, 5 Feb 2024 09:27:30 +0100 [thread overview]
Message-ID: <ee8ee112-ec92-e315-601e-35f66bbc30c9@redhat.com> (raw)
In-Reply-To: <20240202104720.1275308-5-kraxel@redhat.com>
On 2/2/24 11:47, Gerd Hoffmann wrote:
> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
> ---
> OvmfPkg/PlatformPei/MemDetect.c | 28 ++++++++++++++++++++++++++--
> 1 file changed, 26 insertions(+), 2 deletions(-)
>
> diff --git a/OvmfPkg/PlatformPei/MemDetect.c b/OvmfPkg/PlatformPei/MemDetect.c
> index 48ad0b83a55e..737166f1b0ad 100644
> --- a/OvmfPkg/PlatformPei/MemDetect.c
> +++ b/OvmfPkg/PlatformPei/MemDetect.c
> @@ -263,6 +263,30 @@ GetPeiMemoryCap (
> //
> MemoryCap = EFI_PAGES_TO_SIZE (TotalPages) + ApStacks + SIZE_64MB;
>
> + DEBUG ((
> + DEBUG_INFO,
> + "%a: page tables: %6lu KB (%lu/%lu/%lu/%lu pages for levels 5/4/3/2)\n",
> + __func__,
> + RShiftU64 (EFI_PAGES_TO_SIZE (TotalPages), 10),
should be
RShiftU64 (EFI_PAGES_TO_SIZE ((UINTN)TotalPages), 10)
> + Level5Pages,
> + Level4Pages,
> + Level3Pages,
> + Level2Pages
These values are now UINT32s, so the format specifier for each should be %u
> + ));
> + DEBUG ((
> + DEBUG_INFO,
> + "%a: ap stacks: %6lu KB (%d cpus)\n",
> + __func__,
> + RShiftU64 (ApStacks, 10),
> + PlatformInfoHob->PcdCpuMaxLogicalProcessorNumber
"PlatformInfoHob->PcdCpuMaxLogicalProcessorNumber" is a UINT32, should
be formatted with %u, not %d
> + ));
> + DEBUG ((
> + DEBUG_INFO,
> + "%a: memory cap: %6lu KB\n",
> + __func__,
> + RShiftU64 (MemoryCap, 10)
> + ));
> +
> ASSERT (MemoryCap <= MAX_UINT32);
> return (UINT32)MemoryCap;
> }
OK
> @@ -347,10 +371,10 @@ PublishPeiMemory (
> } else {
> DEBUG ((
> DEBUG_WARN,
> - "%a: Not enough memory for PEI (have %llu KB, estimated need %llu KB)\n",
> + "%a: Not enough memory for PEI (have %lu KB, estimated need %u KB)\n",
> __func__,
> RShiftU64 (MemorySize, 10),
> - RShiftU64 (PeiMemoryCap, 10)
> + PeiMemoryCap >> 10
> ));
> }
> }
Did you mean to squash this hunk into patch#1 instead? (It seems
correct, just doesn't belong here IMO.)
Laszlo
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#115106): https://edk2.groups.io/g/devel/message/115106
Mute This Topic: https://groups.io/mt/104117105/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-
prev parent reply other threads:[~2024-02-05 8:27 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-02 10:47 [edk2-devel] [PATCH v2 0/4] OvmfPkg/PlatformPei: scaleability fixes for GetPeiMemoryCap() Gerd Hoffmann
2024-02-02 10:47 ` [edk2-devel] [PATCH v2 1/4] OvmfPkg/PlatformPei: log a warning when memory is tight Gerd Hoffmann
2024-02-05 7:45 ` Laszlo Ersek
2024-02-02 10:47 ` [edk2-devel] [PATCH v2 2/4] OvmfPkg/PlatformPei: consider AP stacks for pei memory cap Gerd Hoffmann
2024-02-05 7:57 ` Laszlo Ersek
2024-02-02 10:47 ` [edk2-devel] [PATCH v2 3/4] OvmfPkg/PlatformPei: rewrite page table calculation Gerd Hoffmann
2024-02-05 8:14 ` Laszlo Ersek
2024-02-05 8:19 ` Laszlo Ersek
2024-02-14 9:32 ` Gerd Hoffmann
2024-02-14 10:48 ` Laszlo Ersek
2024-02-14 11:07 ` Gerd Hoffmann
2024-02-14 11:58 ` Laszlo Ersek
2024-02-02 10:47 ` [edk2-devel] [PATCH v2 4/4] OvmfPkg/PlatformPei: log pei memory cap details Gerd Hoffmann
2024-02-05 8:27 ` Laszlo Ersek [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ee8ee112-ec92-e315-601e-35f66bbc30c9@redhat.com \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox