From: "Ni, Ray" <ray.ni@intel.com>
To: Gerd Hoffmann <kraxel@redhat.com>,
"devel@edk2.groups.io" <devel@edk2.groups.io>
Cc: Oliver Steffen <osteffen@redhat.com>,
"Kumar, Rahul R" <rahul.r.kumar@intel.com>,
Pawel Polawski <ppolawsk@redhat.com>,
"Dong, Eric" <eric.dong@intel.com>
Subject: Re: [PATCH 1/2] UefiCpuPkg/PiSmmCpuDxeSmm: drop support for obsolete processors
Date: Mon, 20 Mar 2023 10:04:17 +0000 [thread overview]
Message-ID: <MN6PR11MB8244F7C7A2BA92E85C0A349E8C809@MN6PR11MB8244.namprd11.prod.outlook.com> (raw)
In-Reply-To: <20230310124849.831839-2-kraxel@redhat.com>
Reviewed-by: Ray Ni <ray.ni@intel.com>
> -----Original Message-----
> From: Gerd Hoffmann <kraxel@redhat.com>
> Sent: Friday, March 10, 2023 8:49 PM
> To: devel@edk2.groups.io
> Cc: Ni, Ray <ray.ni@intel.com>; Oliver Steffen <osteffen@redhat.com>; Gerd
> Hoffmann <kraxel@redhat.com>; Kumar, Rahul R
> <rahul.r.kumar@intel.com>; Pawel Polawski <ppolawsk@redhat.com>;
> Dong, Eric <eric.dong@intel.com>
> Subject: [PATCH 1/2] UefiCpuPkg/PiSmmCpuDxeSmm: drop support for
> obsolete processors
>
> It's highly unlikely the code ever runs on processors which are
> almost 30 years old. Drop the code handling them.
>
> Bugzilla: https://bugzilla.tianocore.org/show_bug.cgi?id=4345
> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
> ---
> UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.c | 20 +++++---------------
> 1 file changed, 5 insertions(+), 15 deletions(-)
>
> diff --git a/UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.c
> b/UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.c
> index d2d0950f3b42..55a9f79da8eb 100644
> --- a/UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.c
> +++ b/UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.c
> @@ -871,24 +871,14 @@ PiCpuSmmEntry (
> //
> DEBUG ((DEBUG_INFO, "PiCpuSmmEntry: gSmmBaseHobGuid not
> found!\n"));
> //
> + // very old processors (i486 + pentium) need 32k not 4k alignment,
> exclude them.
> + //
> + ASSERT (FamilyId >= 6);
> + //
> // Allocate buffer for all of the tiles.
> //
> - // Intel(R) 64 and IA-32 Architectures Software Developer's Manual
> - // Volume 3C, Section 34.11 SMBASE Relocation
> - // For Pentium and Intel486 processors, the SMBASE values must be
> - // aligned on a 32-KByte boundary or the processor will enter shutdown
> - // state during the execution of a RSM instruction.
> - //
> - // Intel486 processors: FamilyId is 4
> - // Pentium processors : FamilyId is 5
> - //
> BufferPages = EFI_SIZE_TO_PAGES (SIZE_32KB + TileSize *
> (mMaxNumberOfCpus - 1));
> - if ((FamilyId == 4) || (FamilyId == 5)) {
> - Buffer = AllocateAlignedCodePages (BufferPages, SIZE_32KB);
> - } else {
> - Buffer = AllocateAlignedCodePages (BufferPages, SIZE_4KB);
> - }
> -
> + Buffer = AllocateAlignedCodePages (BufferPages, SIZE_4KB);
> ASSERT (Buffer != NULL);
> DEBUG ((DEBUG_INFO, "New Allcoated SMRAM SaveState Buffer (0x%08x,
> 0x%08x)\n", Buffer, EFI_PAGES_TO_SIZE (BufferPages)));
> }
> --
> 2.39.2
next prev parent reply other threads:[~2023-03-20 10:04 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-10 12:48 [PATCH 0/2] UefiCpuPkg/PiSmmCpuDxeSmm: drop support for obsolete processors, fix error handling Gerd Hoffmann
2023-03-10 12:48 ` [PATCH 1/2] UefiCpuPkg/PiSmmCpuDxeSmm: drop support for obsolete processors Gerd Hoffmann
2023-03-20 10:04 ` Ni, Ray [this message]
2023-03-10 12:48 ` [PATCH 2/2] UefiCpuPkg/PiSmmCpuDxeSmm: fix error handling Gerd Hoffmann
2023-03-20 10:04 ` Ni, Ray
2023-03-22 1:55 ` Ni, Ray
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=MN6PR11MB8244F7C7A2BA92E85C0A349E8C809@MN6PR11MB8244.namprd11.prod.outlook.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