From: "Jacque Lin via groups.io" <hsienchieh.lin=amd.com@groups.io>
To: <devel@edk2.groups.io>
Cc: Jacque Lin <hsienchieh.lin@amd.com>,
Abdul Lateef Attar <AbdulLateef.Attar@amd.com>,
Abner Chang <abner.chang@amd.com>
Subject: [edk2-devel] [PATCH v2] UefiCpuPkg/MmSaveStateLib: Remove checking Smm Rev ID in AMD MmSaveStateLib
Date: Tue, 31 Oct 2023 13:37:11 +0800 [thread overview]
Message-ID: <20231031053711.1416-1-hsienchieh.lin@amd.com> (raw)
Remove checking SMM Rev ID in AMD Save State lib when reading Save
State Register EFI_MM_SAVE_STATE_REGISTER_IO.
For AMD, it is not necessary to check SmmRevId when reading Save State
Register EFI_MM_SAVE_STATE_REGISTER_IO.
Cc: Abdul Lateef Attar <AbdulLateef.Attar@amd.com>
Cc: Abner Chang <abner.chang@amd.com>
Signed-off-by: Jacque Lin <hsienchieh.lin@amd.com>
---
UefiCpuPkg/Library/MmSaveStateLib/AmdMmSaveState.c | 13 -------------
1 file changed, 13 deletions(-)
diff --git a/UefiCpuPkg/Library/MmSaveStateLib/AmdMmSaveState.c b/UefiCpuPkg/Library/MmSaveStateLib/AmdMmSaveState.c
index 3315a6cc44..c4bf6ad4bb 100644
--- a/UefiCpuPkg/Library/MmSaveStateLib/AmdMmSaveState.c
+++ b/UefiCpuPkg/Library/MmSaveStateLib/AmdMmSaveState.c
@@ -102,7 +102,6 @@ MmSaveStateReadRegister (
OUT VOID *Buffer
)
{
- UINT32 SmmRevId;
EFI_MM_SAVE_STATE_IO_INFO *IoInfo;
AMD_SMRAM_SAVE_STATE_MAP *CpuSaveState;
UINT8 DataWidth;
@@ -124,18 +123,6 @@ MmSaveStateReadRegister (
// Check for special EFI_MM_SAVE_STATE_REGISTER_IO
if (Register == EFI_MM_SAVE_STATE_REGISTER_IO) {
- //
- // Get SMM Revision ID
- //
- MmSaveStateReadRegisterByIndex (CpuIndex, AMD_MM_SAVE_STATE_REGISTER_SMMREVID_INDEX, sizeof (SmmRevId), &SmmRevId);
-
- //
- // See if the CPU supports the IOMisc register in the save state
- //
- if (SmmRevId < AMD_SMM_MIN_REV_ID_X64) {
- return EFI_NOT_FOUND;
- }
-
// Check if IO Restart Dword [IO Trap] is valid or not using bit 1.
if (!(CpuSaveState->x64.IO_DWord & 0x02u)) {
return EFI_NOT_FOUND;
--
2.36.1.windows.1
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#110365): https://edk2.groups.io/g/devel/message/110365
Mute This Topic: https://groups.io/mt/102292190/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-
next reply other threads:[~2023-10-31 5:37 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-31 5:37 Jacque Lin via groups.io [this message]
2023-10-31 9:15 ` [edk2-devel] [PATCH v2] UefiCpuPkg/MmSaveStateLib: Remove checking Smm Rev ID in AMD MmSaveStateLib Attar, AbdulLateef (Abdul Lateef) via groups.io
2023-10-31 11:44 ` Laszlo Ersek
2023-10-31 11:51 ` Paolo Bonzini
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=20231031053711.1416-1-hsienchieh.lin@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