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