public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [edk2-staging][PATCH v1 0/7] Add TPM subclass definition
@ 2022-07-06  3:38 Kun Qin
  2022-07-06  3:38 ` [edk2-staging][PATCH v1 1/7] EDK2 Code First: PI Specification: New peripheral subclass for TPM Kun Qin
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: Kun Qin @ 2022-07-06  3:38 UTC (permalink / raw)
  To: devel
  Cc: Jiewen Yao, Jian J Wang, Qi Zhang, Rahul Kumar, Andrew Fish,
	Leif Lindholm, Michael D Kinney, Liming Gao, Zhiguang Liu

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

>From PI Specification v1.7 Errata A, EFI_PERIPHERAL_DOCKING is defined as
0xD0000 (as well as included in PiStatusCode.h).

However, subclass employed as PCD for TPM peripheral in SecurityPkg is
also defined as 0xD0000. The TPM subclass code was used in TcgPei.c when
reporting error codes.

The collision of subclass definition could cause the parsing of reported
errors being ambiguous.

This patch series add EFI_PERIPHERAL_TPM as a spec-defined value and
removed potential usages in the SecurityPkg.

Patch v1 branch: https://github.com/kuqin12/edk2/tree/BZ3966-add_tpm_subclass

Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Qi Zhang <qi1.zhang@intel.com>
Cc: Rahul Kumar <rahul1.kumar@intel.com>
Cc: Andrew Fish <afish@apple.com>
Cc: Leif Lindholm <leif@nuviainc.com>
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Zhiguang Liu <zhiguang.liu@intel.com>

Kun Qin (7):
  EDK2 Code First: PI Specification: New peripheral subclass for TPM
  MdePkg: MmCommunication: Add TPM subclass definition to MdePkg
  SecurityPkg: Tcg2Dxe: Replace PcdStatusCodeSubClassTpmDevice
  SecurityPkg: Tcg2Pei: Replace PcdStatusCodeSubClassTpmDevice
  SecurityPkg: TcgDxe: Replace PcdStatusCodeSubClassTpmDevice
  SecurityPkg: TcgPei: Replace PcdStatusCodeSubClassTpmDevice
  SecurityPkg: SubClassTpm: Updated default value

 SecurityPkg/Tcg/Tcg2Dxe/Tcg2Dxe.c   |  4 +-
 SecurityPkg/Tcg/Tcg2Pei/Tcg2Pei.c   |  4 +-
 SecurityPkg/Tcg/TcgDxe/TcgDxe.c     |  2 +-
 SecurityPkg/Tcg/TcgPei/TcgPei.c     |  4 +-
 CodeFirst/BZ3966-SpecChange.md      | 60 ++++++++++++++++++++
 MdePkg/Include/Pi/PiStatusCode.h    |  1 +
 SecurityPkg/SecurityPkg.dec         |  6 +-
 SecurityPkg/SecurityPkg.uni         |  2 +-
 SecurityPkg/Tcg/Tcg2Dxe/Tcg2Dxe.inf |  1 -
 SecurityPkg/Tcg/Tcg2Pei/Tcg2Pei.inf |  1 -
 SecurityPkg/Tcg/TcgDxe/TcgDxe.inf   |  1 -
 SecurityPkg/Tcg/TcgPei/TcgPei.inf   |  1 -
 12 files changed, 72 insertions(+), 15 deletions(-)
 create mode 100644 CodeFirst/BZ3966-SpecChange.md

-- 
2.35.1.windows.2


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

* [edk2-staging][PATCH v1 1/7] EDK2 Code First: PI Specification: New peripheral subclass for TPM
  2022-07-06  3:38 [edk2-staging][PATCH v1 0/7] Add TPM subclass definition Kun Qin
@ 2022-07-06  3:38 ` Kun Qin
  2022-07-06  3:38 ` [edk2-staging][PATCH v1 2/7] MdePkg: MmCommunication: Add TPM subclass definition to MdePkg Kun Qin
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: Kun Qin @ 2022-07-06  3:38 UTC (permalink / raw)
  To: devel
  Cc: Andrew Fish, Leif Lindholm, Michael D Kinney, Liming Gao,
	Zhiguang Liu

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

This change includes specification update markdown file that describes
the proposed PI Specification v1.7 Errata A in detail and potential
impact to the existing codebase.

Cc: Andrew Fish <afish@apple.com>
Cc: Leif Lindholm <leif@nuviainc.com>
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Zhiguang Liu <zhiguang.liu@intel.com>

Signed-off-by: Kun Qin <kuqin12@gmail.com>
---
 CodeFirst/BZ3966-SpecChange.md | 60 ++++++++++++++++++++
 1 file changed, 60 insertions(+)

diff --git a/CodeFirst/BZ3966-SpecChange.md b/CodeFirst/BZ3966-SpecChange.md
new file mode 100644
index 000000000000..8a1541bdd577
--- /dev/null
+++ b/CodeFirst/BZ3966-SpecChange.md
@@ -0,0 +1,60 @@
+# Title: Introduction of `EFI_PERIPHERAL_TPM` Peripheral Subclass Definition
+
+## Status: Draft
+
+## Document: UEFI Platform Initialization Specification Version 1.7 Errata A
+
+## License
+
+SPDX-License-Identifier: CC-BY-4.0
+
+## Submitter: [TianoCore Community](https://www.tianocore.org)
+
+## Summary of the change
+
+Add `EFI_PERIPHERAL_TPM` into Peripheral Subclass definition.
+
+## Benefits of the change
+
+Current status code covered various [peripheral subclass definitions](https://github.com/tianocore/edk2/blob/master/MdePkg/Include/Pi/PiStatusCode.h).
+
+As Trusted Platform Module (TPM) becomes more available on the modern systems, status reports from such peripheral are playing more important roles in anaylzing the secruity state and healthiness of a system. However, peripheral subclass definitions do not cover TPM as of today.
+
+Standardizing the TPM peripheral subclass definition could facilitate the parsing of peripheral reported errors and avoid potential definition collisions from implementation based subclass usages.
+
+The request of this change intends to expand definitions of `EFI_PERIPHERAL_**` under Periperhal Subclass definitions to cover the TPM subclass.
+
+## Impact of the change
+
+Occupy a new macro definitions of subclass under `Defined Subclasses: User-Accessible Peripheral Class`.
+
+## Detailed description of the change [normative updates]
+
+### Specification Changes
+
+1. In PI Specification v1.7 Errata A: Vol. 3, Table 3-30: Defined Subclasses: User-Accessible Peripheral Class, add one new rows below `EFI_PERIPHERAL_DOCKING` definition and adjust the rest of reserved definitions accordingly:
+
+    | Subclass | Code Name | Description |
+    | --- | --- | --- |
+    | Trusted Platform Module | EFI_PERIPHERAL_TPM | The peripheral referred to is a Trusted Platform Module |
+    | 0x0F–0x7F | Reserved for future use by this specification |  |
+
+1. In PI Specification v1.7 Errata A: Vol. 3, Table 3-84: Defined Subclasses: User-Accessible Peripheral Class, add one new rows below `EFI_PERIPHERAL_DOCKING` definition and adjust the rest of reserved definitions accordingly:
+
+    | Subclass | Code Name |
+    | --- | --- |
+    | Trusted Platform Module | EFI_PERIPHERAL_TPM |
+    | 0x0F–0x7F | Reserved for future use by this specification. |
+
+1. In PI Specification v1.7 Errata A: Vol. 3, Section 6.7.2.1 Subclass Definitions: Prototype, add one new definitions below `EFI_PERIPHERAL_DOCKING` definition:
+
+    ```c
+    #define EFI_PERIPHERAL_TPM \
+      (EFI_PERIPHERAL | 0x000E0000)
+    ```
+
+### Code Changes
+
+1. Add macro definitions in `MdePkg/Include/Pi/PiStatusCode.h` to match new specification.
+1. Replace existing references of `gEfiSecurityPkgTokenSpaceGuid.PcdStatusCodeSubClassTpmDevice` from SecurityPkg with new definition.
+1. Updated the default value of `gEfiSecurityPkgTokenSpaceGuid.PcdStatusCodeSubClassTpmDevice` to `(EFI_PERIPHERAL | 0x000E0000)` for consistency and backwards compatibility outside of SecurityPkg.
-- 
2.35.1.windows.2


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

* [edk2-staging][PATCH v1 2/7] MdePkg: MmCommunication: Add TPM subclass definition to MdePkg
  2022-07-06  3:38 [edk2-staging][PATCH v1 0/7] Add TPM subclass definition Kun Qin
  2022-07-06  3:38 ` [edk2-staging][PATCH v1 1/7] EDK2 Code First: PI Specification: New peripheral subclass for TPM Kun Qin
@ 2022-07-06  3:38 ` Kun Qin
  2022-07-06  3:38 ` [edk2-staging][PATCH v1 3/7] SecurityPkg: Tcg2Dxe: Replace PcdStatusCodeSubClassTpmDevice Kun Qin
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: Kun Qin @ 2022-07-06  3:38 UTC (permalink / raw)
  To: devel; +Cc: Michael D Kinney, Liming Gao, Zhiguang Liu

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

This change introduces a new peripheral subclass definition.

The new subclass definition will cover system reboot events under the
status reports from Trusted Platform Modules (TPMs).

These definition could provide helpful datapoints to OEMs to analyze
system security state and healthiness, as well as avoid definition
collision with other existing peripheral subclass definitions.

Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Zhiguang Liu <zhiguang.liu@intel.com>

Signed-off-by: Kun Qin <kuqin12@gmail.com>
---
 MdePkg/Include/Pi/PiStatusCode.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/MdePkg/Include/Pi/PiStatusCode.h b/MdePkg/Include/Pi/PiStatusCode.h
index ef2aea7364bc..d65b65654053 100644
--- a/MdePkg/Include/Pi/PiStatusCode.h
+++ b/MdePkg/Include/Pi/PiStatusCode.h
@@ -363,6 +363,7 @@ typedef struct {
 #define EFI_PERIPHERAL_LCD_DEVICE       (EFI_PERIPHERAL | 0x000B0000)
 #define EFI_PERIPHERAL_NETWORK          (EFI_PERIPHERAL | 0x000C0000)
 #define EFI_PERIPHERAL_DOCKING          (EFI_PERIPHERAL | 0x000D0000)
+#define BZ3966_EFI_PERIPHERAL_TPM              (EFI_PERIPHERAL | 0x000E0000)
 ///@}
 
 ///
-- 
2.35.1.windows.2


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

* [edk2-staging][PATCH v1 3/7] SecurityPkg: Tcg2Dxe: Replace PcdStatusCodeSubClassTpmDevice
  2022-07-06  3:38 [edk2-staging][PATCH v1 0/7] Add TPM subclass definition Kun Qin
  2022-07-06  3:38 ` [edk2-staging][PATCH v1 1/7] EDK2 Code First: PI Specification: New peripheral subclass for TPM Kun Qin
  2022-07-06  3:38 ` [edk2-staging][PATCH v1 2/7] MdePkg: MmCommunication: Add TPM subclass definition to MdePkg Kun Qin
@ 2022-07-06  3:38 ` Kun Qin
  2022-07-06  3:38 ` [edk2-staging][PATCH v1 4/7] SecurityPkg: Tcg2Pei: " Kun Qin
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: Kun Qin @ 2022-07-06  3:38 UTC (permalink / raw)
  To: devel; +Cc: Jiewen Yao, Jian J Wang, Qi Zhang, Rahul Kumar

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

This change replaces the references of PcdStatusCodeSubClassTpmDevice
with newly defined EFI_PERIPHERAL_TPM.

Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Qi Zhang <qi1.zhang@intel.com>
Cc: Rahul Kumar <rahul1.kumar@intel.com>

Signed-off-by: Kun Qin <kuqin12@gmail.com>
---
 SecurityPkg/Tcg/Tcg2Dxe/Tcg2Dxe.c   | 4 ++--
 SecurityPkg/Tcg/Tcg2Dxe/Tcg2Dxe.inf | 1 -
 2 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/SecurityPkg/Tcg/Tcg2Dxe/Tcg2Dxe.c b/SecurityPkg/Tcg/Tcg2Dxe/Tcg2Dxe.c
index f6ea8b2bbf18..d6d2994f400b 100644
--- a/SecurityPkg/Tcg/Tcg2Dxe/Tcg2Dxe.c
+++ b/SecurityPkg/Tcg/Tcg2Dxe/Tcg2Dxe.c
@@ -1256,7 +1256,7 @@ TcgDxeHashLogExtendEvent (
     mTcgDxeData.BsCap.TPMPresentFlag = FALSE;
     REPORT_STATUS_CODE (
       EFI_ERROR_CODE | EFI_ERROR_MINOR,
-      (PcdGet32 (PcdStatusCodeSubClassTpmDevice) | EFI_P_EC_INTERFACE_ERROR)
+      (BZ3966_EFI_PERIPHERAL_TPM | EFI_P_EC_INTERFACE_ERROR)
       );
   }
 
@@ -1342,7 +1342,7 @@ Tcg2HashLogExtendEvent (
       mTcgDxeData.BsCap.TPMPresentFlag = FALSE;
       REPORT_STATUS_CODE (
         EFI_ERROR_CODE | EFI_ERROR_MINOR,
-        (PcdGet32 (PcdStatusCodeSubClassTpmDevice) | EFI_P_EC_INTERFACE_ERROR)
+        (BZ3966_EFI_PERIPHERAL_TPM | EFI_P_EC_INTERFACE_ERROR)
         );
     }
   } else {
diff --git a/SecurityPkg/Tcg/Tcg2Dxe/Tcg2Dxe.inf b/SecurityPkg/Tcg/Tcg2Dxe/Tcg2Dxe.inf
index 7dc7a2683d71..b40bdfc1c975 100644
--- a/SecurityPkg/Tcg/Tcg2Dxe/Tcg2Dxe.inf
+++ b/SecurityPkg/Tcg/Tcg2Dxe/Tcg2Dxe.inf
@@ -98,7 +98,6 @@ [Pcd]
   gEfiSecurityPkgTokenSpaceGuid.PcdTpmPlatformClass                         ## SOMETIMES_CONSUMES
   gEfiSecurityPkgTokenSpaceGuid.PcdFirmwareDebuggerInitialized              ## SOMETIMES_CONSUMES
   gEfiSecurityPkgTokenSpaceGuid.PcdTpmInstanceGuid                          ## CONSUMES
-  gEfiSecurityPkgTokenSpaceGuid.PcdStatusCodeSubClassTpmDevice              ## SOMETIMES_CONSUMES
   gEfiSecurityPkgTokenSpaceGuid.PcdTcg2HashAlgorithmBitmap                  ## CONSUMES
   gEfiSecurityPkgTokenSpaceGuid.PcdTcg2NumberOfPCRBanks                     ## CONSUMES
   gEfiSecurityPkgTokenSpaceGuid.PcdTcgLogAreaMinLen                         ## CONSUMES
-- 
2.35.1.windows.2


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

* [edk2-staging][PATCH v1 4/7] SecurityPkg: Tcg2Pei: Replace PcdStatusCodeSubClassTpmDevice
  2022-07-06  3:38 [edk2-staging][PATCH v1 0/7] Add TPM subclass definition Kun Qin
                   ` (2 preceding siblings ...)
  2022-07-06  3:38 ` [edk2-staging][PATCH v1 3/7] SecurityPkg: Tcg2Dxe: Replace PcdStatusCodeSubClassTpmDevice Kun Qin
@ 2022-07-06  3:38 ` Kun Qin
  2022-07-06  3:38 ` [edk2-staging][PATCH v1 5/7] SecurityPkg: TcgDxe: " Kun Qin
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: Kun Qin @ 2022-07-06  3:38 UTC (permalink / raw)
  To: devel; +Cc: Jiewen Yao, Jian J Wang, Qi Zhang, Rahul Kumar

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

This change replaces the references of PcdStatusCodeSubClassTpmDevice
with newly defined EFI_PERIPHERAL_TPM.

Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Qi Zhang <qi1.zhang@intel.com>
Cc: Rahul Kumar <rahul1.kumar@intel.com>

Signed-off-by: Kun Qin <kuqin12@gmail.com>
---
 SecurityPkg/Tcg/Tcg2Pei/Tcg2Pei.c   | 4 ++--
 SecurityPkg/Tcg/Tcg2Pei/Tcg2Pei.inf | 1 -
 2 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/SecurityPkg/Tcg/Tcg2Pei/Tcg2Pei.c b/SecurityPkg/Tcg/Tcg2Pei/Tcg2Pei.c
index 26bb5282a58b..4fe474aade49 100644
--- a/SecurityPkg/Tcg/Tcg2Pei/Tcg2Pei.c
+++ b/SecurityPkg/Tcg/Tcg2Pei/Tcg2Pei.c
@@ -501,7 +501,7 @@ HashLogExtendEvent (
     BuildGuidHob (&gTpmErrorHobGuid, 0);
     REPORT_STATUS_CODE (
       EFI_ERROR_CODE | EFI_ERROR_MINOR,
-      (PcdGet32 (PcdStatusCodeSubClassTpmDevice) | EFI_P_EC_INTERFACE_ERROR)
+      (BZ3966_EFI_PERIPHERAL_TPM | EFI_P_EC_INTERFACE_ERROR)
       );
   }
 
@@ -1150,7 +1150,7 @@ PeimEntryMA (
     BuildGuidHob (&gTpmErrorHobGuid, 0);
     REPORT_STATUS_CODE (
       EFI_ERROR_CODE | EFI_ERROR_MINOR,
-      (PcdGet32 (PcdStatusCodeSubClassTpmDevice) | EFI_P_EC_INTERFACE_ERROR)
+      (BZ3966_EFI_PERIPHERAL_TPM | EFI_P_EC_INTERFACE_ERROR)
       );
   }
 
diff --git a/SecurityPkg/Tcg/Tcg2Pei/Tcg2Pei.inf b/SecurityPkg/Tcg/Tcg2Pei/Tcg2Pei.inf
index 17ad1161265d..98a26b0ad87c 100644
--- a/SecurityPkg/Tcg/Tcg2Pei/Tcg2Pei.inf
+++ b/SecurityPkg/Tcg/Tcg2Pei/Tcg2Pei.inf
@@ -82,7 +82,6 @@ [Pcd]
   gEfiSecurityPkgTokenSpaceGuid.PcdTpm2InitializationPolicy            ## CONSUMES
   gEfiSecurityPkgTokenSpaceGuid.PcdTpm2SelfTestPolicy                  ## SOMETIMES_CONSUMES
   gEfiSecurityPkgTokenSpaceGuid.PcdTpm2ScrtmPolicy                     ## CONSUMES
-  gEfiSecurityPkgTokenSpaceGuid.PcdStatusCodeSubClassTpmDevice         ## SOMETIMES_CONSUMES
   ## SOMETIMES_CONSUMES
   ## SOMETIMES_PRODUCES
   gEfiSecurityPkgTokenSpaceGuid.PcdTpm2HashMask
-- 
2.35.1.windows.2


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

* [edk2-staging][PATCH v1 5/7] SecurityPkg: TcgDxe: Replace PcdStatusCodeSubClassTpmDevice
  2022-07-06  3:38 [edk2-staging][PATCH v1 0/7] Add TPM subclass definition Kun Qin
                   ` (3 preceding siblings ...)
  2022-07-06  3:38 ` [edk2-staging][PATCH v1 4/7] SecurityPkg: Tcg2Pei: " Kun Qin
@ 2022-07-06  3:38 ` Kun Qin
  2022-07-06  3:38 ` [edk2-staging][PATCH v1 6/7] SecurityPkg: TcgPei: " Kun Qin
  2022-07-06  3:38 ` [edk2-staging][PATCH v1 7/7] SecurityPkg: SubClassTpm: Updated default value Kun Qin
  6 siblings, 0 replies; 8+ messages in thread
From: Kun Qin @ 2022-07-06  3:38 UTC (permalink / raw)
  To: devel; +Cc: Jiewen Yao, Jian J Wang, Qi Zhang, Rahul Kumar

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

This change replaces the references of PcdStatusCodeSubClassTpmDevice
with newly defined EFI_PERIPHERAL_TPM.

Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Qi Zhang <qi1.zhang@intel.com>
Cc: Rahul Kumar <rahul1.kumar@intel.com>

Signed-off-by: Kun Qin <kuqin12@gmail.com>
---
 SecurityPkg/Tcg/TcgDxe/TcgDxe.c   | 2 +-
 SecurityPkg/Tcg/TcgDxe/TcgDxe.inf | 1 -
 2 files changed, 1 insertion(+), 2 deletions(-)

diff --git a/SecurityPkg/Tcg/TcgDxe/TcgDxe.c b/SecurityPkg/Tcg/TcgDxe/TcgDxe.c
index ee6c6273033b..779125b1beb4 100644
--- a/SecurityPkg/Tcg/TcgDxe/TcgDxe.c
+++ b/SecurityPkg/Tcg/TcgDxe/TcgDxe.c
@@ -593,7 +593,7 @@ TcgDxeHashLogExtendEventI (
     TcgData->BsCap.TPMPresentFlag = FALSE;
     REPORT_STATUS_CODE (
       EFI_ERROR_CODE | EFI_ERROR_MINOR,
-      (PcdGet32 (PcdStatusCodeSubClassTpmDevice) | EFI_P_EC_INTERFACE_ERROR)
+      (BZ3966_EFI_PERIPHERAL_TPM | EFI_P_EC_INTERFACE_ERROR)
       );
     Status = EFI_DEVICE_ERROR;
   }
diff --git a/SecurityPkg/Tcg/TcgDxe/TcgDxe.inf b/SecurityPkg/Tcg/TcgDxe/TcgDxe.inf
index c93b377b34ff..be0f4a64958c 100644
--- a/SecurityPkg/Tcg/TcgDxe/TcgDxe.inf
+++ b/SecurityPkg/Tcg/TcgDxe/TcgDxe.inf
@@ -70,7 +70,6 @@ [Pcd]
   gEfiMdeModulePkgTokenSpaceGuid.PcdAcpiDefaultOemRevision       ## SOMETIMES_CONSUMES
   gEfiMdeModulePkgTokenSpaceGuid.PcdAcpiDefaultCreatorId         ## SOMETIMES_CONSUMES
   gEfiMdeModulePkgTokenSpaceGuid.PcdAcpiDefaultCreatorRevision   ## SOMETIMES_CONSUMES
-  gEfiSecurityPkgTokenSpaceGuid.PcdStatusCodeSubClassTpmDevice   ## SOMETIMES_CONSUMES
   gEfiSecurityPkgTokenSpaceGuid.PcdTcgLogAreaMinLen              ## CONSUMES
 
 [Depex]
-- 
2.35.1.windows.2


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

* [edk2-staging][PATCH v1 6/7] SecurityPkg: TcgPei: Replace PcdStatusCodeSubClassTpmDevice
  2022-07-06  3:38 [edk2-staging][PATCH v1 0/7] Add TPM subclass definition Kun Qin
                   ` (4 preceding siblings ...)
  2022-07-06  3:38 ` [edk2-staging][PATCH v1 5/7] SecurityPkg: TcgDxe: " Kun Qin
@ 2022-07-06  3:38 ` Kun Qin
  2022-07-06  3:38 ` [edk2-staging][PATCH v1 7/7] SecurityPkg: SubClassTpm: Updated default value Kun Qin
  6 siblings, 0 replies; 8+ messages in thread
From: Kun Qin @ 2022-07-06  3:38 UTC (permalink / raw)
  To: devel; +Cc: Jiewen Yao, Jian J Wang, Qi Zhang, Rahul Kumar

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

This change replaces the references of PcdStatusCodeSubClassTpmDevice
with newly defined EFI_PERIPHERAL_TPM.

Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Qi Zhang <qi1.zhang@intel.com>
Cc: Rahul Kumar <rahul1.kumar@intel.com>

Signed-off-by: Kun Qin <kuqin12@gmail.com>
---
 SecurityPkg/Tcg/TcgPei/TcgPei.c   | 4 ++--
 SecurityPkg/Tcg/TcgPei/TcgPei.inf | 1 -
 2 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/SecurityPkg/Tcg/TcgPei/TcgPei.c b/SecurityPkg/Tcg/TcgPei/TcgPei.c
index 5aa80511aa81..dd9f996df9fe 100644
--- a/SecurityPkg/Tcg/TcgPei/TcgPei.c
+++ b/SecurityPkg/Tcg/TcgPei/TcgPei.c
@@ -355,7 +355,7 @@ HashLogExtendEvent (
     BuildGuidHob (&gTpmErrorHobGuid, 0);
     REPORT_STATUS_CODE (
       EFI_ERROR_CODE | EFI_ERROR_MINOR,
-      (PcdGet32 (PcdStatusCodeSubClassTpmDevice) | EFI_P_EC_INTERFACE_ERROR)
+      (BZ3966_EFI_PERIPHERAL_TPM | EFI_P_EC_INTERFACE_ERROR)
       );
     Status = EFI_DEVICE_ERROR;
   }
@@ -922,7 +922,7 @@ PeimEntryMA (
     BuildGuidHob (&gTpmErrorHobGuid, 0);
     REPORT_STATUS_CODE (
       EFI_ERROR_CODE | EFI_ERROR_MINOR,
-      (PcdGet32 (PcdStatusCodeSubClassTpmDevice) | EFI_P_EC_INTERFACE_ERROR)
+      (BZ3966_EFI_PERIPHERAL_TPM | EFI_P_EC_INTERFACE_ERROR)
       );
   }
 
diff --git a/SecurityPkg/Tcg/TcgPei/TcgPei.inf b/SecurityPkg/Tcg/TcgPei/TcgPei.inf
index 2e3e7e0575d5..f49bb09062e3 100644
--- a/SecurityPkg/Tcg/TcgPei/TcgPei.inf
+++ b/SecurityPkg/Tcg/TcgPei/TcgPei.inf
@@ -78,7 +78,6 @@ [Pcd]
   gEfiSecurityPkgTokenSpaceGuid.PcdTpmInstanceGuid                    ## CONSUMES
   gEfiSecurityPkgTokenSpaceGuid.PcdTpmInitializationPolicy            ## CONSUMES
   gEfiSecurityPkgTokenSpaceGuid.PcdTpmScrtmPolicy                     ## SOMETIMES_CONSUMES
-  gEfiSecurityPkgTokenSpaceGuid.PcdStatusCodeSubClassTpmDevice        ## SOMETIMES_CONSUMES
 
 [Depex]
   gEfiPeiMasterBootModePpiGuid AND
-- 
2.35.1.windows.2


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

* [edk2-staging][PATCH v1 7/7] SecurityPkg: SubClassTpm: Updated default value
  2022-07-06  3:38 [edk2-staging][PATCH v1 0/7] Add TPM subclass definition Kun Qin
                   ` (5 preceding siblings ...)
  2022-07-06  3:38 ` [edk2-staging][PATCH v1 6/7] SecurityPkg: TcgPei: " Kun Qin
@ 2022-07-06  3:38 ` Kun Qin
  6 siblings, 0 replies; 8+ messages in thread
From: Kun Qin @ 2022-07-06  3:38 UTC (permalink / raw)
  To: devel; +Cc: Jiewen Yao, Jian J Wang, Qi Zhang, Rahul Kumar

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

This change updated the default value of TPM device subclass PCD to
`0x010E0000` in order to match the definition of EFI_PERIPHERAL_TPM
from PI specification.

Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Qi Zhang <qi1.zhang@intel.com>
Cc: Rahul Kumar <rahul1.kumar@intel.com>

Signed-off-by: Kun Qin <kuqin12@gmail.com>
---
 SecurityPkg/SecurityPkg.dec | 6 +++---
 SecurityPkg/SecurityPkg.uni | 2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/SecurityPkg/SecurityPkg.dec b/SecurityPkg/SecurityPkg.dec
index 0ee75efc1a97..cc93ebb54f99 100644
--- a/SecurityPkg/SecurityPkg.dec
+++ b/SecurityPkg/SecurityPkg.dec
@@ -310,10 +310,10 @@ [PcdsFixedAtBuild, PcdsPatchableInModule]
   gEfiSecurityPkgTokenSpaceGuid.PcdTpmPlatformClass|0|UINT8|0x00000006
 
   ## Progress Code for TPM device subclass definitions.<BR><BR>
-  #  EFI_PERIPHERAL_TPM  = (EFI_PERIPHERAL | 0x000D0000) = 0x010D0000<BR>
+  #  EFI_PERIPHERAL_TPM  = (EFI_PERIPHERAL | 0x000E0000) = 0x010E0000<BR>
   # @Prompt Status Code for TPM device definitions
-  # @ValidList  0x80000003 | 0x010D0000
-  gEfiSecurityPkgTokenSpaceGuid.PcdStatusCodeSubClassTpmDevice|0x010D0000|UINT32|0x00000007
+  # @ValidList  0x80000003 | 0x010E0000
+  gEfiSecurityPkgTokenSpaceGuid.PcdStatusCodeSubClassTpmDevice|0x010E0000|UINT32|0x00000007
 
   ## Defines the IO port used to trigger a software System Management Interrupt (SMI).<BR><BR>
   #  Used as the SMI Command IO port by security functionality that triggers a software SMI such
diff --git a/SecurityPkg/SecurityPkg.uni b/SecurityPkg/SecurityPkg.uni
index 68587304d779..6c28b8021333 100644
--- a/SecurityPkg/SecurityPkg.uni
+++ b/SecurityPkg/SecurityPkg.uni
@@ -169,7 +169,7 @@
 #string STR_gEfiSecurityPkgTokenSpaceGuid_PcdStatusCodeSubClassTpmDevice_PROMPT  #language en-US "Status Code for TPM device definitions"
 
 #string STR_gEfiSecurityPkgTokenSpaceGuid_PcdStatusCodeSubClassTpmDevice_HELP  #language en-US "Progress Code for TPM device subclass definitions.<BR><BR>\n"
-                                                                                               "EFI_PERIPHERAL_TPM  = (EFI_PERIPHERAL | 0x000D0000) = 0x010D0000<BR>"
+                                                                                               "EFI_PERIPHERAL_TPM  = (EFI_PERIPHERAL | 0x000E0000) = 0x010E0000<BR>"
 
 #string STR_gEfiSecurityPkgTokenSpaceGuid_PcdRsa2048Sha256PublicKeyBuffer_PROMPT  #language en-US "One or more SHA 256 Hashes of RSA 2048 bit public keys used to verify Recovery and Capsule Update images"
 
-- 
2.35.1.windows.2


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

end of thread, other threads:[~2022-07-06  3:38 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-07-06  3:38 [edk2-staging][PATCH v1 0/7] Add TPM subclass definition Kun Qin
2022-07-06  3:38 ` [edk2-staging][PATCH v1 1/7] EDK2 Code First: PI Specification: New peripheral subclass for TPM Kun Qin
2022-07-06  3:38 ` [edk2-staging][PATCH v1 2/7] MdePkg: MmCommunication: Add TPM subclass definition to MdePkg Kun Qin
2022-07-06  3:38 ` [edk2-staging][PATCH v1 3/7] SecurityPkg: Tcg2Dxe: Replace PcdStatusCodeSubClassTpmDevice Kun Qin
2022-07-06  3:38 ` [edk2-staging][PATCH v1 4/7] SecurityPkg: Tcg2Pei: " Kun Qin
2022-07-06  3:38 ` [edk2-staging][PATCH v1 5/7] SecurityPkg: TcgDxe: " Kun Qin
2022-07-06  3:38 ` [edk2-staging][PATCH v1 6/7] SecurityPkg: TcgPei: " Kun Qin
2022-07-06  3:38 ` [edk2-staging][PATCH v1 7/7] SecurityPkg: SubClassTpm: Updated default value Kun Qin

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