From 82f0f411c7912de105d1484fd294bde8aacb6c1e Mon Sep 17 00:00:00 2001 From: Jiewen Yao Date: Tue, 23 Feb 2016 12:43:57 +0800 Subject: 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" Tested-by: Ard Biesheuvel Reviewed-by: Liming Gao --- MdeModulePkg/Core/Dxe/Misc/MemoryAttributesTable.c | 6 ------ 1 file changed, 6 deletions(-) (limited to 'MdeModulePkg/Core/Dxe/Misc/MemoryAttributesTable.c') diff --git a/MdeModulePkg/Core/Dxe/Misc/MemoryAttributesTable.c b/MdeModulePkg/Core/Dxe/Misc/MemoryAttributesTable.c index c84146a8e8..416ed3dca8 100644 --- a/MdeModulePkg/Core/Dxe/Misc/MemoryAttributesTable.c +++ b/MdeModulePkg/Core/Dxe/Misc/MemoryAttributesTable.c @@ -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; } /** -- cgit v1.2.3