UefiPayloadPkg/UefiPayloadEntry: Return image destination size as UINT32

This commit is contained in:
Marvin Häuser 2023-04-02 17:19:14 +02:00 committed by Mikhail Krichanov
parent a86d9d688e
commit e63fef0eea
1 changed files with 7 additions and 7 deletions

View File

@ -24,7 +24,7 @@ LoadUefiImage (
IN VOID *UefiImage, IN VOID *UefiImage,
IN UINT32 UefiImageSize, IN UINT32 UefiImageSize,
OUT EFI_PHYSICAL_ADDRESS *ImageAddress, OUT EFI_PHYSICAL_ADDRESS *ImageAddress,
OUT UINT64 *DestinationSize, OUT UINT32 *DestinationSize,
OUT EFI_PHYSICAL_ADDRESS *EntryPoint OUT EFI_PHYSICAL_ADDRESS *EntryPoint
) )
{ {
@ -234,7 +234,7 @@ LoadDxeCore (
VOID *UefiImage; VOID *UefiImage;
UINT32 UefiImageSize; UINT32 UefiImageSize;
EFI_PHYSICAL_ADDRESS ImageAddress; EFI_PHYSICAL_ADDRESS ImageAddress;
UINT64 DestinationSize; UINT32 DestinationSize;
PayloadFv = (EFI_FIRMWARE_VOLUME_HEADER *)(UINTN)PcdGet32 (PcdPayloadFdMemBase); PayloadFv = (EFI_FIRMWARE_VOLUME_HEADER *)(UINTN)PcdGet32 (PcdPayloadFdMemBase);
@ -299,10 +299,10 @@ UniversalLoadDxeCore (
{ {
EFI_STATUS Status; EFI_STATUS Status;
EFI_FFS_FILE_HEADER *FileHeader; EFI_FFS_FILE_HEADER *FileHeader;
VOID *UefiImage; VOID *UefiImage;
UINT32 UefiImageSize; UINT32 UefiImageSize;
EFI_PHYSICAL_ADDRESS ImageAddress; EFI_PHYSICAL_ADDRESS ImageAddress;
UINT64 ImageSize; UINT32 DestinationSize;
// //
// Find DXE core file from DXE FV // Find DXE core file from DXE FV
@ -320,12 +320,12 @@ UniversalLoadDxeCore (
// //
// Get DXE core info // Get DXE core info
// //
Status = LoadUefiImage (UefiImage, UefiImageSize, &ImageAddress, &ImageSize, DxeCoreEntryPoint); Status = LoadUefiImage (UefiImage, UefiImageSize, &ImageAddress, &DestinationSize, DxeCoreEntryPoint);
if (EFI_ERROR (Status)) { if (EFI_ERROR (Status)) {
return Status; return Status;
} }
BuildModuleHob (&FileHeader->Name, ImageAddress, EFI_SIZE_TO_PAGES ((UINT32)ImageSize) * EFI_PAGE_SIZE, *DxeCoreEntryPoint); BuildModuleHob (&FileHeader->Name, ImageAddress, DestinationSize, *DxeCoreEntryPoint);
return EFI_SUCCESS; return EFI_SUCCESS;
} }