]> git.proxmox.com Git - mirror_edk2.git/commitdiff
MdeModulePkg/PropertiesTableAttributesDxe: Remove this driver
authorShenglei Zhang <shenglei.zhang@intel.com>
Mon, 18 Feb 2019 08:20:37 +0000 (16:20 +0800)
committerLiming Gao <liming.gao@intel.com>
Tue, 19 Feb 2019 08:15:23 +0000 (16:15 +0800)
This functionality of this driver has been deprecated and
no platform employs this driver. It can be removed completely.
https://bugzilla.tianocore.org/show_bug.cgi?id=1475

Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Hao Wu <hao.a.wu@intel.com>
Cc: Ray Ni <ray.ni@intel.com>
Cc: Star Zeng <star.zeng@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Shenglei Zhang <shenglei.zhang@intel.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Jian J Wang <jian.j.wang@intel.com>
MdeModulePkg/MdeModulePkg.dsc
MdeModulePkg/Universal/PropertiesTableAttributesDxe/PropertiesTableAttributesDxe.c [deleted file]
MdeModulePkg/Universal/PropertiesTableAttributesDxe/PropertiesTableAttributesDxe.inf [deleted file]
MdeModulePkg/Universal/PropertiesTableAttributesDxe/PropertiesTableAttributesDxe.uni [deleted file]
MdeModulePkg/Universal/PropertiesTableAttributesDxe/PropertiesTableAttributesDxeExtra.uni [deleted file]

index 4f2ac8ae89d96c996a03e0fc588a60e3b9f0f50c..388bca25bd8780e9ceda03953444e981bb2ce932 100644 (file)
   MdeModulePkg/Universal/EsrtDxe/EsrtDxe.inf\r
   MdeModulePkg/Universal/EsrtFmpDxe/EsrtFmpDxe.inf\r
 \r
-  MdeModulePkg/Universal/PropertiesTableAttributesDxe/PropertiesTableAttributesDxe.inf\r
   MdeModulePkg/Universal/FileExplorerDxe/FileExplorerDxe.inf  {\r
     <LibraryClasses>\r
       FileExplorerLib|MdeModulePkg/Library/FileExplorerLib/FileExplorerLib.inf\r
diff --git a/MdeModulePkg/Universal/PropertiesTableAttributesDxe/PropertiesTableAttributesDxe.c b/MdeModulePkg/Universal/PropertiesTableAttributesDxe/PropertiesTableAttributesDxe.c
deleted file mode 100644 (file)
index 4d1a46f..0000000
+++ /dev/null
@@ -1,208 +0,0 @@
-/** @file\r
-  This module sets default policy for attributes of EfiACPIMemoryNVS and EfiReservedMemoryType.\r
-\r
-  This module sets EFI_MEMORY_XP for attributes of EfiACPIMemoryNVS and EfiReservedMemoryType\r
-  in UEFI memory map, if and only of PropertiesTable is published and has BIT0 set.\r
-\r
-Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.<BR>\r
-This program and the accompanying materials\r
-are licensed and made available under the terms and conditions of the BSD License\r
-which accompanies this distribution.  The full text of the license may be found at\r
-http://opensource.org/licenses/bsd-license.php\r
-\r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-\r
-**/\r
-\r
-#include <Uefi.h>\r
-#include <Library/DebugLib.h>\r
-#include <Library/UefiBootServicesTableLib.h>\r
-#include <Library/DxeServicesTableLib.h>\r
-#include <Library/UefiLib.h>\r
-#include <Library/MemoryAllocationLib.h>\r
-#include <Guid/EventGroup.h>\r
-#include <Guid/PropertiesTable.h>\r
-\r
-/**\r
-  Converts a number of EFI_PAGEs to a size in bytes.\r
-\r
-  NOTE: Do not use EFI_PAGES_TO_SIZE because it handles UINTN only.\r
-\r
-  @param  Pages     The number of EFI_PAGES.\r
-\r
-  @return  The number of bytes associated with the number of EFI_PAGEs specified\r
-           by Pages.\r
-**/\r
-UINT64\r
-EfiPagesToSize (\r
-  IN UINT64 Pages\r
-  )\r
-{\r
-  return LShiftU64 (Pages, EFI_PAGE_SHIFT);\r
-}\r
-\r
-/**\r
-  Set memory attributes according to default policy.\r
-\r
-  @param  MemoryMap        A pointer to the buffer in which firmware places the current memory map.\r
-  @param  MemoryMapSize    Size, in bytes, of the MemoryMap buffer.\r
-  @param  DescriptorSize   size, in bytes, of an individual EFI_MEMORY_DESCRIPTOR.\r
-**/\r
-VOID\r
-SetMemorySpaceAttributesDefault (\r
-  IN EFI_MEMORY_DESCRIPTOR  *MemoryMap,\r
-  IN UINTN                  MemoryMapSize,\r
-  IN UINTN                  DescriptorSize\r
-  )\r
-{\r
-  EFI_MEMORY_DESCRIPTOR       *MemoryMapEntry;\r
-  EFI_MEMORY_DESCRIPTOR       *MemoryMapEnd;\r
-  EFI_STATUS                  Status;\r
-\r
-  DEBUG ((EFI_D_INFO, "SetMemorySpaceAttributesDefault\n"));\r
-\r
-  MemoryMapEntry = MemoryMap;\r
-  MemoryMapEnd   = (EFI_MEMORY_DESCRIPTOR *) ((UINT8 *) MemoryMap + MemoryMapSize);\r
-  while ((UINTN)MemoryMapEntry < (UINTN)MemoryMapEnd) {\r
-    if (MemoryMapEntry->PhysicalStart < BASE_1MB) {\r
-      //\r
-      // Do not touch memory space below 1MB\r
-      //\r
-      MemoryMapEntry = NEXT_MEMORY_DESCRIPTOR (MemoryMapEntry, DescriptorSize);\r
-      continue;\r
-    }\r
-    switch (MemoryMapEntry->Type) {\r
-    case EfiRuntimeServicesCode:\r
-    case EfiRuntimeServicesData:\r
-      //\r
-      // should be handled later;\r
-      //\r
-      break;\r
-    case EfiReservedMemoryType:\r
-    case EfiACPIMemoryNVS:\r
-      //\r
-      // Handle EfiReservedMemoryType and EfiACPIMemoryNVS, because there might be firmware executable there.\r
-      //\r
-      DEBUG ((EFI_D_INFO, "SetMemorySpaceAttributes - %016lx - %016lx (%016lx) ...\n",\r
-        MemoryMapEntry->PhysicalStart,\r
-        MemoryMapEntry->PhysicalStart + EfiPagesToSize (MemoryMapEntry->NumberOfPages),\r
-        MemoryMapEntry->Attribute\r
-        ));\r
-      Status = gDS->SetMemorySpaceCapabilities (\r
-                      MemoryMapEntry->PhysicalStart,\r
-                      EfiPagesToSize (MemoryMapEntry->NumberOfPages),\r
-                      MemoryMapEntry->Attribute | EFI_MEMORY_XP\r
-                      );\r
-      DEBUG ((EFI_D_INFO, "SetMemorySpaceCapabilities - %r\n", Status));\r
-      break;\r
-    }\r
-\r
-    MemoryMapEntry = NEXT_MEMORY_DESCRIPTOR (MemoryMapEntry, DescriptorSize);\r
-  }\r
-\r
-  return ;\r
-}\r
-\r
-/**\r
-  Update memory attributes according to default policy.\r
-\r
-  @param[in]  Event     The Event this notify function registered to.\r
-  @param[in]  Context   Pointer to the context data registered to the Event.\r
-**/\r
-VOID\r
-EFIAPI\r
-UpdateMemoryAttributesDefault (\r
-  EFI_EVENT                               Event,\r
-  VOID                                    *Context\r
-  )\r
-{\r
-  EFI_STATUS                  Status;\r
-  EFI_MEMORY_DESCRIPTOR       *MemoryMap;\r
-  UINTN                       MemoryMapSize;\r
-  UINTN                       MapKey;\r
-  UINTN                       DescriptorSize;\r
-  UINT32                      DescriptorVersion;\r
-  EFI_PROPERTIES_TABLE        *PropertiesTable;\r
-\r
-  DEBUG ((EFI_D_INFO, "UpdateMemoryAttributesDefault\n"));\r
-  Status = EfiGetSystemConfigurationTable (&gEfiPropertiesTableGuid, (VOID **) &PropertiesTable);\r
-  if (EFI_ERROR (Status)) {\r
-    goto Done;\r
-  }\r
-\r
-  ASSERT (PropertiesTable != NULL);\r
-\r
-  DEBUG ((EFI_D_INFO, "MemoryProtectionAttribute - 0x%016lx\n", PropertiesTable->MemoryProtectionAttribute));\r
-  if ((PropertiesTable->MemoryProtectionAttribute & EFI_PROPERTIES_RUNTIME_MEMORY_PROTECTION_NON_EXECUTABLE_PE_DATA) == 0) {\r
-    goto Done;\r
-  }\r
-\r
-  //\r
-  // Get the EFI memory map.\r
-  //\r
-  MemoryMapSize  = 0;\r
-  MemoryMap      = NULL;\r
-  Status = gBS->GetMemoryMap (\r
-                  &MemoryMapSize,\r
-                  MemoryMap,\r
-                  &MapKey,\r
-                  &DescriptorSize,\r
-                  &DescriptorVersion\r
-                  );\r
-  ASSERT (Status == EFI_BUFFER_TOO_SMALL);\r
-  do {\r
-    MemoryMap = (EFI_MEMORY_DESCRIPTOR *) AllocatePool (MemoryMapSize);\r
-    ASSERT (MemoryMap != NULL);\r
-    Status = gBS->GetMemoryMap (\r
-                    &MemoryMapSize,\r
-                    MemoryMap,\r
-                    &MapKey,\r
-                    &DescriptorSize,\r
-                    &DescriptorVersion\r
-                    );\r
-    if (EFI_ERROR (Status)) {\r
-      FreePool (MemoryMap);\r
-    }\r
-  } while (Status == EFI_BUFFER_TOO_SMALL);\r
-  ASSERT_EFI_ERROR (Status);\r
-\r
-  SetMemorySpaceAttributesDefault (MemoryMap, MemoryMapSize, DescriptorSize);\r
-\r
-Done:\r
-  gBS->CloseEvent (Event);\r
-\r
-  return ;\r
-}\r
-\r
-/**\r
-  The entrypoint of properties table attribute driver.\r
-\r
-  @param  ImageHandle    The firmware allocated handle for the EFI image.\r
-  @param  SystemTable    A pointer to the EFI System Table.\r
-\r
-  @retval EFI_SUCCESS    It always returns EFI_SUCCESS.\r
-\r
-**/\r
-EFI_STATUS\r
-EFIAPI\r
-InitializePropertiesTableAttributesDxe (\r
-  IN EFI_HANDLE        ImageHandle,\r
-  IN EFI_SYSTEM_TABLE  *SystemTable\r
-  )\r
-{\r
-  EFI_STATUS  Status;\r
-  EFI_EVENT   ReadyToBootEvent;\r
-\r
-  Status = gBS->CreateEventEx (\r
-                  EVT_NOTIFY_SIGNAL,\r
-                  TPL_CALLBACK,\r
-                  UpdateMemoryAttributesDefault,\r
-                  NULL,\r
-                  &gEfiEventReadyToBootGuid,\r
-                  &ReadyToBootEvent\r
-                  );\r
-  ASSERT_EFI_ERROR (Status);\r
-\r
-  return EFI_SUCCESS;\r
-}\r
diff --git a/MdeModulePkg/Universal/PropertiesTableAttributesDxe/PropertiesTableAttributesDxe.inf b/MdeModulePkg/Universal/PropertiesTableAttributesDxe/PropertiesTableAttributesDxe.inf
deleted file mode 100644 (file)
index a8edf85..0000000
+++ /dev/null
@@ -1,56 +0,0 @@
-## @file\r
-# This module sets default policy for attributes of EfiACPIMemoryNVS and EfiReservedMemoryType.\r
-#\r
-# This module sets EFI_MEMORY_XP for attributes of EfiACPIMemoryNVS and EfiReservedMemoryType\r
-# in UEFI memory map, if and only of PropertiesTable is published and has BIT0 set.\r
-#\r
-# Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.<BR>\r
-#\r
-#  This program and the accompanying materials\r
-#  are licensed and made available under the terms and conditions of the BSD License\r
-#  which accompanies this distribution. The full text of the license may be found at\r
-#  http://opensource.org/licenses/bsd-license.php\r
-#  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-#  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-#\r
-#\r
-##\r
-\r
-[Defines]\r
-  INF_VERSION                    = 0x00010005\r
-  BASE_NAME                      = PropertiesTableAttributesDxe\r
-  MODULE_UNI_FILE                = PropertiesTableAttributesDxe.uni\r
-  FILE_GUID                      = AA48FBB2-9F87-4DFD-B416-575938F0C8F4\r
-  MODULE_TYPE                    = DXE_DRIVER\r
-  VERSION_STRING                 = 1.0\r
-  ENTRY_POINT                    = InitializePropertiesTableAttributesDxe\r
-\r
-#\r
-# The following information is for reference only and not required by the build tools.\r
-#\r
-#  VALID_ARCHITECTURES           = IA32 X64 EBC\r
-#\r
-\r
-[Sources]\r
-  PropertiesTableAttributesDxe.c\r
-\r
-[Packages]\r
-  MdePkg/MdePkg.dec\r
-\r
-[LibraryClasses]\r
-  UefiDriverEntryPoint\r
-  UefiBootServicesTableLib\r
-  DxeServicesTableLib\r
-  DebugLib\r
-  UefiLib\r
-  MemoryAllocationLib\r
-\r
-[Guids]\r
-  gEfiEventReadyToBootGuid                      ## CONSUMES ## Event\r
-  gEfiPropertiesTableGuid                       ## CONSUMES ## SystemTable\r
-\r
-[Depex]\r
-  TRUE\r
-\r
-[UserExtensions.TianoCore."ExtraFiles"]\r
-  PropertiesTableAttributesDxeExtra.uni\r
diff --git a/MdeModulePkg/Universal/PropertiesTableAttributesDxe/PropertiesTableAttributesDxe.uni b/MdeModulePkg/Universal/PropertiesTableAttributesDxe/PropertiesTableAttributesDxe.uni
deleted file mode 100644 (file)
index 9df097f..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-// /** @file\r
-//  This module sets default policy for attributes of EfiACPIMemoryNVS and EfiReservedMemoryType.\r
-//\r
-//  This module sets EFI_MEMORY_XP for attributes of EfiACPIMemoryNVS and EfiReservedMemoryType\r
-//  in UEFI memory map, if and only of PropertiesTable is published and has BIT0 set.\r
-//\r
-// Copyright (c) 2015, Intel Corporation. All rights reserved.<BR>\r
-//\r
-// This program and the accompanying materials\r
-// are licensed and made available under the terms and conditions of the BSD License\r
-// which accompanies this distribution.  The full text of the license may be found at\r
-// http://opensource.org/licenses/bsd-license.php\r
-//\r
-// THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-// WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-//\r
-// **/\r
-\r
-\r
-#string STR_MODULE_ABSTRACT             #language en-US "This module sets default policy for attributes of EfiACPIMemoryNVS and EfiReservedMemoryType."\r
-\r
-#string STR_MODULE_DESCRIPTION          #language en-US "This module sets EFI_MEMORY_XP for attributes of EfiACPIMemoryNVS and EfiReservedMemoryType in UEFI memory map, if and only of PropertiesTable is published and has BIT0 set."\r
-\r
diff --git a/MdeModulePkg/Universal/PropertiesTableAttributesDxe/PropertiesTableAttributesDxeExtra.uni b/MdeModulePkg/Universal/PropertiesTableAttributesDxe/PropertiesTableAttributesDxeExtra.uni
deleted file mode 100644 (file)
index e107e78..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-// /** @file\r
-//  This module sets default policy for attributes of EfiACPIMemoryNVS and EfiReservedMemoryType.\r
-//\r
-//  This module sets EFI_MEMORY_XP for attributes of EfiACPIMemoryNVS and EfiReservedMemoryType\r
-//  in UEFI memory map, if and only of PropertiesTable is published and has BIT0 set.\r
-//\r
-// Copyright (c) 2015, Intel Corporation. All rights reserved.<BR>\r
-//\r
-// This program and the accompanying materials\r
-// are licensed and made available under the terms and conditions of the BSD License\r
-// which accompanies this distribution.  The full text of the license may be found at\r
-// http://opensource.org/licenses/bsd-license.php\r
-//\r
-// THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-// WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-//\r
-// **/\r
-\r
-#string STR_PROPERTIES_MODULE_NAME\r
-#language en-US\r
-"PropertiesTable Attributes Setting DXE Driver"\r
-\r
-\r