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:
Jiewen Yao
2016-02-23 12:43:57 +08:00
committed by Hao Wu
parent 97033ebfa3
commit 82f0f411c7
2 changed files with 37 additions and 83 deletions

View File

@@ -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;
}
/**