public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [edk2-devel] [PATCH] UefiCpuPkg/MmSaveStateLib: Remove checking Smm Rev ID in AMD MmSaveStateLib
@ 2023-10-30  6:12 Jacque Lin via groups.io
  2023-10-30  6:29 ` Chang, Abner via groups.io
  2023-10-30 14:03 ` Laszlo Ersek
  0 siblings, 2 replies; 5+ messages in thread
From: Jacque Lin via groups.io @ 2023-10-30  6:12 UTC (permalink / raw)
  To: devel; +Cc: Jacque Lin, Abdul Lateef Attar, Abner Chang

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 (#110289): https://edk2.groups.io/g/devel/message/110289
Mute This Topic: https://groups.io/mt/102269908/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-



^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2023-10-31 15:40 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-10-30  6:12 [edk2-devel] [PATCH] UefiCpuPkg/MmSaveStateLib: Remove checking Smm Rev ID in AMD MmSaveStateLib Jacque Lin via groups.io
2023-10-30  6:29 ` Chang, Abner via groups.io
2023-10-30 14:03 ` Laszlo Ersek
2023-10-31 10:43   ` Attar, AbdulLateef (Abdul Lateef) via groups.io
2023-10-31 15:40     ` Laszlo Ersek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox