Skip to content

Commit

Permalink
IntelFsp2WrapperPkg: Fix ASSERT when FSP-S/M use FFS3.
Browse files Browse the repository at this point in the history
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>
Reviewed-by: S Ashraf Ali <ashraf.ali.s@intel.com>
Reviewed-by: Chasel Chiu <chasel.chiu@intel.com>
  • Loading branch information
tanminger authored and mergify[bot] committed May 30, 2023
1 parent 9d9761a commit 69e10f0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion IntelFsp2WrapperPkg/FspmWrapperPeim/FspmWrapperPeim.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion IntelFsp2WrapperPkg/FspsWrapperPeim/FspsWrapperPeim.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 69e10f0

Please sign in to comment.