MdeModulePkg/PiSmmCore: switch to MdePkg allocation granularity macros
Remove the local definitions for the default and runtime page allocation granularity macros, and switch to the new MdePkg versions. Note that this replaces a reference to the 'default' version with the more correct 'runtime' version, but this matters little in practice. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
This commit is contained in:
@ -795,7 +795,7 @@ SetMemoryAttributesTableSectionAlignment (
|
||||
IN UINT32 SectionAlignment
|
||||
)
|
||||
{
|
||||
if (((SectionAlignment & (EFI_ACPI_RUNTIME_PAGE_ALLOCATION_ALIGNMENT - 1)) != 0) &&
|
||||
if (((SectionAlignment & (RUNTIME_PAGE_ALLOCATION_GRANULARITY - 1)) != 0) &&
|
||||
((mMemoryProtectionAttribute & EFI_MEMORY_ATTRIBUTES_RUNTIME_MEMORY_PROTECTION_NON_EXECUTABLE_PE_DATA) != 0)) {
|
||||
DEBUG ((DEBUG_VERBOSE, "SMM SetMemoryAttributesTableSectionAlignment - Clear\n"));
|
||||
mMemoryProtectionAttribute &= ~((UINT64)EFI_MEMORY_ATTRIBUTES_RUNTIME_MEMORY_PROTECTION_NON_EXECUTABLE_PE_DATA);
|
||||
@ -1125,9 +1125,9 @@ SmmInsertImageRecord (
|
||||
}
|
||||
|
||||
SetMemoryAttributesTableSectionAlignment (SectionAlignment);
|
||||
if ((SectionAlignment & (EFI_ACPI_RUNTIME_PAGE_ALLOCATION_ALIGNMENT - 1)) != 0) {
|
||||
if ((SectionAlignment & (RUNTIME_PAGE_ALLOCATION_GRANULARITY - 1)) != 0) {
|
||||
DEBUG ((DEBUG_WARN, "SMM !!!!!!!! InsertImageRecord - Section Alignment(0x%x) is not %dK !!!!!!!!\n",
|
||||
SectionAlignment, EFI_ACPI_RUNTIME_PAGE_ALLOCATION_ALIGNMENT >> 10));
|
||||
SectionAlignment, RUNTIME_PAGE_ALLOCATION_GRANULARITY >> 10));
|
||||
PdbPointer = PeCoffLoaderGetPdbPointer ((VOID*) (UINTN) ImageAddress);
|
||||
if (PdbPointer != NULL) {
|
||||
DEBUG ((DEBUG_WARN, "SMM !!!!!!!! Image - %a !!!!!!!!\n", PdbPointer));
|
||||
|
Reference in New Issue
Block a user