summaryrefslogtreecommitdiffstats
path: root/MdeModulePkg
diff options
context:
space:
mode:
authorMichael Kubacki <michael.kubacki@microsoft.com>2021-08-14 04:01:32 +0800
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2021-08-27 08:32:20 +0000
commit82f7e315d612399f65a3bedd3b2c0364b43b6929 (patch)
tree6de111e8ea95dbf6f761452fdded191458a0fe35 /MdeModulePkg
parent7b4a99be8a39c12d3a7fc4b8db9f0eab4ac688d5 (diff)
downloadedk2-82f7e315d612399f65a3bedd3b2c0364b43b6929.tar.gz
edk2-82f7e315d612399f65a3bedd3b2c0364b43b6929.tar.bz2
edk2-82f7e315d612399f65a3bedd3b2c0364b43b6929.zip
MdeModulePkg/PeiCore: Remove MigrateSecModulesInFv()
REF:https://bugzilla.tianocore.org/show_bug.cgi?id=3564 This function has not been called since it was added in commit 9bedaec. If the function were to remain, it would need to be re-evaluated and tested. This change removes the function since it is not being used. Cc: Jian J Wang <jian.j.wang@intel.com> Cc: Hao A Wu <hao.a.wu@intel.com> Cc: Dandan Bi <dandan.bi@intel.com> Cc: Liming Gao <gaoliming@byosoft.com.cn> Cc: Debkumar De <debkumar.de@intel.com> Cc: Harry Han <harry.han@intel.com> Cc: Catharine West <catharine.west@intel.com> Cc: Marvin H?user <mhaeuser@posteo.de> Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com> Reviewed-by: Hao A Wu <hao.a.wu@intel.com>
Diffstat (limited to 'MdeModulePkg')
-rw-r--r--MdeModulePkg/Core/Pei/Dispatcher/Dispatcher.c96
1 files changed, 0 insertions, 96 deletions
diff --git a/MdeModulePkg/Core/Pei/Dispatcher/Dispatcher.c b/MdeModulePkg/Core/Pei/Dispatcher/Dispatcher.c
index 3369585bcc..61d4b67c64 100644
--- a/MdeModulePkg/Core/Pei/Dispatcher/Dispatcher.c
+++ b/MdeModulePkg/Core/Pei/Dispatcher/Dispatcher.c
@@ -1058,102 +1058,6 @@ ConvertStatusCodeCallbacks (
}
/**
- Migrates SEC modules in the given firmware volume.
-
- Migrating SECURITY_CORE files requires special treatment since they are not tracked for PEI dispatch.
-
- This functioun should be called after the FV has been copied to its post-memory location and the PEI Core FV list has
- been updated.
-
- @param Private Pointer to the PeiCore's private data structure.
- @param FvIndex The firmware volume index to migrate.
- @param OrgFvHandle The handle to the firmware volume in temporary memory.
-
- @retval EFI_SUCCESS SEC modules were migrated successfully
- @retval EFI_INVALID_PARAMETER The Private pointer is NULL or FvCount is invalid.
- @retval EFI_NOT_FOUND Can't find valid FFS header.
-
-**/
-EFI_STATUS
-EFIAPI
-MigrateSecModulesInFv (
- IN PEI_CORE_INSTANCE *Private,
- IN UINTN FvIndex,
- IN UINTN OrgFvHandle
- )
-{
- EFI_STATUS Status;
- EFI_STATUS FindFileStatus;
- EFI_PEI_FILE_HANDLE MigratedFileHandle;
- EFI_PEI_FILE_HANDLE FileHandle;
- UINT32 SectionAuthenticationStatus;
- UINT32 FileSize;
- VOID *OrgPe32SectionData;
- VOID *Pe32SectionData;
- EFI_FFS_FILE_HEADER *FfsFileHeader;
- EFI_COMMON_SECTION_HEADER *Section;
- BOOLEAN IsFfs3Fv;
- UINTN SectionInstance;
-
- if (Private == NULL || FvIndex >= Private->FvCount) {
- return EFI_INVALID_PARAMETER;
- }
-
- do {
- FindFileStatus = PeiFfsFindNextFile (
- GetPeiServicesTablePointer (),
- EFI_FV_FILETYPE_SECURITY_CORE,
- Private->Fv[FvIndex].FvHandle,
- &MigratedFileHandle
- );
- if (!EFI_ERROR (FindFileStatus ) && MigratedFileHandle != NULL) {
- FileHandle = (EFI_PEI_FILE_HANDLE) ((UINTN) MigratedFileHandle - (UINTN) Private->Fv[FvIndex].FvHandle + OrgFvHandle);
- FfsFileHeader = (EFI_FFS_FILE_HEADER *) MigratedFileHandle;
-
- DEBUG ((DEBUG_VERBOSE, " Migrating SEC_CORE MigratedFileHandle at 0x%x.\n", (UINTN) MigratedFileHandle));
- DEBUG ((DEBUG_VERBOSE, " FileHandle at 0x%x.\n", (UINTN) FileHandle));
-
- IsFfs3Fv = CompareGuid (&Private->Fv[FvIndex].FvHeader->FileSystemGuid, &gEfiFirmwareFileSystem3Guid);
- if (IS_FFS_FILE2 (FfsFileHeader)) {
- ASSERT (FFS_FILE2_SIZE (FfsFileHeader) > 0x00FFFFFF);
- if (!IsFfs3Fv) {
- DEBUG ((DEBUG_ERROR, "It is a FFS3 formatted file: %g in a non-FFS3 formatted FV.\n", &FfsFileHeader->Name));
- return EFI_NOT_FOUND;
- }
- Section = (EFI_COMMON_SECTION_HEADER *) ((UINT8 *) FfsFileHeader + sizeof (EFI_FFS_FILE_HEADER2));
- FileSize = FFS_FILE2_SIZE (FfsFileHeader) - sizeof (EFI_FFS_FILE_HEADER2);
- } else {
- Section = (EFI_COMMON_SECTION_HEADER *) ((UINT8 *) FfsFileHeader + sizeof (EFI_FFS_FILE_HEADER));
- FileSize = FFS_FILE_SIZE (FfsFileHeader) - sizeof (EFI_FFS_FILE_HEADER);
- }
-
- SectionInstance = 1;
- SectionAuthenticationStatus = 0;
- Status = ProcessSection (
- GetPeiServicesTablePointer (),
- EFI_SECTION_PE32,
- &SectionInstance,
- Section,
- FileSize,
- &Pe32SectionData,
- &SectionAuthenticationStatus,
- IsFfs3Fv
- );
-
- if (!EFI_ERROR (Status)) {
- OrgPe32SectionData = (VOID *) ((UINTN) Pe32SectionData - (UINTN) MigratedFileHandle + (UINTN) FileHandle);
- DEBUG ((DEBUG_VERBOSE, " PE32 section in migrated file at 0x%x.\n", (UINTN) Pe32SectionData));
- DEBUG ((DEBUG_VERBOSE, " PE32 section in original file at 0x%x.\n", (UINTN) OrgPe32SectionData));
- Status = LoadAndRelocatePeCoffImageInPlace (OrgPe32SectionData, Pe32SectionData);
- ASSERT_EFI_ERROR (Status);
- }
- }
- } while (!EFI_ERROR (FindFileStatus));
-
- return EFI_SUCCESS;
-}
-
-/**
Migrates PEIMs in the given firmware volume.
@param Private Pointer to the PeiCore's private data structure.