From: "Kirkendall, Garrett" <garrett.kirkendall@amd.com>
To: devel@edk2.groups.io
Cc: Eric Dong <eric.dong@intel.com>, Ray Ni <ray.ni@intel.com>,
Laszlo Ersek <lersek@redhat.com>
Subject: [PATCH v1 0/2] UefiCpuPkg: AMD procesor MSR_IA32_MISC_ENABLE
Date: Mon, 15 Jun 2020 13:30:27 -0500 [thread overview]
Message-ID: <20200615183029.4577-1-Garrett.Kirkendall@amd.com> (raw)
AMD processor does not support MSR_IA32_MISC_ENABLE register. Accessing
this register on AMD causes an unhandled exception in SmmEntry.nasm and
a subsequent failure to boot since this is too early in SMM path for the
exception handler to be loaded.
First, to distinguish between AMD and other processors, refactor
StandardSignatureIsAuthenticAMD into BaseUefiCpuLib. So there is only
one copy in the source. All changed modules already include UefiCpuLib
either directly or indirectly so could not easly split first patch.
Second, Skip manipulation of MSR_IA32_MISC_ENABLE register if running
on an AMD processor.
Tested on AMD X64 processor.
Modified source patching in 2/2 for FALSE
and TRUE to test failure and passing case when AMD processor detected.
Did not have a way to test UefiCpuPkg/PiSmmCpuDxeSmm/Ia32/SmiEntry.nasm.
Test BIOS used following components:
UefiCpuPkg/Library/BaseXApicX2ApicLib/BaseXApicX2ApicLib.inf
UefiCpuPkg/Library/MpInitLib/MpLib.c
UefiCpuPkg/PiSmmCpuDxeSmm in X64 mode
Garrett Kirkendall (2):
UefiCpuPkg: Move StandardSignatureIsAuthenticAMD to BaseUefiCpuLib
UefiCpuPkg: PiSmmCpuDxeSmm skip MSR_IA32_MISC_ENABLE manipulation on
AMD
UefiCpuPkg/Library/BaseUefiCpuLib/BaseUefiCpuLib.inf | 7 ++++
UefiCpuPkg/Library/BaseXApicLib/BaseXApicLib.inf | 2 ++
UefiCpuPkg/Library/BaseXApicX2ApicLib/BaseXApicX2ApicLib.inf | 2 ++
UefiCpuPkg/Include/Library/UefiCpuLib.h | 14 ++++++++
UefiCpuPkg/PiSmmCpuDxeSmm/SmmProfileInternal.h | 3 ++
UefiCpuPkg/Library/BaseUefiCpuLib/BaseUefiCpuLib.c | 38 ++++++++++++++++++++
UefiCpuPkg/Library/BaseXApicLib/BaseXApicLib.c | 25 ++-----------
UefiCpuPkg/Library/BaseXApicX2ApicLib/BaseXApicX2ApicLib.c | 25 ++-----------
UefiCpuPkg/Library/MpInitLib/MpLib.c | 23 ------------
UefiCpuPkg/PiSmmCpuDxeSmm/SmmProfile.c | 9 ++++-
UefiCpuPkg/PiSmmCpuDxeSmm/Ia32/SmiEntry.nasm | 19 ++++++++--
UefiCpuPkg/PiSmmCpuDxeSmm/X64/SmiEntry.nasm | 20 +++++++++--
12 files changed, 113 insertions(+), 74 deletions(-)
create mode 100644 UefiCpuPkg/Library/BaseUefiCpuLib/BaseUefiCpuLib.c
Changes at:
https://github.com/gkirkendall-amd/edk2/tree/smmentry_nasm_skip_msr_xd_bit_on_amd
Cc: Eric Dong <eric.dong@intel.com>
Cc: Ray Ni <ray.ni@intel.com>
Cc: Laszlo Ersek <lersek@redhat.com>
Signed-off-by: Garrett Kirkendall <garrett.kirkendall@amd.com>
--
2.27.0
next reply other threads:[~2020-06-15 18:30 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-15 18:30 Kirkendall, Garrett [this message]
2020-06-15 18:30 ` [PATCH v1 1/2] UefiCpuPkg: Move StandardSignatureIsAuthenticAMD to BaseUefiCpuLib Kirkendall, Garrett
2020-06-16 15:29 ` Laszlo Ersek
2020-06-17 0:30 ` [edk2-devel] " Dong, Eric
2020-06-15 18:30 ` [PATCH v1 2/2] UefiCpuPkg: PiSmmCpuDxeSmm skip MSR_IA32_MISC_ENABLE manipulation on AMD Kirkendall, Garrett
2020-06-16 16:28 ` Laszlo Ersek
2020-06-16 17:01 ` [PATCH v1 0/2] UefiCpuPkg: AMD procesor MSR_IA32_MISC_ENABLE Laszlo Ersek
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=20200615183029.4577-1-Garrett.Kirkendall@amd.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