// Map the rest of the FD as read/write
res2 = mmap (
- (void *)(FixedPcdGet64 (PcdEmuFlashFvRecoveryBase) + FvSize),
+ (void *)(UINTN)(FixedPcdGet64 (PcdEmuFlashFvRecoveryBase) + FvSize),
FileSize - FvSize,
PROT_READ | PROT_WRITE | PROT_EXEC,
MAP_SHARED,
}
if (ImageContext.ImageAddress != (UINTN)Pe32Data) {
- //
- // Relocate image to match the address where it resides
- //
- ImageContext.ImageAddress = (UINTN)Pe32Data;
- Status = PeCoffLoaderLoadImage (&ImageContext);
- if (EFI_ERROR (Status)) {
- return Status;
- }
+ //
+ // Relocate image to match the address where it resides
+ //
+ ImageContext.ImageAddress = (UINTN)Pe32Data;
+ Status = PeCoffLoaderLoadImage (&ImageContext);
+ if (EFI_ERROR (Status)) {
+ return Status;
+ }
- Status = PeCoffLoaderRelocateImage (&ImageContext);
- if (EFI_ERROR (Status)) {
- return Status;
- }
+ Status = PeCoffLoaderRelocateImage (&ImageContext);
+ if (EFI_ERROR (Status)) {
+ return Status;
+ }
} else {
//
// Or just return image entry point