X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=blobdiff_plain;f=MdeModulePkg%2FCore%2FDxeIplPeim%2FDxeLoad.c;h=8d3c29a5798fce41a5ab2b0689935487a66e984f;hp=381d60cb2aa3ea48a8aedafa81dcf1f4d20cfd2f;hb=1c9d209fc4f1b234fe3eab44281e816e97a92a55;hpb=88ce0209fc1f4dd183c52095d2c186f31633bad5 diff --git a/MdeModulePkg/Core/DxeIplPeim/DxeLoad.c b/MdeModulePkg/Core/DxeIplPeim/DxeLoad.c index 381d60cb2a..8d3c29a579 100644 --- a/MdeModulePkg/Core/DxeIplPeim/DxeLoad.c +++ b/MdeModulePkg/Core/DxeIplPeim/DxeLoad.c @@ -538,7 +538,7 @@ Returns: // Set gInMemory global variable to TRUE to indicate the dxeipl is shadowed. // *(BOOLEAN *) ((UINTN) &gInMemory + (UINTN) DxeIplEntryPoint - (UINTN) _ModuleEntryPoint) = TRUE; - Status = ((EFI_PEIM_ENTRY_POINT) (UINTN) DxeIplEntryPoint) ((EFI_PEI_FILE_HANDLE *) DxeIplFileHeader, GetPeiServicesTablePointer()); + Status = ((EFI_PEIM_ENTRY_POINT2) (UINTN) DxeIplEntryPoint) ((EFI_PEI_FILE_HANDLE *) DxeIplFileHeader, GetPeiServicesTablePointer()); } return Status; @@ -593,15 +593,23 @@ Returns: // Preprocess the FFS file to get a pointer to the PE32 information // in the enclosed PE32 image. // - Status = PeiProcessFile ( - EFI_SECTION_PE32, + Status = PeiProcessFile ( + EFI_SECTION_TE, FfsHeader, &Pe32Data, NULL ); - if (EFI_ERROR (Status)) { - return Status; + Status = PeiProcessFile ( + EFI_SECTION_PE32, + FfsHeader, + &Pe32Data, + NULL + ); + + if (EFI_ERROR (Status)) { + return Status; + } } // // Load the PE image from the FFS file @@ -647,7 +655,7 @@ Returns: EFI_STATUS Status; UINT8 *DstBuffer; UINT8 *ScratchBuffer; - UINT32 DstBufferSize; + UINTN DstBufferSize; UINT32 ScratchBufferSize; EFI_COMMON_SECTION_HEADER *CmpSection; UINTN CmpSectionLength; @@ -736,6 +744,7 @@ Returns: DEBUG ((EFI_D_ERROR, "Extract section content failed - %r\n", Status)); return Status; } + // // Todo check AuthenticationStatus and do the verify // @@ -754,7 +763,7 @@ Returns: Status = UefiDecompressGetInfo ( (UINT8 *) ((EFI_COMPRESSION_SECTION *) Section + 1), (UINT32) SectionLength - sizeof (EFI_COMPRESSION_SECTION), - &DstBufferSize, + (UINT32 *) &DstBufferSize, &ScratchBufferSize ); if (EFI_ERROR (Status)) {