diff options
Diffstat (limited to 'IntelFspWrapperPkg/FspNotifyDxe/FspNotifyDxe.c')
-rw-r--r-- | IntelFspWrapperPkg/FspNotifyDxe/FspNotifyDxe.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/IntelFspWrapperPkg/FspNotifyDxe/FspNotifyDxe.c b/IntelFspWrapperPkg/FspNotifyDxe/FspNotifyDxe.c index f8e8e826f1..1a1e4e6258 100644 --- a/IntelFspWrapperPkg/FspNotifyDxe/FspNotifyDxe.c +++ b/IntelFspWrapperPkg/FspNotifyDxe/FspNotifyDxe.c @@ -23,6 +23,22 @@ #include <Library/UefiLib.h>
#include <Library/FspApiLib.h>
+/**
+ Relocate this image under 4G memory.
+
+ @param ImageHandle Handle of driver image.
+ @param SystemTable Pointer to system table.
+
+ @retval EFI_SUCCESS Image successfully relocated.
+ @retval EFI_ABORTED Failed to relocate image.
+
+**/
+EFI_STATUS
+RelocateImageUnder4GIfNeeded (
+ IN EFI_HANDLE ImageHandle,
+ IN EFI_SYSTEM_TABLE *SystemTable
+ );
+
FSP_INFO_HEADER *mFspHeader = NULL;
/**
@@ -120,6 +136,14 @@ FspDxeEntryPoint ( VOID *Registration;
EFI_EVENT ProtocolNotifyEvent;
+ //
+ // Load this driver's image to memory
+ //
+ Status = RelocateImageUnder4GIfNeeded (ImageHandle, SystemTable);
+ if (EFI_ERROR (Status)) {
+ return EFI_SUCCESS;
+ }
+
if (PcdGet32 (PcdFlashFvSecondFspBase) == 0) {
mFspHeader = FspFindFspHeader (PcdGet32 (PcdFlashFvFspBase));
} else {
|