]> git.proxmox.com Git - mirror_edk2.git/commitdiff
MdeModulePkg AcpiTableDxe: Don't uninstall Acpi Sdt Protocol at ReadyToLock
authorStar Zeng <star.zeng@intel.com>
Thu, 3 Mar 2016 08:49:54 +0000 (16:49 +0800)
committerStar Zeng <star.zeng@intel.com>
Fri, 4 Mar 2016 09:13:53 +0000 (17:13 +0800)
1. The consumer of Acpi Sdt Protocol may want to use the API after ReadyToLock.
2. The ACPI system configuration table even could be overwritten,
   we see little issue in leaving Acpi Sdt Protocol installed.

Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Feng Tian <feng.tian@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiSdt.c
MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTable.h
MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableDxe.inf

index db693900758a1ea3c1da8f80c7c0cd0131e3e724..2b3bb356250a9246b7942463a523aa0dc008777f 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   ACPI Sdt Protocol Driver\r
 \r
 /** @file\r
   ACPI Sdt Protocol Driver\r
 \r
-  Copyright (c) 2010 - 2015, Intel Corporation. All rights reserved. <BR>\r
+  Copyright (c) 2010 - 2016, 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
   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
@@ -1040,54 +1040,6 @@ FindPath (
   return Status;\r
 }\r
 \r
   return Status;\r
 }\r
 \r
-/**\r
-  ExitPmAuth Protocol notification event handler.\r
-\r
-  @param[in] Event    Event whose notification function is being invoked.\r
-  @param[in] Context  Pointer to the notification function's context.\r
-**/\r
-VOID\r
-EFIAPI\r
-ExitPmAuthNotification (\r
-  IN EFI_EVENT  Event,\r
-  IN VOID       *Context\r
-  )\r
-{\r
-  EFI_STATUS Status;\r
-  VOID       *DxeSmmReadyToLock;\r
-\r
-  //\r
-  // Add more check to locate protocol after got event, because\r
-  // the library will signal this event immediately once it is register\r
-  // just in case it is already installed.\r
-  //\r
-  Status = gBS->LocateProtocol (\r
-                  &gEfiDxeSmmReadyToLockProtocolGuid,\r
-                  NULL,\r
-                  &DxeSmmReadyToLock\r
-                  );\r
-  if (EFI_ERROR (Status)) {\r
-    return ;\r
-  }\r
-\r
-  //\r
-  // Uninstall ACPI SDT protocol, so that we can make sure no one update ACPI table from API level.\r
-  //\r
-  Status = gBS->UninstallProtocolInterface (\r
-                  mHandle,\r
-                  &gEfiAcpiSdtProtocolGuid,\r
-                  &mPrivateData->AcpiSdtProtocol\r
-                  );\r
-  ASSERT_EFI_ERROR (Status);\r
-\r
-  //\r
-  // Close event, so it will not be invoked again.\r
-  //\r
-  gBS->CloseEvent (Event);\r
-\r
-  return ;\r
-}\r
-\r
 /**\r
   This function initializes AcpiSdt protocol in ACPI table instance.\r
 \r
 /**\r
   This function initializes AcpiSdt protocol in ACPI table instance.\r
 \r
@@ -1098,22 +1050,10 @@ SdtAcpiTableAcpiSdtConstructor (
   IN EFI_ACPI_TABLE_INSTANCE   *AcpiTableInstance\r
   )\r
 {\r
   IN EFI_ACPI_TABLE_INSTANCE   *AcpiTableInstance\r
   )\r
 {\r
-  VOID *Registration;\r
 \r
   InitializeListHead (&AcpiTableInstance->NotifyList);\r
   CopyMem (&AcpiTableInstance->AcpiSdtProtocol, &mAcpiSdtProtocolTemplate, sizeof(mAcpiSdtProtocolTemplate));\r
   AcpiTableInstance->AcpiSdtProtocol.AcpiVersion = (EFI_ACPI_TABLE_VERSION)PcdGet32 (PcdAcpiExposedTableVersions);\r
 \r
 \r
   InitializeListHead (&AcpiTableInstance->NotifyList);\r
   CopyMem (&AcpiTableInstance->AcpiSdtProtocol, &mAcpiSdtProtocolTemplate, sizeof(mAcpiSdtProtocolTemplate));\r
   AcpiTableInstance->AcpiSdtProtocol.AcpiVersion = (EFI_ACPI_TABLE_VERSION)PcdGet32 (PcdAcpiExposedTableVersions);\r
 \r
-  //\r
-  // Register event for ExitPmAuth, so that we can uninstall ACPI SDT protocol after ExitPmAuth.\r
-  //\r
-  EfiCreateProtocolNotifyEvent (\r
-    &gEfiDxeSmmReadyToLockProtocolGuid,\r
-    TPL_CALLBACK,\r
-    ExitPmAuthNotification,\r
-    NULL,\r
-    &Registration\r
-    );\r
-\r
   return ;\r
 }\r
   return ;\r
 }\r
index ebedefb906adfeef66e64205e5a45e7a24b4f9d3..d6d81ae04d4fd95e1859788a9659b367ce8144ab 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   ACPI Table Protocol Driver\r
 \r
 /** @file\r
   ACPI Table Protocol Driver\r
 \r
-  Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2006 - 2016, 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
   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
@@ -21,7 +21,6 @@
 #include <Protocol/AcpiTable.h>\r
 #include <Guid/Acpi.h>\r
 #include <Protocol/AcpiSystemDescriptionTable.h>\r
 #include <Protocol/AcpiTable.h>\r
 #include <Guid/Acpi.h>\r
 #include <Protocol/AcpiSystemDescriptionTable.h>\r
-#include <Protocol/DxeSmmReadyToLock.h>\r
 \r
 #include <Library/BaseLib.h>\r
 #include <Library/DebugLib.h>\r
 \r
 #include <Library/BaseLib.h>\r
 #include <Library/DebugLib.h>\r
index 0fb2c9cfb52e3d2aa1496d0eb6daf7b3f358df08..3ec39c0228dd720bfcba13d40ada453b135a317f 100644 (file)
@@ -1,7 +1,7 @@
 ## @file\r
 #  ACPI Table Protocol Driver\r
 #\r
 ## @file\r
 #  ACPI Table Protocol Driver\r
 #\r
-#  Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>\r
+#  Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.<BR>\r
 #  Copyright (c) 2016, Linaro Ltd. All rights reserved.<BR>\r
 #  This program and the accompanying materials are\r
 #  licensed and made available under the terms and conditions of the BSD License\r
 #  Copyright (c) 2016, Linaro Ltd. All rights reserved.<BR>\r
 #  This program and the accompanying materials are\r
 #  licensed and made available under the terms and conditions of the BSD License\r
@@ -73,9 +73,6 @@
 [Protocols]\r
   gEfiAcpiTableProtocolGuid                     ## PRODUCES\r
   gEfiAcpiSdtProtocolGuid                       ## PRODUCES\r
 [Protocols]\r
   gEfiAcpiTableProtocolGuid                     ## PRODUCES\r
   gEfiAcpiSdtProtocolGuid                       ## PRODUCES\r
-  ## NOTIFY\r
-  ## SOMETIMES_CONSUMES\r
-  gEfiDxeSmmReadyToLockProtocolGuid\r
 \r
 [Depex]\r
   TRUE\r
 \r
 [Depex]\r
   TRUE\r