public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [edk2-platforms: PATCH] MinPlatformPkg/PeiReportFvLib: Install FvFspT in PeiReportFvLib
@ 2020-02-22  1:37 miki.shindo
  2020-02-25  6:45 ` Chiu, Chasel
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: miki.shindo @ 2020-02-22  1:37 UTC (permalink / raw)
  To: devel; +Cc: Sai Chaganty, Chasel Chiu, Nate DeSimone, Prince Agyeman

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

TPM measurements in PEI runs on FV_INFO_PPI notification function.
Currently FvFspT is not installed so it is not measured by TPM.
This commit makes FvFspT installed by FV_INFO_PPI so the
measurement would run for FvFspT. FvFspT code actually runs,
it has to be measured.

Signed-off-by: Miki Shindo <miki.shindo@intel.com>
Cc: Sai Chaganty <rangasai.v.chaganty@intel.com>
Cc: Chasel Chiu <chasel.chiu@intel.com>
Cc: Nate DeSimone <nathaniel.l.desimone@intel.com>
Cc: Prince Agyeman <prince.agyeman@intel.com>
---
 .../Intel/MinPlatformPkg/PlatformInit/Library/PeiReportFvLib/PeiReportFvLib.c   | 13 ++++++++++++-
 .../Intel/MinPlatformPkg/PlatformInit/Library/PeiReportFvLib/PeiReportFvLib.inf |  4 +++-
 2 files changed, 15 insertions(+), 2 deletions(-)

diff --git a/Platform/Intel/MinPlatformPkg/PlatformInit/Library/PeiReportFvLib/PeiReportFvLib.c b/Platform/Intel/MinPlatformPkg/PlatformInit/Library/PeiReportFvLib/PeiReportFvLib.c
index 0d805d6fe7..6158fc9412 100644
--- a/Platform/Intel/MinPlatformPkg/PlatformInit/Library/PeiReportFvLib/PeiReportFvLib.c
+++ b/Platform/Intel/MinPlatformPkg/PlatformInit/Library/PeiReportFvLib/PeiReportFvLib.c
@@ -1,7 +1,7 @@
 /** @file
   Source code file for Report Firmware Volume (FV) library
 
-Copyright (c) 2018 - 2019, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2018 - 2020, Intel Corporation. All rights reserved.<BR>
 SPDX-License-Identifier: BSD-2-Clause-Patent
 
 **/
@@ -31,6 +31,17 @@ ReportPreMemFv (
       0
       );
   }
+  if (PcdGetBool(PcdFspWrapperBootMode)) {
+    DEBUG ((DEBUG_INFO, "Install FlashFvFspT - 0x%x, 0x%x\n", PcdGet32 (PcdFlashFvFspTBase), PcdGet32 (PcdFlashFvFspTSize)));
+    PeiServicesInstallFvInfo2Ppi (
+      &(((EFI_FIRMWARE_VOLUME_HEADER *) (UINTN) PcdGet32 (PcdFlashFvFspTBase))->FileSystemGuid),
+      (VOID *) (UINTN) PcdGet32 (PcdFlashFvFspTBase),
+      PcdGet32 (PcdFlashFvFspTSize),
+      NULL,
+      NULL,
+      0
+      );
+  }
   DEBUG ((DEBUG_INFO, "Install FlashFvSecurity - 0x%x, 0x%x\n", PcdGet32 (PcdFlashFvSecurityBase), PcdGet32 (PcdFlashFvSecuritySize)));
   PeiServicesInstallFvInfo2Ppi (
     &(((EFI_FIRMWARE_VOLUME_HEADER *) (UINTN) PcdGet32 (PcdFlashFvSecurityBase))->FileSystemGuid),
diff --git a/Platform/Intel/MinPlatformPkg/PlatformInit/Library/PeiReportFvLib/PeiReportFvLib.inf b/Platform/Intel/MinPlatformPkg/PlatformInit/Library/PeiReportFvLib/PeiReportFvLib.inf
index ef03e110bd..79cd5ee1f7 100644
--- a/Platform/Intel/MinPlatformPkg/PlatformInit/Library/PeiReportFvLib/PeiReportFvLib.inf
+++ b/Platform/Intel/MinPlatformPkg/PlatformInit/Library/PeiReportFvLib/PeiReportFvLib.inf
@@ -1,7 +1,7 @@
 ### @file
 # Component information file for the Report Firmware Volume (FV) library.
 #
-# Copyright (c) 2018 - 2019, Intel Corporation. All rights reserved.<BR>
+# Copyright (c) 2018 - 2020, Intel Corporation. All rights reserved.<BR>
 #
 # SPDX-License-Identifier: BSD-2-Clause-Patent
 #
@@ -36,6 +36,8 @@
   gMinPlatformPkgTokenSpaceGuid.PcdFlashAreaSize                  ## CONSUMES
   gMinPlatformPkgTokenSpaceGuid.PcdFlashFvFspMBase                ## CONSUMES
   gMinPlatformPkgTokenSpaceGuid.PcdFlashFvFspMSize                ## CONSUMES
+  gMinPlatformPkgTokenSpaceGuid.PcdFlashFvFspTBase                ## CONSUMES
+  gMinPlatformPkgTokenSpaceGuid.PcdFlashFvFspTSize                ## CONSUMES
   gMinPlatformPkgTokenSpaceGuid.PcdFlashFvFspSBase                ## CONSUMES
   gMinPlatformPkgTokenSpaceGuid.PcdFlashFvFspSSize                ## CONSUMES
   gMinPlatformPkgTokenSpaceGuid.PcdFlashFvFspUBase                ## CONSUMES
-- 
2.16.2.windows.1


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

* Re: [edk2-platforms: PATCH] MinPlatformPkg/PeiReportFvLib: Install FvFspT in PeiReportFvLib
  2020-02-22  1:37 [edk2-platforms: PATCH] MinPlatformPkg/PeiReportFvLib: Install FvFspT in PeiReportFvLib miki.shindo
@ 2020-02-25  6:45 ` Chiu, Chasel
  2020-02-25  7:20 ` Chaganty, Rangasai V
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Chiu, Chasel @ 2020-02-25  6:45 UTC (permalink / raw)
  To: Shindo, Miki, devel@edk2.groups.io
  Cc: Chaganty, Rangasai V, Desimone, Nathaniel L, Agyeman, Prince


Reviewed-by: Chasel Chiu <chasel.chiu@intel.com>

> -----Original Message-----
> From: Shindo, Miki <miki.shindo@intel.com>
> Sent: Saturday, February 22, 2020 9:38 AM
> To: devel@edk2.groups.io
> Cc: Chaganty, Rangasai V <rangasai.v.chaganty@intel.com>; Chiu, Chasel
> <chasel.chiu@intel.com>; Desimone, Nathaniel L
> <nathaniel.l.desimone@intel.com>; Agyeman, Prince
> <prince.agyeman@intel.com>
> Subject: [edk2-platforms: PATCH] MinPlatformPkg/PeiReportFvLib: Install
> FvFspT in PeiReportFvLib
> 
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2410
> 
> TPM measurements in PEI runs on FV_INFO_PPI notification function.
> Currently FvFspT is not installed so it is not measured by TPM.
> This commit makes FvFspT installed by FV_INFO_PPI so the measurement
> would run for FvFspT. FvFspT code actually runs, it has to be measured.
> 
> Signed-off-by: Miki Shindo <miki.shindo@intel.com>
> Cc: Sai Chaganty <rangasai.v.chaganty@intel.com>
> Cc: Chasel Chiu <chasel.chiu@intel.com>
> Cc: Nate DeSimone <nathaniel.l.desimone@intel.com>
> Cc: Prince Agyeman <prince.agyeman@intel.com>
> ---
>  .../Intel/MinPlatformPkg/PlatformInit/Library/PeiReportFvLib/PeiReportFvLib
> .c   | 13 ++++++++++++-
>  .../Intel/MinPlatformPkg/PlatformInit/Library/PeiReportFvLib/PeiReportFvLib
> .inf |  4 +++-
>  2 files changed, 15 insertions(+), 2 deletions(-)
> 
> diff --git
> a/Platform/Intel/MinPlatformPkg/PlatformInit/Library/PeiReportFvLib/PeiRep
> ortFvLib.c
> b/Platform/Intel/MinPlatformPkg/PlatformInit/Library/PeiReportFvLib/PeiRep
> ortFvLib.c
> index 0d805d6fe7..6158fc9412 100644
> ---
> a/Platform/Intel/MinPlatformPkg/PlatformInit/Library/PeiReportFvLib/PeiRep
> ortFvLib.c
> +++ b/Platform/Intel/MinPlatformPkg/PlatformInit/Library/PeiReportFvLib/
> +++ PeiReportFvLib.c
> @@ -1,7 +1,7 @@
>  /** @file
>    Source code file for Report Firmware Volume (FV) library
> 
> -Copyright (c) 2018 - 2019, Intel Corporation. All rights reserved.<BR>
> +Copyright (c) 2018 - 2020, Intel Corporation. All rights reserved.<BR>
>  SPDX-License-Identifier: BSD-2-Clause-Patent
> 
>  **/
> @@ -31,6 +31,17 @@ ReportPreMemFv (
>        0
>        );
>    }
> +  if (PcdGetBool(PcdFspWrapperBootMode)) {
> +    DEBUG ((DEBUG_INFO, "Install FlashFvFspT - 0x%x, 0x%x\n", PcdGet32
> (PcdFlashFvFspTBase), PcdGet32 (PcdFlashFvFspTSize)));
> +    PeiServicesInstallFvInfo2Ppi (
> +      &(((EFI_FIRMWARE_VOLUME_HEADER *) (UINTN) PcdGet32
> (PcdFlashFvFspTBase))->FileSystemGuid),
> +      (VOID *) (UINTN) PcdGet32 (PcdFlashFvFspTBase),
> +      PcdGet32 (PcdFlashFvFspTSize),
> +      NULL,
> +      NULL,
> +      0
> +      );
> +  }
>    DEBUG ((DEBUG_INFO, "Install FlashFvSecurity - 0x%x, 0x%x\n", PcdGet32
> (PcdFlashFvSecurityBase), PcdGet32 (PcdFlashFvSecuritySize)));
>    PeiServicesInstallFvInfo2Ppi (
>      &(((EFI_FIRMWARE_VOLUME_HEADER *) (UINTN) PcdGet32
> (PcdFlashFvSecurityBase))->FileSystemGuid),
> diff --git
> a/Platform/Intel/MinPlatformPkg/PlatformInit/Library/PeiReportFvLib/PeiRep
> ortFvLib.inf
> b/Platform/Intel/MinPlatformPkg/PlatformInit/Library/PeiReportFvLib/PeiRep
> ortFvLib.inf
> index ef03e110bd..79cd5ee1f7 100644
> ---
> a/Platform/Intel/MinPlatformPkg/PlatformInit/Library/PeiReportFvLib/PeiRep
> ortFvLib.inf
> +++ b/Platform/Intel/MinPlatformPkg/PlatformInit/Library/PeiReportFvLib/
> +++ PeiReportFvLib.inf
> @@ -1,7 +1,7 @@
>  ### @file
>  # Component information file for the Report Firmware Volume (FV) library.
>  #
> -# Copyright (c) 2018 - 2019, Intel Corporation. All rights reserved.<BR>
> +# Copyright (c) 2018 - 2020, Intel Corporation. All rights
> +reserved.<BR>
>  #
>  # SPDX-License-Identifier: BSD-2-Clause-Patent  # @@ -36,6 +36,8 @@
>    gMinPlatformPkgTokenSpaceGuid.PcdFlashAreaSize
> ## CONSUMES
>    gMinPlatformPkgTokenSpaceGuid.PcdFlashFvFspMBase
> ## CONSUMES
>    gMinPlatformPkgTokenSpaceGuid.PcdFlashFvFspMSize
> ## CONSUMES
> +  gMinPlatformPkgTokenSpaceGuid.PcdFlashFvFspTBase
> ## CONSUMES
> +  gMinPlatformPkgTokenSpaceGuid.PcdFlashFvFspTSize
> ## CONSUMES
>    gMinPlatformPkgTokenSpaceGuid.PcdFlashFvFspSBase
> ## CONSUMES
>    gMinPlatformPkgTokenSpaceGuid.PcdFlashFvFspSSize
> ## CONSUMES
>    gMinPlatformPkgTokenSpaceGuid.PcdFlashFvFspUBase
> ## CONSUMES
> --
> 2.16.2.windows.1


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

* Re: [edk2-platforms: PATCH] MinPlatformPkg/PeiReportFvLib: Install FvFspT in PeiReportFvLib
  2020-02-22  1:37 [edk2-platforms: PATCH] MinPlatformPkg/PeiReportFvLib: Install FvFspT in PeiReportFvLib miki.shindo
  2020-02-25  6:45 ` Chiu, Chasel
@ 2020-02-25  7:20 ` Chaganty, Rangasai V
  2020-02-27  6:58 ` Nate DeSimone
  2020-02-27  7:05 ` Nate DeSimone
  3 siblings, 0 replies; 5+ messages in thread
From: Chaganty, Rangasai V @ 2020-02-25  7:20 UTC (permalink / raw)
  To: Shindo, Miki, devel@edk2.groups.io
  Cc: Chiu, Chasel, Desimone, Nathaniel L, Agyeman, Prince

Reviewed-by: Sai Chaganty <rangasai.v.chaganty@intel.com>

-----Original Message-----
From: Shindo, Miki <miki.shindo@intel.com> 
Sent: Friday, February 21, 2020 5:38 PM
To: devel@edk2.groups.io
Cc: Chaganty, Rangasai V <rangasai.v.chaganty@intel.com>; Chiu, Chasel <chasel.chiu@intel.com>; Desimone, Nathaniel L <nathaniel.l.desimone@intel.com>; Agyeman, Prince <prince.agyeman@intel.com>
Subject: [edk2-platforms: PATCH] MinPlatformPkg/PeiReportFvLib: Install FvFspT in PeiReportFvLib

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

TPM measurements in PEI runs on FV_INFO_PPI notification function.
Currently FvFspT is not installed so it is not measured by TPM.
This commit makes FvFspT installed by FV_INFO_PPI so the measurement would run for FvFspT. FvFspT code actually runs, it has to be measured.

Signed-off-by: Miki Shindo <miki.shindo@intel.com>
Cc: Sai Chaganty <rangasai.v.chaganty@intel.com>
Cc: Chasel Chiu <chasel.chiu@intel.com>
Cc: Nate DeSimone <nathaniel.l.desimone@intel.com>
Cc: Prince Agyeman <prince.agyeman@intel.com>
---
 .../Intel/MinPlatformPkg/PlatformInit/Library/PeiReportFvLib/PeiReportFvLib.c   | 13 ++++++++++++-
 .../Intel/MinPlatformPkg/PlatformInit/Library/PeiReportFvLib/PeiReportFvLib.inf |  4 +++-
 2 files changed, 15 insertions(+), 2 deletions(-)

diff --git a/Platform/Intel/MinPlatformPkg/PlatformInit/Library/PeiReportFvLib/PeiReportFvLib.c b/Platform/Intel/MinPlatformPkg/PlatformInit/Library/PeiReportFvLib/PeiReportFvLib.c
index 0d805d6fe7..6158fc9412 100644
--- a/Platform/Intel/MinPlatformPkg/PlatformInit/Library/PeiReportFvLib/PeiReportFvLib.c
+++ b/Platform/Intel/MinPlatformPkg/PlatformInit/Library/PeiReportFvLib/
+++ PeiReportFvLib.c
@@ -1,7 +1,7 @@
 /** @file
   Source code file for Report Firmware Volume (FV) library
 
-Copyright (c) 2018 - 2019, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2018 - 2020, Intel Corporation. All rights reserved.<BR>
 SPDX-License-Identifier: BSD-2-Clause-Patent
 
 **/
@@ -31,6 +31,17 @@ ReportPreMemFv (
       0
       );
   }
+  if (PcdGetBool(PcdFspWrapperBootMode)) {
+    DEBUG ((DEBUG_INFO, "Install FlashFvFspT - 0x%x, 0x%x\n", PcdGet32 (PcdFlashFvFspTBase), PcdGet32 (PcdFlashFvFspTSize)));
+    PeiServicesInstallFvInfo2Ppi (
+      &(((EFI_FIRMWARE_VOLUME_HEADER *) (UINTN) PcdGet32 (PcdFlashFvFspTBase))->FileSystemGuid),
+      (VOID *) (UINTN) PcdGet32 (PcdFlashFvFspTBase),
+      PcdGet32 (PcdFlashFvFspTSize),
+      NULL,
+      NULL,
+      0
+      );
+  }
   DEBUG ((DEBUG_INFO, "Install FlashFvSecurity - 0x%x, 0x%x\n", PcdGet32 (PcdFlashFvSecurityBase), PcdGet32 (PcdFlashFvSecuritySize)));
   PeiServicesInstallFvInfo2Ppi (
     &(((EFI_FIRMWARE_VOLUME_HEADER *) (UINTN) PcdGet32 (PcdFlashFvSecurityBase))->FileSystemGuid),
diff --git a/Platform/Intel/MinPlatformPkg/PlatformInit/Library/PeiReportFvLib/PeiReportFvLib.inf b/Platform/Intel/MinPlatformPkg/PlatformInit/Library/PeiReportFvLib/PeiReportFvLib.inf
index ef03e110bd..79cd5ee1f7 100644
--- a/Platform/Intel/MinPlatformPkg/PlatformInit/Library/PeiReportFvLib/PeiReportFvLib.inf
+++ b/Platform/Intel/MinPlatformPkg/PlatformInit/Library/PeiReportFvLib/
+++ PeiReportFvLib.inf
@@ -1,7 +1,7 @@
 ### @file
 # Component information file for the Report Firmware Volume (FV) library.
 #
-# Copyright (c) 2018 - 2019, Intel Corporation. All rights reserved.<BR>
+# Copyright (c) 2018 - 2020, Intel Corporation. All rights 
+reserved.<BR>
 #
 # SPDX-License-Identifier: BSD-2-Clause-Patent  # @@ -36,6 +36,8 @@
   gMinPlatformPkgTokenSpaceGuid.PcdFlashAreaSize                  ## CONSUMES
   gMinPlatformPkgTokenSpaceGuid.PcdFlashFvFspMBase                ## CONSUMES
   gMinPlatformPkgTokenSpaceGuid.PcdFlashFvFspMSize                ## CONSUMES
+  gMinPlatformPkgTokenSpaceGuid.PcdFlashFvFspTBase                ## CONSUMES
+  gMinPlatformPkgTokenSpaceGuid.PcdFlashFvFspTSize                ## CONSUMES
   gMinPlatformPkgTokenSpaceGuid.PcdFlashFvFspSBase                ## CONSUMES
   gMinPlatformPkgTokenSpaceGuid.PcdFlashFvFspSSize                ## CONSUMES
   gMinPlatformPkgTokenSpaceGuid.PcdFlashFvFspUBase                ## CONSUMES
--
2.16.2.windows.1


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

* Re: [edk2-platforms: PATCH] MinPlatformPkg/PeiReportFvLib: Install FvFspT in PeiReportFvLib
  2020-02-22  1:37 [edk2-platforms: PATCH] MinPlatformPkg/PeiReportFvLib: Install FvFspT in PeiReportFvLib miki.shindo
  2020-02-25  6:45 ` Chiu, Chasel
  2020-02-25  7:20 ` Chaganty, Rangasai V
@ 2020-02-27  6:58 ` Nate DeSimone
  2020-02-27  7:05 ` Nate DeSimone
  3 siblings, 0 replies; 5+ messages in thread
From: Nate DeSimone @ 2020-02-27  6:58 UTC (permalink / raw)
  To: Shindo, Miki, devel@edk2.groups.io
  Cc: Chaganty, Rangasai V, Chiu, Chasel, Agyeman, Prince

Reviewed-by: Nate DeSimone <nathaniel.l.desimone@intel.com>

-----Original Message-----
From: Shindo, Miki <miki.shindo@intel.com> 
Sent: Friday, February 21, 2020 5:38 PM
To: devel@edk2.groups.io
Cc: Chaganty, Rangasai V <rangasai.v.chaganty@intel.com>; Chiu, Chasel <chasel.chiu@intel.com>; Desimone, Nathaniel L <nathaniel.l.desimone@intel.com>; Agyeman, Prince <prince.agyeman@intel.com>
Subject: [edk2-platforms: PATCH] MinPlatformPkg/PeiReportFvLib: Install FvFspT in PeiReportFvLib

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

TPM measurements in PEI runs on FV_INFO_PPI notification function.
Currently FvFspT is not installed so it is not measured by TPM.
This commit makes FvFspT installed by FV_INFO_PPI so the measurement would run for FvFspT. FvFspT code actually runs, it has to be measured.

Signed-off-by: Miki Shindo <miki.shindo@intel.com>
Cc: Sai Chaganty <rangasai.v.chaganty@intel.com>
Cc: Chasel Chiu <chasel.chiu@intel.com>
Cc: Nate DeSimone <nathaniel.l.desimone@intel.com>
Cc: Prince Agyeman <prince.agyeman@intel.com>
---
 .../Intel/MinPlatformPkg/PlatformInit/Library/PeiReportFvLib/PeiReportFvLib.c   | 13 ++++++++++++-
 .../Intel/MinPlatformPkg/PlatformInit/Library/PeiReportFvLib/PeiReportFvLib.inf |  4 +++-
 2 files changed, 15 insertions(+), 2 deletions(-)

diff --git a/Platform/Intel/MinPlatformPkg/PlatformInit/Library/PeiReportFvLib/PeiReportFvLib.c b/Platform/Intel/MinPlatformPkg/PlatformInit/Library/PeiReportFvLib/PeiReportFvLib.c
index 0d805d6fe7..6158fc9412 100644
--- a/Platform/Intel/MinPlatformPkg/PlatformInit/Library/PeiReportFvLib/PeiReportFvLib.c
+++ b/Platform/Intel/MinPlatformPkg/PlatformInit/Library/PeiReportFvLib/
+++ PeiReportFvLib.c
@@ -1,7 +1,7 @@
 /** @file
   Source code file for Report Firmware Volume (FV) library
 
-Copyright (c) 2018 - 2019, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2018 - 2020, Intel Corporation. All rights reserved.<BR>
 SPDX-License-Identifier: BSD-2-Clause-Patent
 
 **/
@@ -31,6 +31,17 @@ ReportPreMemFv (
       0
       );
   }
+  if (PcdGetBool(PcdFspWrapperBootMode)) {
+    DEBUG ((DEBUG_INFO, "Install FlashFvFspT - 0x%x, 0x%x\n", PcdGet32 (PcdFlashFvFspTBase), PcdGet32 (PcdFlashFvFspTSize)));
+    PeiServicesInstallFvInfo2Ppi (
+      &(((EFI_FIRMWARE_VOLUME_HEADER *) (UINTN) PcdGet32 (PcdFlashFvFspTBase))->FileSystemGuid),
+      (VOID *) (UINTN) PcdGet32 (PcdFlashFvFspTBase),
+      PcdGet32 (PcdFlashFvFspTSize),
+      NULL,
+      NULL,
+      0
+      );
+  }
   DEBUG ((DEBUG_INFO, "Install FlashFvSecurity - 0x%x, 0x%x\n", PcdGet32 (PcdFlashFvSecurityBase), PcdGet32 (PcdFlashFvSecuritySize)));
   PeiServicesInstallFvInfo2Ppi (
     &(((EFI_FIRMWARE_VOLUME_HEADER *) (UINTN) PcdGet32 (PcdFlashFvSecurityBase))->FileSystemGuid),
diff --git a/Platform/Intel/MinPlatformPkg/PlatformInit/Library/PeiReportFvLib/PeiReportFvLib.inf b/Platform/Intel/MinPlatformPkg/PlatformInit/Library/PeiReportFvLib/PeiReportFvLib.inf
index ef03e110bd..79cd5ee1f7 100644
--- a/Platform/Intel/MinPlatformPkg/PlatformInit/Library/PeiReportFvLib/PeiReportFvLib.inf
+++ b/Platform/Intel/MinPlatformPkg/PlatformInit/Library/PeiReportFvLib/
+++ PeiReportFvLib.inf
@@ -1,7 +1,7 @@
 ### @file
 # Component information file for the Report Firmware Volume (FV) library.
 #
-# Copyright (c) 2018 - 2019, Intel Corporation. All rights reserved.<BR>
+# Copyright (c) 2018 - 2020, Intel Corporation. All rights 
+reserved.<BR>
 #
 # SPDX-License-Identifier: BSD-2-Clause-Patent  # @@ -36,6 +36,8 @@
   gMinPlatformPkgTokenSpaceGuid.PcdFlashAreaSize                  ## CONSUMES
   gMinPlatformPkgTokenSpaceGuid.PcdFlashFvFspMBase                ## CONSUMES
   gMinPlatformPkgTokenSpaceGuid.PcdFlashFvFspMSize                ## CONSUMES
+  gMinPlatformPkgTokenSpaceGuid.PcdFlashFvFspTBase                ## CONSUMES
+  gMinPlatformPkgTokenSpaceGuid.PcdFlashFvFspTSize                ## CONSUMES
   gMinPlatformPkgTokenSpaceGuid.PcdFlashFvFspSBase                ## CONSUMES
   gMinPlatformPkgTokenSpaceGuid.PcdFlashFvFspSSize                ## CONSUMES
   gMinPlatformPkgTokenSpaceGuid.PcdFlashFvFspUBase                ## CONSUMES
--
2.16.2.windows.1


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

* Re: [edk2-platforms: PATCH] MinPlatformPkg/PeiReportFvLib: Install FvFspT in PeiReportFvLib
  2020-02-22  1:37 [edk2-platforms: PATCH] MinPlatformPkg/PeiReportFvLib: Install FvFspT in PeiReportFvLib miki.shindo
                   ` (2 preceding siblings ...)
  2020-02-27  6:58 ` Nate DeSimone
@ 2020-02-27  7:05 ` Nate DeSimone
  3 siblings, 0 replies; 5+ messages in thread
From: Nate DeSimone @ 2020-02-27  7:05 UTC (permalink / raw)
  To: Shindo, Miki, devel@edk2.groups.io
  Cc: Chaganty, Rangasai V, Chiu, Chasel, Agyeman, Prince

Pushed: https://github.com/tianocore/edk2-platforms/commit/974ddebcf191e32c5eb2f52e5ef85423f4de9819

-----Original Message-----
From: Shindo, Miki <miki.shindo@intel.com> 
Sent: Friday, February 21, 2020 5:38 PM
To: devel@edk2.groups.io
Cc: Chaganty, Rangasai V <rangasai.v.chaganty@intel.com>; Chiu, Chasel <chasel.chiu@intel.com>; Desimone, Nathaniel L <nathaniel.l.desimone@intel.com>; Agyeman, Prince <prince.agyeman@intel.com>
Subject: [edk2-platforms: PATCH] MinPlatformPkg/PeiReportFvLib: Install FvFspT in PeiReportFvLib

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

TPM measurements in PEI runs on FV_INFO_PPI notification function.
Currently FvFspT is not installed so it is not measured by TPM.
This commit makes FvFspT installed by FV_INFO_PPI so the measurement would run for FvFspT. FvFspT code actually runs, it has to be measured.

Signed-off-by: Miki Shindo <miki.shindo@intel.com>
Cc: Sai Chaganty <rangasai.v.chaganty@intel.com>
Cc: Chasel Chiu <chasel.chiu@intel.com>
Cc: Nate DeSimone <nathaniel.l.desimone@intel.com>
Cc: Prince Agyeman <prince.agyeman@intel.com>
---
 .../Intel/MinPlatformPkg/PlatformInit/Library/PeiReportFvLib/PeiReportFvLib.c   | 13 ++++++++++++-
 .../Intel/MinPlatformPkg/PlatformInit/Library/PeiReportFvLib/PeiReportFvLib.inf |  4 +++-
 2 files changed, 15 insertions(+), 2 deletions(-)

diff --git a/Platform/Intel/MinPlatformPkg/PlatformInit/Library/PeiReportFvLib/PeiReportFvLib.c b/Platform/Intel/MinPlatformPkg/PlatformInit/Library/PeiReportFvLib/PeiReportFvLib.c
index 0d805d6fe7..6158fc9412 100644
--- a/Platform/Intel/MinPlatformPkg/PlatformInit/Library/PeiReportFvLib/PeiReportFvLib.c
+++ b/Platform/Intel/MinPlatformPkg/PlatformInit/Library/PeiReportFvLib/
+++ PeiReportFvLib.c
@@ -1,7 +1,7 @@
 /** @file
   Source code file for Report Firmware Volume (FV) library
 
-Copyright (c) 2018 - 2019, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2018 - 2020, Intel Corporation. All rights reserved.<BR>
 SPDX-License-Identifier: BSD-2-Clause-Patent
 
 **/
@@ -31,6 +31,17 @@ ReportPreMemFv (
       0
       );
   }
+  if (PcdGetBool(PcdFspWrapperBootMode)) {
+    DEBUG ((DEBUG_INFO, "Install FlashFvFspT - 0x%x, 0x%x\n", PcdGet32 (PcdFlashFvFspTBase), PcdGet32 (PcdFlashFvFspTSize)));
+    PeiServicesInstallFvInfo2Ppi (
+      &(((EFI_FIRMWARE_VOLUME_HEADER *) (UINTN) PcdGet32 (PcdFlashFvFspTBase))->FileSystemGuid),
+      (VOID *) (UINTN) PcdGet32 (PcdFlashFvFspTBase),
+      PcdGet32 (PcdFlashFvFspTSize),
+      NULL,
+      NULL,
+      0
+      );
+  }
   DEBUG ((DEBUG_INFO, "Install FlashFvSecurity - 0x%x, 0x%x\n", PcdGet32 (PcdFlashFvSecurityBase), PcdGet32 (PcdFlashFvSecuritySize)));
   PeiServicesInstallFvInfo2Ppi (
     &(((EFI_FIRMWARE_VOLUME_HEADER *) (UINTN) PcdGet32 (PcdFlashFvSecurityBase))->FileSystemGuid),
diff --git a/Platform/Intel/MinPlatformPkg/PlatformInit/Library/PeiReportFvLib/PeiReportFvLib.inf b/Platform/Intel/MinPlatformPkg/PlatformInit/Library/PeiReportFvLib/PeiReportFvLib.inf
index ef03e110bd..79cd5ee1f7 100644
--- a/Platform/Intel/MinPlatformPkg/PlatformInit/Library/PeiReportFvLib/PeiReportFvLib.inf
+++ b/Platform/Intel/MinPlatformPkg/PlatformInit/Library/PeiReportFvLib/
+++ PeiReportFvLib.inf
@@ -1,7 +1,7 @@
 ### @file
 # Component information file for the Report Firmware Volume (FV) library.
 #
-# Copyright (c) 2018 - 2019, Intel Corporation. All rights reserved.<BR>
+# Copyright (c) 2018 - 2020, Intel Corporation. All rights 
+reserved.<BR>
 #
 # SPDX-License-Identifier: BSD-2-Clause-Patent  # @@ -36,6 +36,8 @@
   gMinPlatformPkgTokenSpaceGuid.PcdFlashAreaSize                  ## CONSUMES
   gMinPlatformPkgTokenSpaceGuid.PcdFlashFvFspMBase                ## CONSUMES
   gMinPlatformPkgTokenSpaceGuid.PcdFlashFvFspMSize                ## CONSUMES
+  gMinPlatformPkgTokenSpaceGuid.PcdFlashFvFspTBase                ## CONSUMES
+  gMinPlatformPkgTokenSpaceGuid.PcdFlashFvFspTSize                ## CONSUMES
   gMinPlatformPkgTokenSpaceGuid.PcdFlashFvFspSBase                ## CONSUMES
   gMinPlatformPkgTokenSpaceGuid.PcdFlashFvFspSSize                ## CONSUMES
   gMinPlatformPkgTokenSpaceGuid.PcdFlashFvFspUBase                ## CONSUMES
--
2.16.2.windows.1


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

end of thread, other threads:[~2020-02-27  7:05 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-02-22  1:37 [edk2-platforms: PATCH] MinPlatformPkg/PeiReportFvLib: Install FvFspT in PeiReportFvLib miki.shindo
2020-02-25  6:45 ` Chiu, Chasel
2020-02-25  7:20 ` Chaganty, Rangasai V
2020-02-27  6:58 ` Nate DeSimone
2020-02-27  7:05 ` Nate DeSimone

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