Branch: refs/heads/master
  Home:   https://github.com/tianocore/edk2
  Commit: 24f57f96487da290a9725b0200e0fd520898b655
      
https://github.com/tianocore/edk2/commit/24f57f96487da290a9725b0200e0fd520898b655
  Author: Ray Ni <ray...@intel.com>
  Date:   2023-04-01 (Sat, 01 Apr 2023)

  Changed paths:
    M MdePkg/Include/Register/Intel/ArchitecturalMsr.h
    M MdePkg/Include/Register/Intel/Cpuid.h

  Log Message:
  -----------
  MdePkg: Add TME-MK related CPUID and MSR definitions

TME (Total Memory Encryption) is the capability to encrypt
the entirety of physical memory of a system.
TME-MK (Total Memory Encryption-Multi-Key) builds on TME and adds
support for multiple encryption keys.

The patch adds some necessary CPUID/MSR definitions for TME-MK.

Signed-off-by: Ray Ni <ray...@intel.com>
Cc: Liming Gao <gaolim...@byosoft.com.cn>
Cc: Zhiguang Liu <zhiguang....@intel.com>
Acked-by: Gerd Hoffmann <kra...@redhat.com>
Reviewed-by: Michael D Kinney <michael.d.kin...@intel.com>


  Commit: bb5c115fa61b727002f0aa2170c0881a6424b4e0
      
https://github.com/tianocore/edk2/commit/bb5c115fa61b727002f0aa2170c0881a6424b4e0
  Author: Ray Ni <ray...@intel.com>
  Date:   2023-04-01 (Sat, 01 Apr 2023)

  Changed paths:
    M UefiCpuPkg/Library/MtrrLib/UnitTest/Support.c

  Log Message:
  -----------
  UefiCpuPkg/MtrrTest: Only claim CPUID max leaf as 1

MtrrLib code queries the CPUID leaf 7h result if support.
Update Test code temporary to claim the CPUID only
supports max leaf as 1 so MtrrLib skips to query CPUID leaf 7h.

Signed-off-by: Ray Ni <ray...@intel.com>
Cc: Eric Dong <eric.d...@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: Ahmad Anadani <ahmad.anad...@intel.com>
Acked-by: Gerd Hoffmann <kra...@redhat.com>
Reviewed-by: Michael D Kinney <michael.d.kin...@intel.com>


  Commit: 263782f66781f97be1f88e0097c5a2af6fbb4209
      
https://github.com/tianocore/edk2/commit/263782f66781f97be1f88e0097c5a2af6fbb4209
  Author: Ray Ni <ray...@intel.com>
  Date:   2023-04-01 (Sat, 01 Apr 2023)

  Changed paths:
    M UefiCpuPkg/Library/MtrrLib/MtrrLib.c

  Log Message:
  -----------
  UefiCpuPkg/MtrrLib: Substract TME-MK KEY_ID_BITS from CPU max PA

CPUID enumeration of MAX_PA is unaffected by TME-MK activation and
will continue to report the maximum physical address bits available
for software to use, irrespective of the number of KeyID bits.

So, we need to check if TME is enabled and adjust the PA size
accordingly.

Signed-off-by: Ray Ni <ray...@intel.com>
Cc: Eric Dong <eric.d...@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: Ahmad Anadani <ahmad.anad...@intel.com>
Acked-by: Gerd Hoffmann <kra...@redhat.com>
Reviewed-by: Michael D Kinney <michael.d.kin...@intel.com>


  Commit: f2f526e0741c8a8957c6a24ba848da92c5d2222c
      
https://github.com/tianocore/edk2/commit/f2f526e0741c8a8957c6a24ba848da92c5d2222c
  Author: Ray Ni <ray...@intel.com>
  Date:   2023-04-01 (Sat, 01 Apr 2023)

  Changed paths:
    M UefiCpuPkg/CpuDxe/CpuDxe.c
    M UefiCpuPkg/CpuDxe/CpuDxe.h

  Log Message:
  -----------
  UefiCpuPkg/CpuDxe: Refactor to use CPUID definitions

The patch does not change any code behavior but only refactors by:
* replaces the hardcode 0x80000000 with CPUID_EXTENDED_FUNCTION
* replaces the hardcode 0x80000008 with CPUID_VIR_PHY_ADDRESS_SIZE
* replace "UINT32 Eax" with
   "CPUID_VIR_PHY_ADDRESS_SIZE_EAX  VirPhyAddressSize"

Signed-off-by: Ray Ni <ray...@intel.com>
Cc: Eric Dong <eric.d...@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: Ahmad Anadani <ahmad.anad...@intel.com>
Acked-by: Gerd Hoffmann <kra...@redhat.com>
Reviewed-by: Michael D Kinney <michael.d.kin...@intel.com>


  Commit: bb40c3836f896d231347a0a1c388ecc4af0b56c1
      
https://github.com/tianocore/edk2/commit/bb40c3836f896d231347a0a1c388ecc4af0b56c1
  Author: Ray Ni <ray...@intel.com>
  Date:   2023-04-01 (Sat, 01 Apr 2023)

  Changed paths:
    M UefiCpuPkg/CpuDxe/CpuDxe.c

  Log Message:
  -----------
  UefiCpuPkg/CpuDxe: Substract TME-MK KEY_ID_BITS from CPU max PA

CPUID enumeration of MAX_PA is unaffected by TME-MK activation and
will continue to report the maximum physical address bits available
for software to use, irrespective of the number of KeyID bits.

So, we need to check if TME is enabled and adjust the PA size
accordingly.

Signed-off-by: Ray Ni <ray...@intel.com>
Cc: Eric Dong <eric.d...@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: Ahmad Anadani <ahmad.anad...@intel.com>
Acked-by: Gerd Hoffmann <kra...@redhat.com>
Reviewed-by: Michael D Kinney <michael.d.kin...@intel.com>


  Commit: 71210053fafcca7ccfd180258263e737dbe09555
      
https://github.com/tianocore/edk2/commit/71210053fafcca7ccfd180258263e737dbe09555
  Author: Ray Ni <ray...@intel.com>
  Date:   2023-04-01 (Sat, 01 Apr 2023)

  Changed paths:
    M UefiCpuPkg/Library/MtrrLib/UnitTest/MtrrLibUnitTest.c
    M UefiCpuPkg/Library/MtrrLib/UnitTest/MtrrLibUnitTest.h
    M UefiCpuPkg/Library/MtrrLib/UnitTest/Support.c

  Log Message:
  -----------
  UefiCpuPkg/MtrrTest: Add test cases for TME-MK enable case

When TME-MK is enabled, the MtrrLib should substract the TME-MK
reserved bits from the max PA returned from CPUID instruction.

The new test case guarantees such behavior in MtrrLib.

Signed-off-by: Ray Ni <ray...@intel.com>
Cc: Eric Dong <eric.d...@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: Ahmad Anadani <ahmad.anad...@intel.com>
Acked-by: Gerd Hoffmann <kra...@redhat.com>
Reviewed-by: Michael D Kinney <michael.d.kin...@intel.com>


Compare: https://github.com/tianocore/edk2/compare/2f499c36db51...71210053fafc


_______________________________________________
edk2-commits mailing list
edk2-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-commits

Reply via email to