public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [edk2-staging/SmmCpuFeaturesLib_AMD][PATCH 0/4] Reconstruction on SmmCpuFeaturesLib
@ 2022-09-13  8:47 Chang, Abner
  0 siblings, 0 replies; only message in thread
From: Chang, Abner @ 2022-09-13  8:47 UTC (permalink / raw)
  To: devel
  Cc: jiangang.he, Abdul Lateef Attar, Garrett Kirkendall, Paul Grimes,
	Eric Dong, Ray Ni, Rahul Kumar

From: Abner Chang <abner.chang@amd.com>

This is the reconstruction on SmmCpuFeaturesLib to accommodate AMD
implementation of SmmCpuFeaturesLib. A new folder \X86 under
SmmCpuFeaturesLib is created for X86 architecture, this gives
SmmCpuFeaturesLib a well folder structure for not only X86 but also
for other processor architectures.

There are two cases that can trigger the reconstruction on the
modules (not only SmmCpuFeaturesLib) under UefiCpuPkg,
1. Create the X86 folder to accommodate both Intel and AMD
   implementation, with this AMD implementation can leverage the
   modules design and source files.
2. Create the X86 folder for X86 architecture when the new processor
   architecture is added to the module and leverage the module design
   and source files. For example, the upcoming RISC-V and loongson
   processor architecture.

This patch set is also part of below BZ 3860:
https://bugzilla.tianocore.org/show_bug.cgi?id=3860

This reconstruction keeps all INF files as where those are,
which prevents the impacts on the existing platform DSC
that has the reference to SmmCpuFeaturesLib INF file.

This patch set is the preparation for AMD SmmCpuFeaturesLib
upstream. In the follow up pacthes, AMD will create a new INF file
SmmCpuFeaturesLibAmd.inf under \SmmCpuFeaturesLib and pull in the source
files that located under SmmCpuFeaturesLib\X86.

This reconstruction would be the sample for the follow up reconstruction
on UefiCpuPkg modules, if there is no objection from the UefiCpuPkg
maintainer and edk2 community.

Signed-off-by: Abner Chang <abner.chang@amd.com>
Cc: Abdul Lateef Attar <abdattar@amd.com>
Cc: Garrett Kirkendall <garrett.kirkendall@amd.com>
Cc: Paul Grimes <paul.grimes@amd.com>
Cc: Eric Dong <eric.dong@intel.com>
Cc: Ray Ni <ray.ni@intel.com>
Cc: Rahul Kumar <rahul1.kumar@intel.com>

Abner Chang (4):
  Add X86 folder
  Abstract arch dependent code
  Relocate STM files
  Clean up header file inclusion

 .../SmmCpuFeaturesLib/SmmCpuFeaturesLib.inf   |   6 +-
 .../SmmCpuFeaturesLibStm.inf                  |  20 +-
 .../StandaloneMmCpuFeaturesLib.inf            |   4 +
 .../SmmCpuFeaturesLib/CpuFeaturesLib.h        |   7 +
 .../SmmCpuFeaturesLib/{ => X86}/SmmStm.h      |   0
 .../SmmCpuFeaturesLibCommon.c                 | 392 +----------------
 .../{ => X86}/Ia32/SmmStmSupport.c            |   0
 .../X86/SmmCpuFeaturesLibIntel.c              | 404 ++++++++++++++++++
 .../SmmCpuFeaturesLib/{ => X86}/SmmStm.c      |   3 -
 .../{ => X86}/X64/SmmStmSupport.c             |   0
 .../{ => X86}/Ia32/SmiEntry.nasm              |   0
 .../{ => X86}/Ia32/SmiException.nasm          |   0
 .../{ => X86}/X64/SmiEntry.nasm               |   0
 .../{ => X86}/X64/SmiException.nasm           |   0
 14 files changed, 434 insertions(+), 402 deletions(-)
 rename UefiCpuPkg/Library/SmmCpuFeaturesLib/{ => X86}/SmmStm.h (100%)
 rename UefiCpuPkg/Library/SmmCpuFeaturesLib/{ => X86}/Ia32/SmmStmSupport.c (100%)
 create mode 100644 UefiCpuPkg/Library/SmmCpuFeaturesLib/X86/SmmCpuFeaturesLibIntel.c
 rename UefiCpuPkg/Library/SmmCpuFeaturesLib/{ => X86}/SmmStm.c (96%)
 rename UefiCpuPkg/Library/SmmCpuFeaturesLib/{ => X86}/X64/SmmStmSupport.c (100%)
 rename UefiCpuPkg/Library/SmmCpuFeaturesLib/{ => X86}/Ia32/SmiEntry.nasm (100%)
 rename UefiCpuPkg/Library/SmmCpuFeaturesLib/{ => X86}/Ia32/SmiException.nasm (100%)
 rename UefiCpuPkg/Library/SmmCpuFeaturesLib/{ => X86}/X64/SmiEntry.nasm (100%)
 rename UefiCpuPkg/Library/SmmCpuFeaturesLib/{ => X86}/X64/SmiException.nasm (100%)

-- 
2.37.1.windows.1


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-09-13  8:49 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-09-13  8:47 [edk2-staging/SmmCpuFeaturesLib_AMD][PATCH 0/4] Reconstruction on SmmCpuFeaturesLib Chang, Abner

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