IntelFsp2WrapperPkg/FspmWrapperPeim/FspmWrapperPeim.c | 2 +- IntelFsp2WrapperPkg/FspsWrapperPeim/FspsWrapperPeim.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4458
Original code call PeiServicesInstallFvInfoPpi() with NULL for the FvFormat
parameter, then PeiServicesInstallFvInfoPpi() will assume it use FFS2, then
ASSERT if FSP-S/M use FFS3.
Now set the FvFormat to the info got from FvHeader.
Cc: Chasel Chiu <chasel.chiu@intel.com>
Cc: Duggapu Chinni B <chinni.b.duggapu@intel.com>
Signed-off-by: Ming Tan <ming.tan@intel.com>
---
IntelFsp2WrapperPkg/FspmWrapperPeim/FspmWrapperPeim.c | 2 +-
IntelFsp2WrapperPkg/FspsWrapperPeim/FspsWrapperPeim.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/IntelFsp2WrapperPkg/FspmWrapperPeim/FspmWrapperPeim.c b/IntelFsp2WrapperPkg/FspmWrapperPeim/FspmWrapperPeim.c
index ea206a7960..ba0c742fea 100644
--- a/IntelFsp2WrapperPkg/FspmWrapperPeim/FspmWrapperPeim.c
+++ b/IntelFsp2WrapperPkg/FspmWrapperPeim/FspmWrapperPeim.c
@@ -217,7 +217,7 @@ FspmWrapperInit (
ASSERT_EFI_ERROR (Status);
PeiServicesInstallFvInfoPpi (
- NULL,
+ &((EFI_FIRMWARE_VOLUME_HEADER *)(UINTN)PcdGet32 (PcdFspmBaseAddress))->FileSystemGuid,
(VOID *)(UINTN)PcdGet32 (PcdFspmBaseAddress),
(UINT32)((EFI_FIRMWARE_VOLUME_HEADER *)(UINTN)PcdGet32 (PcdFspmBaseAddress))->FvLength,
NULL,
diff --git a/IntelFsp2WrapperPkg/FspsWrapperPeim/FspsWrapperPeim.c b/IntelFsp2WrapperPkg/FspsWrapperPeim/FspsWrapperPeim.c
index 091ddb697a..08fe0fdb7e 100644
--- a/IntelFsp2WrapperPkg/FspsWrapperPeim/FspsWrapperPeim.c
+++ b/IntelFsp2WrapperPkg/FspsWrapperPeim/FspsWrapperPeim.c
@@ -438,7 +438,7 @@ FspsWrapperInitDispatchMode (
// FSP-S Wrapper running in Dispatch mode and reports FSP-S FV to PEI dispatcher.
//
PeiServicesInstallFvInfoPpi (
- NULL,
+ &((EFI_FIRMWARE_VOLUME_HEADER *)(UINTN)PcdGet32 (PcdFspsBaseAddress))->FileSystemGuid,
(VOID *)(UINTN)PcdGet32 (PcdFspsBaseAddress),
(UINT32)((EFI_FIRMWARE_VOLUME_HEADER *)(UINTN)PcdGet32 (PcdFspsBaseAddress))->FvLength,
NULL,
--
2.31.1.windows.1
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#105101): https://edk2.groups.io/g/devel/message/105101
Mute This Topic: https://groups.io/mt/99059532/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-
Patch merged: https://github.com/tianocore/edk2/commit/69e10f02111bf7e719237f05233abff4e50016fa Thanks, Chasel > -----Original Message----- > From: Tan, Ming <ming.tan@intel.com> > Sent: Sunday, May 21, 2023 11:13 PM > To: devel@edk2.groups.io > Cc: Chiu, Chasel <chasel.chiu@intel.com>; Duggapu, Chinni B > <chinni.b.duggapu@intel.com> > Subject: [PATCH] IntelFsp2WrapperPkg: Fix ASSERT when FSP-S/M use FFS3 > > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4458 > > Original code call PeiServicesInstallFvInfoPpi() with NULL for the FvFormat > parameter, then PeiServicesInstallFvInfoPpi() will assume it use FFS2, then > ASSERT if FSP-S/M use FFS3. > Now set the FvFormat to the info got from FvHeader. > > Cc: Chasel Chiu <chasel.chiu@intel.com> > Cc: Duggapu Chinni B <chinni.b.duggapu@intel.com> > Signed-off-by: Ming Tan <ming.tan@intel.com> > --- > IntelFsp2WrapperPkg/FspmWrapperPeim/FspmWrapperPeim.c | 2 +- > IntelFsp2WrapperPkg/FspsWrapperPeim/FspsWrapperPeim.c | 2 +- > 2 files changed, 2 insertions(+), 2 deletions(-) > > diff --git a/IntelFsp2WrapperPkg/FspmWrapperPeim/FspmWrapperPeim.c > b/IntelFsp2WrapperPkg/FspmWrapperPeim/FspmWrapperPeim.c > index ea206a7960..ba0c742fea 100644 > --- a/IntelFsp2WrapperPkg/FspmWrapperPeim/FspmWrapperPeim.c > +++ b/IntelFsp2WrapperPkg/FspmWrapperPeim/FspmWrapperPeim.c > @@ -217,7 +217,7 @@ FspmWrapperInit ( > ASSERT_EFI_ERROR (Status); PeiServicesInstallFvInfoPpi (- NULL,+ > &((EFI_FIRMWARE_VOLUME_HEADER *)(UINTN)PcdGet32 > (PcdFspmBaseAddress))->FileSystemGuid, (VOID *)(UINTN)PcdGet32 > (PcdFspmBaseAddress), (UINT32)((EFI_FIRMWARE_VOLUME_HEADER > *)(UINTN)PcdGet32 (PcdFspmBaseAddress))->FvLength, NULL,diff --git > a/IntelFsp2WrapperPkg/FspsWrapperPeim/FspsWrapperPeim.c > b/IntelFsp2WrapperPkg/FspsWrapperPeim/FspsWrapperPeim.c > index 091ddb697a..08fe0fdb7e 100644 > --- a/IntelFsp2WrapperPkg/FspsWrapperPeim/FspsWrapperPeim.c > +++ b/IntelFsp2WrapperPkg/FspsWrapperPeim/FspsWrapperPeim.c > @@ -438,7 +438,7 @@ FspsWrapperInitDispatchMode ( > // FSP-S Wrapper running in Dispatch mode and reports FSP-S FV to PEI > dispatcher. // PeiServicesInstallFvInfoPpi (- NULL,+ > &((EFI_FIRMWARE_VOLUME_HEADER *)(UINTN)PcdGet32 > (PcdFspsBaseAddress))->FileSystemGuid, (VOID *)(UINTN)PcdGet32 > (PcdFspsBaseAddress), (UINT32)((EFI_FIRMWARE_VOLUME_HEADER > *)(UINTN)PcdGet32 (PcdFspsBaseAddress))->FvLength, NULL,-- > 2.31.1.windows.1 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#105402): https://edk2.groups.io/g/devel/message/105402 Mute This Topic: https://groups.io/mt/99059532/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=-=-=-=-=-=-=-=-=-=-=-
Reviewed-by: Chasel Chiu <chasel.chiu@intel.com> Thanks, Chasel > -----Original Message----- > From: Tan, Ming <ming.tan@intel.com> > Sent: Sunday, May 21, 2023 11:13 PM > To: devel@edk2.groups.io > Cc: Chiu, Chasel <chasel.chiu@intel.com>; Duggapu, Chinni B > <chinni.b.duggapu@intel.com> > Subject: [PATCH] IntelFsp2WrapperPkg: Fix ASSERT when FSP-S/M use FFS3 > > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4458 > > Original code call PeiServicesInstallFvInfoPpi() with NULL for the FvFormat > parameter, then PeiServicesInstallFvInfoPpi() will assume it use FFS2, then > ASSERT if FSP-S/M use FFS3. > Now set the FvFormat to the info got from FvHeader. > > Cc: Chasel Chiu <chasel.chiu@intel.com> > Cc: Duggapu Chinni B <chinni.b.duggapu@intel.com> > Signed-off-by: Ming Tan <ming.tan@intel.com> > --- > IntelFsp2WrapperPkg/FspmWrapperPeim/FspmWrapperPeim.c | 2 +- > IntelFsp2WrapperPkg/FspsWrapperPeim/FspsWrapperPeim.c | 2 +- > 2 files changed, 2 insertions(+), 2 deletions(-) > > diff --git a/IntelFsp2WrapperPkg/FspmWrapperPeim/FspmWrapperPeim.c > b/IntelFsp2WrapperPkg/FspmWrapperPeim/FspmWrapperPeim.c > index ea206a7960..ba0c742fea 100644 > --- a/IntelFsp2WrapperPkg/FspmWrapperPeim/FspmWrapperPeim.c > +++ b/IntelFsp2WrapperPkg/FspmWrapperPeim/FspmWrapperPeim.c > @@ -217,7 +217,7 @@ FspmWrapperInit ( > ASSERT_EFI_ERROR (Status); PeiServicesInstallFvInfoPpi (- NULL,+ > &((EFI_FIRMWARE_VOLUME_HEADER *)(UINTN)PcdGet32 > (PcdFspmBaseAddress))->FileSystemGuid, (VOID *)(UINTN)PcdGet32 > (PcdFspmBaseAddress), (UINT32)((EFI_FIRMWARE_VOLUME_HEADER > *)(UINTN)PcdGet32 (PcdFspmBaseAddress))->FvLength, NULL,diff --git > a/IntelFsp2WrapperPkg/FspsWrapperPeim/FspsWrapperPeim.c > b/IntelFsp2WrapperPkg/FspsWrapperPeim/FspsWrapperPeim.c > index 091ddb697a..08fe0fdb7e 100644 > --- a/IntelFsp2WrapperPkg/FspsWrapperPeim/FspsWrapperPeim.c > +++ b/IntelFsp2WrapperPkg/FspsWrapperPeim/FspsWrapperPeim.c > @@ -438,7 +438,7 @@ FspsWrapperInitDispatchMode ( > // FSP-S Wrapper running in Dispatch mode and reports FSP-S FV to PEI > dispatcher. // PeiServicesInstallFvInfoPpi (- NULL,+ > &((EFI_FIRMWARE_VOLUME_HEADER *)(UINTN)PcdGet32 > (PcdFspsBaseAddress))->FileSystemGuid, (VOID *)(UINTN)PcdGet32 > (PcdFspsBaseAddress), (UINT32)((EFI_FIRMWARE_VOLUME_HEADER > *)(UINTN)PcdGet32 (PcdFspsBaseAddress))->FvLength, NULL,-- > 2.31.1.windows.1 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#105134): https://edk2.groups.io/g/devel/message/105134 Mute This Topic: https://groups.io/mt/99059532/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=-=-=-=-=-=-=-=-=-=-=-
Reviewed-by: S, Ashraf Ali <ashraf.ali.s@intel.com> -----Original Message----- From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Tan, Ming Sent: Monday, May 22, 2023 11:43 AM To: devel@edk2.groups.io Cc: Chiu, Chasel <chasel.chiu@intel.com>; Duggapu, Chinni B <chinni.b.duggapu@intel.com> Subject: [edk2-devel] [PATCH] IntelFsp2WrapperPkg: Fix ASSERT when FSP-S/M use FFS3 REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4458 Original code call PeiServicesInstallFvInfoPpi() with NULL for the FvFormat parameter, then PeiServicesInstallFvInfoPpi() will assume it use FFS2, then ASSERT if FSP-S/M use FFS3. Now set the FvFormat to the info got from FvHeader. Cc: Chasel Chiu <chasel.chiu@intel.com> Cc: Duggapu Chinni B <chinni.b.duggapu@intel.com> Signed-off-by: Ming Tan <ming.tan@intel.com> --- IntelFsp2WrapperPkg/FspmWrapperPeim/FspmWrapperPeim.c | 2 +- IntelFsp2WrapperPkg/FspsWrapperPeim/FspsWrapperPeim.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/IntelFsp2WrapperPkg/FspmWrapperPeim/FspmWrapperPeim.c b/IntelFsp2WrapperPkg/FspmWrapperPeim/FspmWrapperPeim.c index ea206a7960..ba0c742fea 100644 --- a/IntelFsp2WrapperPkg/FspmWrapperPeim/FspmWrapperPeim.c +++ b/IntelFsp2WrapperPkg/FspmWrapperPeim/FspmWrapperPeim.c @@ -217,7 +217,7 @@ FspmWrapperInit ( ASSERT_EFI_ERROR (Status); PeiServicesInstallFvInfoPpi (- NULL,+ &((EFI_FIRMWARE_VOLUME_HEADER *)(UINTN)PcdGet32 (PcdFspmBaseAddress))->FileSystemGuid, (VOID *)(UINTN)PcdGet32 (PcdFspmBaseAddress), (UINT32)((EFI_FIRMWARE_VOLUME_HEADER *)(UINTN)PcdGet32 (PcdFspmBaseAddress))->FvLength, NULL,diff --git a/IntelFsp2WrapperPkg/FspsWrapperPeim/FspsWrapperPeim.c b/IntelFsp2WrapperPkg/FspsWrapperPeim/FspsWrapperPeim.c index 091ddb697a..08fe0fdb7e 100644 --- a/IntelFsp2WrapperPkg/FspsWrapperPeim/FspsWrapperPeim.c +++ b/IntelFsp2WrapperPkg/FspsWrapperPeim/FspsWrapperPeim.c @@ -438,7 +438,7 @@ FspsWrapperInitDispatchMode ( // FSP-S Wrapper running in Dispatch mode and reports FSP-S FV to PEI dispatcher. // PeiServicesInstallFvInfoPpi (- NULL,+ &((EFI_FIRMWARE_VOLUME_HEADER *)(UINTN)PcdGet32 (PcdFspsBaseAddress))->FileSystemGuid, (VOID *)(UINTN)PcdGet32 (PcdFspsBaseAddress), (UINT32)((EFI_FIRMWARE_VOLUME_HEADER *)(UINTN)PcdGet32 (PcdFspsBaseAddress))->FvLength, NULL,-- 2.31.1.windows.1 -=-=-=-=-=-= Groups.io Links: You receive all messages sent to this group. View/Reply Online (#105101): https://edk2.groups.io/g/devel/message/105101 Mute This Topic: https://groups.io/mt/99059532/6226280 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [ashraf.ali.s@intel.com] -=-=-=-=-=-= -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#105114): https://edk2.groups.io/g/devel/message/105114 Mute This Topic: https://groups.io/mt/99059532/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=-=-=-=-=-=-=-=-=-=-=-
© 2016 - 2023 Red Hat, Inc.