summaryrefslogtreecommitdiff
path: root/Core/MdeModulePkg
diff options
context:
space:
mode:
authorLiming Gao <liming.gao@intel.com>2017-04-24 14:39:10 +0800
committerGuo Mang <mang.guo@intel.com>2017-07-12 11:24:26 +0800
commitca50b7ac7147b43d90ef66fd5536520faf16beed (patch)
tree701de8e8e3f15c5114a4257aeff5db962a9666ca /Core/MdeModulePkg
parent4402158b5c9bcbf4e70378841e126bd9cf5bd5d6 (diff)
downloadedk2-platforms-ca50b7ac7147b43d90ef66fd5536520faf16beed.tar.xz
MdeModulePkg: Update PiSmmCore to set correct ImageAddress into LoadedImage
Cc: Star Zeng <star.zeng@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Star Zeng <star.zeng@intel.com> (cherry picked from commit d5a67b3da18f815c83593d9329a353ec3a739d66)
Diffstat (limited to 'Core/MdeModulePkg')
-rw-r--r--Core/MdeModulePkg/Core/PiSmmCore/Dispatcher.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Core/MdeModulePkg/Core/PiSmmCore/Dispatcher.c b/Core/MdeModulePkg/Core/PiSmmCore/Dispatcher.c
index b2a6822048..f32bbbd1b4 100644
--- a/Core/MdeModulePkg/Core/PiSmmCore/Dispatcher.c
+++ b/Core/MdeModulePkg/Core/PiSmmCore/Dispatcher.c
@@ -596,7 +596,7 @@ SmmLoadImage (
}
CopyMem (DriverEntry->LoadedImage->FilePath, FilePath, GetDevicePathSize (FilePath));
- DriverEntry->LoadedImage->ImageBase = (VOID *)(UINTN)DriverEntry->ImageBuffer;
+ DriverEntry->LoadedImage->ImageBase = (VOID *)(UINTN) ImageContext.ImageAddress;
DriverEntry->LoadedImage->ImageSize = ImageContext.ImageSize;
DriverEntry->LoadedImage->ImageCodeType = EfiRuntimeServicesCode;
DriverEntry->LoadedImage->ImageDataType = EfiRuntimeServicesData;
@@ -615,7 +615,7 @@ SmmLoadImage (
}
CopyMem (DriverEntry->SmmLoadedImage.FilePath, FilePath, GetDevicePathSize(FilePath));
- DriverEntry->SmmLoadedImage.ImageBase = (VOID *)(UINTN)DriverEntry->ImageBuffer;
+ DriverEntry->SmmLoadedImage.ImageBase = (VOID *)(UINTN) ImageContext.ImageAddress;
DriverEntry->SmmLoadedImage.ImageSize = ImageContext.ImageSize;
DriverEntry->SmmLoadedImage.ImageCodeType = EfiRuntimeServicesCode;
DriverEntry->SmmLoadedImage.ImageDataType = EfiRuntimeServicesData;