// Set gInMemory global variable to TRUE to indicate the dxeipl is shadowed.\r
//\r
*(BOOLEAN *) ((UINTN) &gInMemory + (UINTN) DxeIplEntryPoint - (UINTN) _ModuleEntryPoint) = TRUE;\r
- Status = ((EFI_PEIM_ENTRY_POINT) (UINTN) DxeIplEntryPoint) ((EFI_PEI_FILE_HANDLE *) DxeIplFileHeader, GetPeiServicesTablePointer());\r
+ Status = ((EFI_PEIM_ENTRY_POINT2) (UINTN) DxeIplEntryPoint) ((EFI_PEI_FILE_HANDLE *) DxeIplFileHeader, GetPeiServicesTablePointer());\r
}\r
\r
return Status;\r
// Preprocess the FFS file to get a pointer to the PE32 information\r
// in the enclosed PE32 image.\r
//\r
- Status = PeiProcessFile (\r
- EFI_SECTION_PE32,\r
+ Status = PeiProcessFile (\r
+ EFI_SECTION_TE,\r
FfsHeader,\r
&Pe32Data,\r
NULL\r
);\r
-\r
if (EFI_ERROR (Status)) {\r
- return Status;\r
+ Status = PeiProcessFile (\r
+ EFI_SECTION_PE32,\r
+ FfsHeader,\r
+ &Pe32Data,\r
+ NULL\r
+ );\r
+ \r
+ if (EFI_ERROR (Status)) {\r
+ return Status;\r
+ }\r
}\r
//\r
// Load the PE image from the FFS file\r
EFI_STATUS Status;\r
UINT8 *DstBuffer;\r
UINT8 *ScratchBuffer;\r
- UINT32 DstBufferSize;\r
+ UINTN DstBufferSize;\r
UINT32 ScratchBufferSize;\r
EFI_COMMON_SECTION_HEADER *CmpSection;\r
UINTN CmpSectionLength;\r
DEBUG ((EFI_D_ERROR, "Extract section content failed - %r\n", Status));\r
return Status;\r
}\r
+ \r
//\r
// Todo check AuthenticationStatus and do the verify\r
//\r
Status = UefiDecompressGetInfo (\r
(UINT8 *) ((EFI_COMPRESSION_SECTION *) Section + 1),\r
(UINT32) SectionLength - sizeof (EFI_COMPRESSION_SECTION),\r
- &DstBufferSize,\r
+ (UINT32 *) &DstBufferSize,\r
&ScratchBufferSize\r
);\r
if (EFI_ERROR (Status)) {\r
EFI_STATUS Status;\r
UINT8 *ScratchBuffer;\r
UINT32 ScratchSize;\r
- UINT32 SectionLength; \r
+ UINT32 SectionLength;\r
+ UINT32 DestinationSize; \r
\r
//\r
// Set authentic value to zero.\r
(GUID *) ((UINT8 *) InputSection + sizeof (EFI_COMMON_SECTION_HEADER)),\r
(UINT8 *) InputSection + sizeof (EFI_GUID_DEFINED_SECTION),\r
SectionLength - sizeof (EFI_GUID_DEFINED_SECTION),\r
- OutputSize,\r
+ &DestinationSize,\r
&ScratchSize\r
);\r
if (EFI_ERROR (Status)) {\r
//\r
// Allocate destination buffer\r
//\r
+ *OutputSize = (UINTN) DestinationSize;\r
*OutputBuffer = AllocatePages (EFI_SIZE_TO_PAGES (*OutputSize));\r
if (*OutputBuffer == NULL) {\r
return EFI_OUT_OF_RESOURCES;\r