>   UefiCpuPkg: Adds MmSaveStateLib library class
You can take "Reviewed-by: Ray Ni <ray...@intel.com>" for this patch.

> UefiCpuPkg/SmmCpuFeaturesLib: Restructure arch-dependent code
You can take "Reviewed-by: Ray Ni <ray...@intel.com>" for this patch.

> UefiCpuPkg: Implements SmmCpuFeaturesLib for AMD Family
One comment: can you please change the BASE_NAME in lib INF to 
"AmdSmmCpuFeaturesLib"?
The BASE_NAME guides tool to generate the .Lib file in the disk.
Choosing different BASE_NAME for Intel and AMD lib instance can avoid one LIB 
file is replaced by the other during pkg build.

> UefiCpuPkg: Implements MmSaveStateLib for Intel
1. MmSaveStateLib local functions should not have "EFIAPI". Please only add 
"EFIAPI" for lib APIs.
2. MmSaveStateGetRegisterLma() doesn't need to carry "CpuIndex" as parameter. 
Can you please remove the parameter?
3. MmSaveStateGetRegisterIndex () returns wrong value for Intel processors 
because it uses Offset ( = 2) but Intel implementation uses Offset ( = 4).

(I remember comments #1, #3 were both raised last time when I reviewed the 
patch.)

> UefiCpuPkg: Removes SmmCpuFeaturesReadSaveStateRegister
You can take "Reviewed-by: Ray Ni <ray...@intel.com>" for this patch.


One more comment:
Can you please avoid FILE_GUID overridden in UefiCpuPkg.dsc for Intel instance 
of SmmCpu driver?
AMD instance can override the FILE_GUID for sure.

@Wu, Jiaxin, we will need to change the close-source SmmCpuFeatureLib 
accordingly (separating the SaveState access code into a different lib) when 
this patch series are merged.

> -----Original Message-----
> From: Abdul Lateef Attar <abdat...@amd.com>
> Sent: Saturday, May 6, 2023 12:07 PM
> To: devel@edk2.groups.io
> Cc: Abdul Lateef Attar <abdat...@amd.com>; Paul Grimes
> <paul.gri...@amd.com>; Abner Chang <abner.ch...@amd.com>; Dong, Eric
> <eric.d...@intel.com>; Ni, Ray <ray...@intel.com>; Kumar, Rahul R
> <rahul.r.ku...@intel.com>; Gerd Hoffmann <kra...@redhat.com>; Kinney,
> Michael D <michael.d.kin...@intel.com>; Gao, Liming
> <gaolim...@byosoft.com.cn>; Liu, Zhiguang <zhiguang....@intel.com>; Ard
> Biesheuvel <ardb+tianoc...@kernel.org>; Yao, Jiewen <jiewen....@intel.com>;
> Justen, Jordan L <jordan.l.jus...@intel.com>
> Subject: [PATCH v11 0/8] Adds AmdSmmCpuFeaturesLib and MmSaveStateLib
> 
> PR: https://github.com/tianocore/edk2/pull/4341
> 
> V11: Delta changes
> Drop the OVMF implementation of MmSaveStateLib
> V10: Delta changes:
>   Addressed review comments from Abner.
> V9: Delta changes:
>   Addressed review comments.
>   Rename to MmSaveStateLib.
>   Also rename SMM_ defines to MM_.
>   Implemented OVMF MmSaveStateLib.
>   Removes SmmCpuFeaturesReadSaveStateRegister and
> SmmCpuFeaturesWriteSaveStateRegister
>   function interface.
> V8 delta changes:
>    Addressed review comments from Abner,
>    Fix the whitespace error.
>    Seperate the Ovmf changes to another patch
> V7 delta changes:
>    Adds SmmSmramSaveStateLib for Intel processor.
>    Integrate SmmSmramSaveStateLib library.
> V6 delta changes:
>    Addressed review comments for Ray NI.
>    removed unnecessary EFIAPI.
> V5 delta changes:
>    rebase to master branch.
>    updated Reviewed-by
> V4 delta changes:
>   rebase to master branch.
>   added reviewed-by.
> V3 delta changes:
>   Addressed review comments from Abner chang.
>   Re-arranged patch order.
> 
> Cc: Paul Grimes <paul.gri...@amd.com>
> Cc: Abner Chang <abner.ch...@amd.com>
> Cc: Eric Dong <eric.d...@intel.com>
> Cc: Ray Ni <ray...@intel.com>
> Cc: Rahul Kumar <rahul1.ku...@intel.com>
> Cc: Gerd Hoffmann <kra...@redhat.com>
> Cc: Michael D Kinney <michael.d.kin...@intel.com>
> Cc: Liming Gao <gaolim...@byosoft.com.cn>
> Cc: Zhiguang Liu <zhiguang....@intel.com>
> Cc: Ard Biesheuvel <ardb+tianoc...@kernel.org>
> Cc: Jiewen Yao <jiewen....@intel.com>
> Cc: Jordan Justen <jordan.l.jus...@intel.com>
> Cc: Abdul Lateef Attar <abdat...@amd.com>
> 
> Abdul Lateef Attar (8):
>   MdePkg: Adds AMD SMRAM save state map
>   UefiCpuPkg: Adds MmSaveStateLib library class
>   UefiCpuPkg: Implements MmSaveStateLib library instance
>   UefiCpuPkg/SmmCpuFeaturesLib: Restructure arch-dependent code
>   UefiCpuPkg: Implements SmmCpuFeaturesLib for AMD Family
>   UefiCpuPkg: Implements MmSaveStateLib for Intel
>   UefiCpuPkg: Removes SmmCpuFeaturesReadSaveStateRegister
>   OvmfPkg: Uses MmSaveStateLib library
> 
>  UefiCpuPkg/UefiCpuPkg.dec                     |   4 +
>  OvmfPkg/OvmfPkgIa32.dsc                       |   1 +
>  OvmfPkg/OvmfPkgIa32X64.dsc                    |   3 +
>  OvmfPkg/OvmfPkgX64.dsc                        |   1 +
>  UefiCpuPkg/UefiCpuPkg.dsc                     |  14 +
>  .../MmSaveStateLib/AmdMmSaveStateLib.inf      |  28 +
>  .../MmSaveStateLib/IntelMmSaveStateLib.inf    |  28 +
>  .../AmdSmmCpuFeaturesLib.inf                  |  38 +
>  UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.inf  |   2 +
>  .../Include/Register/Amd/SmramSaveStateMap.h  | 194 +++++
>  UefiCpuPkg/Include/Library/MmSaveStateLib.h   |  70 ++
>  .../Include/Library/SmmCpuFeaturesLib.h       |  52 --
>  .../Library/MmSaveStateLib/MmSaveState.h      | 102 +++
>  UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.h    |  56 +-
>  .../SmmCpuFeaturesLib/SmmCpuFeaturesLib.c     | 767 ------------------
>  .../Library/MmSaveStateLib/AmdMmSaveState.c   | 309 +++++++
>  .../Library/MmSaveStateLib/IntelMmSaveState.c | 413 ++++++++++
>  .../MmSaveStateLib/MmSaveStateCommon.c        | 138 ++++
>  .../SmmCpuFeaturesLib/AmdSmmCpuFeaturesLib.c  | 387 +++++++++
>  .../IntelSmmCpuFeaturesLib.c                  |  70 ++
>  .../SmmCpuFeaturesLibCommon.c                 | 128 ---
>  UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.c    |  11 +-
>  UefiCpuPkg/PiSmmCpuDxeSmm/SmramSaveState.c    | 500 +-----------
>  MdePkg/MdePkg.ci.yaml                         |   4 +-
>  24 files changed, 1812 insertions(+), 1508 deletions(-)
>  create mode 100644
> UefiCpuPkg/Library/MmSaveStateLib/AmdMmSaveStateLib.inf
>  create mode 100644
> UefiCpuPkg/Library/MmSaveStateLib/IntelMmSaveStateLib.inf
>  create mode 100644
> UefiCpuPkg/Library/SmmCpuFeaturesLib/AmdSmmCpuFeaturesLib.inf
>  create mode 100644 MdePkg/Include/Register/Amd/SmramSaveStateMap.h
>  create mode 100644 UefiCpuPkg/Include/Library/MmSaveStateLib.h
>  create mode 100644 UefiCpuPkg/Library/MmSaveStateLib/MmSaveState.h
>  create mode 100644 UefiCpuPkg/Library/MmSaveStateLib/AmdMmSaveState.c
>  create mode 100644 UefiCpuPkg/Library/MmSaveStateLib/IntelMmSaveState.c
>  create mode 100644
> UefiCpuPkg/Library/MmSaveStateLib/MmSaveStateCommon.c
>  create mode 100644
> UefiCpuPkg/Library/SmmCpuFeaturesLib/AmdSmmCpuFeaturesLib.c
> 
> --
> 2.25.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#104669): https://edk2.groups.io/g/devel/message/104669
Mute This Topic: https://groups.io/mt/98720163/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: 
https://edk2.groups.io/g/devel/leave/9847357/21656/1706620634/xyzzy 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


Reply via email to