diff options
author | Jiewen Yao <jiewen.yao@intel.com> | 2016-11-30 23:20:46 +0800 |
---|---|---|
committer | Jiewen Yao <jiewen.yao@intel.com> | 2016-12-07 13:13:54 +0800 |
commit | f1afa0a92d12ed307cb4f7189bcc7ec6abf8e90a (patch) | |
tree | dc139d09bf99996175f14b08d2eaf4e6b531e1c7 /MdeModulePkg | |
parent | 92b126ae3da5c4f5388651cf6251a3382f0aeda3 (diff) | |
download | edk2-platforms-f1afa0a92d12ed307cb4f7189bcc7ec6abf8e90a.tar.xz |
MdeModulePkg/PiSmmCore: use EfiPagesToSize to prevent build error.
EFI_PAGES_TO_SIZE only handles UINTN, so we use EfiPagesToSize
to handle UINT64.
Cc: Jeff Fan <jeff.fan@intel.com>
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Laszlo Ersek <lersek@redhat.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jiewen Yao <jiewen.yao@intel.com>
Reviewed-by: Jeff Fan <jeff.fan@intel.com>
Regression-tested-by: Laszlo Ersek <lersek@redhat.com>
Diffstat (limited to 'MdeModulePkg')
-rw-r--r-- | MdeModulePkg/Core/PiSmmCore/MemoryAttributesTable.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/MdeModulePkg/Core/PiSmmCore/MemoryAttributesTable.c b/MdeModulePkg/Core/PiSmmCore/MemoryAttributesTable.c index 10820ca2db..f8edb78157 100644 --- a/MdeModulePkg/Core/PiSmmCore/MemoryAttributesTable.c +++ b/MdeModulePkg/Core/PiSmmCore/MemoryAttributesTable.c @@ -138,7 +138,7 @@ SmmMemoryAttributesTableConsistencyCheck ( if (Address != 0) {
ASSERT (Address == MemoryMap->PhysicalStart);
}
- Address = MemoryMap->PhysicalStart + EFI_PAGES_TO_SIZE(MemoryMap->NumberOfPages);
+ Address = MemoryMap->PhysicalStart + EfiPagesToSize(MemoryMap->NumberOfPages);
MemoryMap = NEXT_MEMORY_DESCRIPTOR(MemoryMap, DescriptorSize);
}
}
@@ -1077,7 +1077,7 @@ SmmInsertImageRecord ( // Step 1: record whole region
//
ImageRecord->ImageBase = DriverEntry->ImageBuffer;
- ImageRecord->ImageSize = EFI_PAGES_TO_SIZE(DriverEntry->NumberOfPage);
+ ImageRecord->ImageSize = EfiPagesToSize(DriverEntry->NumberOfPage);
ImageAddress = (VOID *)(UINTN)DriverEntry->ImageBuffer;
@@ -1281,7 +1281,7 @@ SmmRemoveImageRecord ( DEBUG ((DEBUG_VERBOSE, "SMM RemoveImageRecord - 0x%x\n", DriverEntry));
DEBUG ((DEBUG_VERBOSE, "SMM RemoveImageRecord - 0x%016lx - 0x%016lx\n", DriverEntry->ImageBuffer, DriverEntry->NumberOfPage));
- ImageRecord = FindImageRecord (DriverEntry->ImageBuffer, EFI_PAGES_TO_SIZE(DriverEntry->NumberOfPage));
+ ImageRecord = FindImageRecord (DriverEntry->ImageBuffer, EfiPagesToSize(DriverEntry->NumberOfPage));
if (ImageRecord == NULL) {
DEBUG ((DEBUG_ERROR, "SMM !!!!!!!! ImageRecord not found !!!!!!!!\n"));
return ;
|