MdeModulePkg: Fix Memory Attributes table type issue
According to the spec, each entry in the Memory Attributes table shall have the same type as the region it was carved out of in the UEFI memory map. The current attribute uses RTData for PE Data, but it should be RTCode. This patch fixed the issue. It is validated with or without PropertiesTable. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: "Yao, Jiewen" <jiewen.yao@intel.com> Tested-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Liming Gao <liming.gao@intel.com>
This commit is contained in:
@@ -72,8 +72,6 @@ CoreGetMemoryMapPropertiesTable (
|
||||
|
||||
extern EFI_PROPERTIES_TABLE mPropertiesTable;
|
||||
|
||||
BOOLEAN mIsConstructingMemoryAttributesTable = FALSE;
|
||||
|
||||
/**
|
||||
Install MemoryAttributesTable.
|
||||
|
||||
@@ -105,8 +103,6 @@ InstallMemoryAttributesTable (
|
||||
return ;
|
||||
}
|
||||
|
||||
mIsConstructingMemoryAttributesTable = TRUE;
|
||||
|
||||
MemoryMapSize = 0;
|
||||
MemoryMap = NULL;
|
||||
Status = CoreGetMemoryMapPropertiesTable (
|
||||
@@ -181,8 +177,6 @@ InstallMemoryAttributesTable (
|
||||
|
||||
Status = gBS->InstallConfigurationTable (&gEfiMemoryAttributesTableGuid, MemoryAttributesTable);
|
||||
ASSERT_EFI_ERROR (Status);
|
||||
|
||||
mIsConstructingMemoryAttributesTable = FALSE;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user