public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Tian, Feng" <feng.tian@intel.com>
To: "Fan, Jeff" <jeff.fan@intel.com>,
	"edk2-devel@lists.01.org" <edk2-devel@lists.01.org>
Cc: "Kinney, Michael D" <michael.d.kinney@intel.com>,
	"Tian, Feng" <feng.tian@intel.com>
Subject: Re: [PATCH v5 00/11] Add CPU features driver
Date: Tue, 21 Mar 2017 08:07:26 +0000	[thread overview]
Message-ID: <7F1BAD85ADEA444D97065A60D2E97EE5699BC28E@SHSMSX101.ccr.corp.intel.com> (raw)
In-Reply-To: <20170320081939.6196-1-jeff.fan@intel.com>

Series Reviewed-by: Feng Tian <feng.tian@intel.com>

Thanks
Feng

-----Original Message-----
From: Fan, Jeff 
Sent: Monday, March 20, 2017 4:20 PM
To: edk2-devel@lists.01.org
Cc: Tian, Feng <feng.tian@intel.com>; Kinney, Michael D <michael.d.kinney@intel.com>
Subject: [PATCH v5 00/11] Add CPU features driver

This serial of patches will add CPU featuers initialization on boot time.

1) One new Register CPU Features Library and instances are added to provide the
   capability to register CPU feature's detect/initialize services.
2) One new NULL class CPU Commong Features Library instance is added to provide
   detect/initialize servcies of CPU features defined in SDM.
3) New CPU features PEI/DXE drivers are added to initialize CPU features in PEI
   phase or DXE phase, by consuming Register CPU Features Library.

https://bugzilla.tianocore.org/show_bug.cgi?id=421

The whole updated UefiCpuPkg v5 could be accessed at https://github.com/JeffFan/edk2/tree/CpuFeaturesV5/UefiCpuPkg for review.

v2:
  #9: Format debug messages.
  #10:
    1. Using MSR_IA32_EFER to enable/disable NX feature instead of using
       MSR_IA32_MISC_ENABLE.
    2. Fix bug that SMX and VMX feature is swapped.

v3:
  #9:  Trim white space at end of line.
  #10: Add AesniGetConfigData() to get current register state.

v4:
  #3, #8, #9: Fix GCC complied issue.

v5:
  #3:  Set DestinationRegisterTableList[Index].RegisterTableEntry before
       RegisterTableEntry is updated.
  #10: Move MSR reading from AesniGetConfigData() to AesniSupport().

Cc: Feng Tian <feng.tian@intel.com>
Cc: Michael Kinney <michael.d.kinney@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jeff Fan <jeff.fan@intel.com>

Jeff Fan (11):
  UefiCpuPkg/AcpiCpuData: Update RegisterTableEntry type
  UefiCpuPkg/CpuS3DataDxe: Consume the existing PcdCpuS3DataAddress
  UefiCpuPkg/PiSmmCpuDxeSmm: Skip if AllocatedSize is 0
  UefiCpuPkg/Msr: Add CPUID signature check MACROs
  UefiCpuPkg/UefiCpuPkg.dec: Add a set of CPU features PCDs
  UefiCpuPkg: Add GUID gEdkiiCpuFeaturesSetDoneGuid
  UefiCpuPkg: Add GUID gEdkiiCpuFeaturesInitDoneGuid
  UefiCpuPkg/Include/Library: Add Register CPU Features Library
  UefiCpuPkg: Add PEI/DXE Register CPU Features Library instances
  UefiCpuPkg: Add NULL CPU Common Features Library instance
  UefiCpuPkg: Add CPU Features PEI/DXE drivers

 UefiCpuPkg/CpuFeatures/CpuFeaturesDxe.c            | 122 +++
 UefiCpuPkg/CpuFeatures/CpuFeaturesDxe.inf          |  53 ++
 UefiCpuPkg/CpuFeatures/CpuFeaturesDxe.uni          |  22 +
 UefiCpuPkg/CpuFeatures/CpuFeaturesDxeExtra.uni     |  20 +
 UefiCpuPkg/CpuFeatures/CpuFeaturesPei.c            |  75 ++
 UefiCpuPkg/CpuFeatures/CpuFeaturesPei.inf          |  49 ++
 UefiCpuPkg/CpuFeatures/CpuFeaturesPei.uni          |  22 +
 UefiCpuPkg/CpuFeatures/CpuFeaturesPeiExtra.uni     |  20 +
 UefiCpuPkg/CpuS3DataDxe/CpuS3Data.c                |  56 +-
 UefiCpuPkg/Include/AcpiCpuData.h                   |   6 +-
 UefiCpuPkg/Include/Guid/CpuFeaturesInitDone.h      |  26 +
 UefiCpuPkg/Include/Guid/CpuFeaturesSetDone.h       |  26 +
 .../Include/Library/RegisterCpuFeaturesLib.h       | 516 ++++++++++++
 UefiCpuPkg/Include/Register/Msr/AtomMsr.h          |  22 +-
 UefiCpuPkg/Include/Register/Msr/BroadwellMsr.h     |  21 +-
 UefiCpuPkg/Include/Register/Msr/Core2Msr.h         |  19 +-
 UefiCpuPkg/Include/Register/Msr/CoreMsr.h          |  18 +-
 UefiCpuPkg/Include/Register/Msr/GoldmontMsr.h      |  18 +-
 UefiCpuPkg/Include/Register/Msr/HaswellEMsr.h      |  18 +-
 UefiCpuPkg/Include/Register/Msr/HaswellMsr.h       |  20 +-
 UefiCpuPkg/Include/Register/Msr/IvyBridgeMsr.h     |  18 +-
 UefiCpuPkg/Include/Register/Msr/NehalemMsr.h       |  21 +-
 UefiCpuPkg/Include/Register/Msr/P6Msr.h            |  23 +-
 UefiCpuPkg/Include/Register/Msr/Pentium4Msr.h      |  15 +-
 UefiCpuPkg/Include/Register/Msr/PentiumMMsr.h      |  18 +-
 UefiCpuPkg/Include/Register/Msr/PentiumMsr.h       |  20 +-
 UefiCpuPkg/Include/Register/Msr/SandyBridgeMsr.h   |  19 +-
 UefiCpuPkg/Include/Register/Msr/SilvermontMsr.h    |  22 +-
 UefiCpuPkg/Include/Register/Msr/SkylakeMsr.h       |  19 +-
 UefiCpuPkg/Include/Register/Msr/Xeon5600Msr.h      |  19 +-
 UefiCpuPkg/Include/Register/Msr/XeonDMsr.h         |  19 +-
 UefiCpuPkg/Include/Register/Msr/XeonE7Msr.h        |  18 +-
 UefiCpuPkg/Include/Register/Msr/XeonPhiMsr.h       |  18 +-
 UefiCpuPkg/Library/CpuCommonFeaturesLib/Aesni.c    | 127 +++
 UefiCpuPkg/Library/CpuCommonFeaturesLib/C1e.c      |  79 ++
 .../Library/CpuCommonFeaturesLib/ClockModulation.c | 106 +++
 .../CpuCommonFeaturesLib/CpuCommonFeatures.h       | 867 +++++++++++++++++++++
 .../CpuCommonFeaturesLib/CpuCommonFeaturesLib.c    | 227 ++++++
 .../CpuCommonFeaturesLib/CpuCommonFeaturesLib.inf  |  68 ++  .../CpuCommonFeaturesLib/CpuCommonFeaturesLib.uni  |  25 +
 UefiCpuPkg/Library/CpuCommonFeaturesLib/Eist.c     |  81 ++
 .../Library/CpuCommonFeaturesLib/ExecuteDisable.c  |  91 +++
 .../Library/CpuCommonFeaturesLib/FastStrings.c     |  52 ++
 .../Library/CpuCommonFeaturesLib/FeatureControl.c  | 314 ++++++++
 .../CpuCommonFeaturesLib/LimitCpuIdMaxval.c        |  82 ++
 .../Library/CpuCommonFeaturesLib/MachineCheck.c    | 231 ++++++
 .../Library/CpuCommonFeaturesLib/MonitorMwait.c    |  79 ++
 .../Library/CpuCommonFeaturesLib/PendingBreak.c    |  90 +++
 UefiCpuPkg/Library/CpuCommonFeaturesLib/X2Apic.c   |  81 ++
 .../RegisterCpuFeaturesLib/CpuFeaturesInitialize.c | 745 ++++++++++++++++++
 .../DxeRegisterCpuFeaturesLib.c                    | 266 +++++++
 .../DxeRegisterCpuFeaturesLib.inf                  |  62 ++
 .../PeiRegisterCpuFeaturesLib.c                    | 390 +++++++++
 .../PeiRegisterCpuFeaturesLib.inf                  |  64 ++
 .../RegisterCpuFeaturesLib/RegisterCpuFeatures.h   | 193 +++++
 .../RegisterCpuFeaturesDxe.uni                     |  22 +
 .../RegisterCpuFeaturesLib.c                       | 770 ++++++++++++++++++
 UefiCpuPkg/PiSmmCpuDxeSmm/CpuS3.c                  |  32 +-
 UefiCpuPkg/UefiCpuPkg.dec                          |  50 +-
 UefiCpuPkg/UefiCpuPkg.dsc                          |  14 +-
 60 files changed, 6545 insertions(+), 61 deletions(-)  create mode 100644 UefiCpuPkg/CpuFeatures/CpuFeaturesDxe.c
 create mode 100644 UefiCpuPkg/CpuFeatures/CpuFeaturesDxe.inf
 create mode 100644 UefiCpuPkg/CpuFeatures/CpuFeaturesDxe.uni
 create mode 100644 UefiCpuPkg/CpuFeatures/CpuFeaturesDxeExtra.uni
 create mode 100644 UefiCpuPkg/CpuFeatures/CpuFeaturesPei.c
 create mode 100644 UefiCpuPkg/CpuFeatures/CpuFeaturesPei.inf
 create mode 100644 UefiCpuPkg/CpuFeatures/CpuFeaturesPei.uni
 create mode 100644 UefiCpuPkg/CpuFeatures/CpuFeaturesPeiExtra.uni
 create mode 100644 UefiCpuPkg/Include/Guid/CpuFeaturesInitDone.h
 create mode 100644 UefiCpuPkg/Include/Guid/CpuFeaturesSetDone.h
 create mode 100644 UefiCpuPkg/Include/Library/RegisterCpuFeaturesLib.h
 create mode 100644 UefiCpuPkg/Library/CpuCommonFeaturesLib/Aesni.c
 create mode 100644 UefiCpuPkg/Library/CpuCommonFeaturesLib/C1e.c
 create mode 100644 UefiCpuPkg/Library/CpuCommonFeaturesLib/ClockModulation.c
 create mode 100644 UefiCpuPkg/Library/CpuCommonFeaturesLib/CpuCommonFeatures.h
 create mode 100644 UefiCpuPkg/Library/CpuCommonFeaturesLib/CpuCommonFeaturesLib.c
 create mode 100644 UefiCpuPkg/Library/CpuCommonFeaturesLib/CpuCommonFeaturesLib.inf
 create mode 100644 UefiCpuPkg/Library/CpuCommonFeaturesLib/CpuCommonFeaturesLib.uni
 create mode 100644 UefiCpuPkg/Library/CpuCommonFeaturesLib/Eist.c
 create mode 100644 UefiCpuPkg/Library/CpuCommonFeaturesLib/ExecuteDisable.c
 create mode 100644 UefiCpuPkg/Library/CpuCommonFeaturesLib/FastStrings.c
 create mode 100644 UefiCpuPkg/Library/CpuCommonFeaturesLib/FeatureControl.c
 create mode 100644 UefiCpuPkg/Library/CpuCommonFeaturesLib/LimitCpuIdMaxval.c
 create mode 100644 UefiCpuPkg/Library/CpuCommonFeaturesLib/MachineCheck.c
 create mode 100644 UefiCpuPkg/Library/CpuCommonFeaturesLib/MonitorMwait.c
 create mode 100644 UefiCpuPkg/Library/CpuCommonFeaturesLib/PendingBreak.c
 create mode 100644 UefiCpuPkg/Library/CpuCommonFeaturesLib/X2Apic.c
 create mode 100644 UefiCpuPkg/Library/RegisterCpuFeaturesLib/CpuFeaturesInitialize.c
 create mode 100644 UefiCpuPkg/Library/RegisterCpuFeaturesLib/DxeRegisterCpuFeaturesLib.c
 create mode 100644 UefiCpuPkg/Library/RegisterCpuFeaturesLib/DxeRegisterCpuFeaturesLib.inf
 create mode 100644 UefiCpuPkg/Library/RegisterCpuFeaturesLib/PeiRegisterCpuFeaturesLib.c
 create mode 100644 UefiCpuPkg/Library/RegisterCpuFeaturesLib/PeiRegisterCpuFeaturesLib.inf
 create mode 100644 UefiCpuPkg/Library/RegisterCpuFeaturesLib/RegisterCpuFeatures.h
 create mode 100644 UefiCpuPkg/Library/RegisterCpuFeaturesLib/RegisterCpuFeaturesDxe.uni
 create mode 100644 UefiCpuPkg/Library/RegisterCpuFeaturesLib/RegisterCpuFeaturesLib.c

--
2.9.3.windows.2



      parent reply	other threads:[~2017-03-21  8:07 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-20  8:19 [PATCH v5 00/11] Add CPU features driver Jeff Fan
2017-03-20  8:19 ` [PATCH v5 03/11] UefiCpuPkg/PiSmmCpuDxeSmm: Skip if AllocatedSize is 0 Jeff Fan
2017-03-20  8:19 ` [PATCH v5 10/11] UefiCpuPkg: Add NULL CPU Common Features Library instance Jeff Fan
2017-03-20  8:26 ` Do edk2 have plan to implement EFI_REST_PROTOCOL ? wang xiaofeng
2017-03-21  8:07 ` Tian, Feng [this message]

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=7F1BAD85ADEA444D97065A60D2E97EE5699BC28E@SHSMSX101.ccr.corp.intel.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