summaryrefslogtreecommitdiff
path: root/MdeModulePkg/Include
diff options
context:
space:
mode:
authorMichael D Kinney <michael.d.kinney@intel.com>2017-09-01 00:51:08 -0700
committerRuiyu Ni <ruiyu.ni@intel.com>2018-02-09 15:29:56 +0800
commit99a6529e1ed38606bb5330895cba64cc98aa3e26 (patch)
tree0f8be6a10006a706d1afba987538737099c34aad /MdeModulePkg/Include
parent8f86d67d464da4d3bf3437575bfd2409da4c800e (diff)
downloadedk2-99a6529e1ed38606bb5330895cba64cc98aa3e26.zip
edk2-99a6529e1ed38606bb5330895cba64cc98aa3e26.tar.gz
edk2-99a6529e1ed38606bb5330895cba64cc98aa3e26.tar.bz2
MdeModulePkg/ResetSystemRuntimeDxe: Add platform filter and handler
Add support for platform specific reset filters and platform specific reset handlers to ResetSystem(). A filter may modify the reset type and reset data and call ResetSystem() with the modified parameters. A handler performs the reset action. The support for platform specific filters and platform specific handlers is based on the Reset Notification feature added to the UEFI 2.7 Specification. Platform specific reset filters are processed first so the final reset type and reset data can be determined. In the DXE Phase The UEFI Reset Notifications are processed second so all UEFI Drivers that have registered for a Reset Notification can perform any required clean up actions. The platform specific reset handlers are processed third. If there are no registered platform specific reset handlers or none of them reset the platform, then the default reset action based on the ResetSystemLib is performed. In the PEI Phase, filters and handlers are registered through the following 2 PPIs that are based on EFI_RESET_NOTIFICATION_PROTOCOL. * gEdkiiPlatformSpecificResetFilterPpiGuid * gEdkiiPlatformSpecificResetHandlerPpiGuid In the DXE Phase, filters and handlers are registered through the following 2 Protocols that are based on EFI_RESET_NOTIFICATION_PROTOCOL. * gEdkiiPlatformSpecificResetFilterProtocolGuid * gEdkiiPlatformSpecificResetHandlerProtocolGuid Cc: Liming Gao <liming.gao@intel.com> Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Star Zeng <star.zeng@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
Diffstat (limited to 'MdeModulePkg/Include')
-rw-r--r--MdeModulePkg/Include/Ppi/PlatformSpecificResetFilter.h31
-rw-r--r--MdeModulePkg/Include/Ppi/PlatformSpecificResetHandler.h29
-rw-r--r--MdeModulePkg/Include/Protocol/PlatformSpecificResetFilter.h31
-rw-r--r--MdeModulePkg/Include/Protocol/PlatformSpecificResetHandler.h29
4 files changed, 120 insertions, 0 deletions
diff --git a/MdeModulePkg/Include/Ppi/PlatformSpecificResetFilter.h b/MdeModulePkg/Include/Ppi/PlatformSpecificResetFilter.h
new file mode 100644
index 0000000..0f1432f
--- /dev/null
+++ b/MdeModulePkg/Include/Ppi/PlatformSpecificResetFilter.h
@@ -0,0 +1,31 @@
+/** @file
+ This PPI provides services to register a platform specific reset filter
+ for ResetSystem(). A reset filter evaluates the parameters passed to
+ ResetSystem() and converts a ResetType of EfiResetPlatformSpecific to a
+ non-platform specific reset type. The registered filters are processed before
+ EDKII_PLATFORM_SPECIFIC_RESET_HANDLER_PPI handlers.
+
+ Copyright (c) 2017 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 that accompanies this distribution.
+ The full text of the license may be found at
+ http://opensource.org/licenses/bsd-license.php.
+
+ THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+**/
+
+#ifndef _PLATFORM_SPECIFIC_RESET_FILTER_PPI_H_
+#define _PLATFORM_SPECIFIC_RESET_FILTER_PPI_H_
+
+#include <Protocol/ResetNotification.h>
+
+#define EDKII_PLATFORM_SPECIFIC_RESET_FILTER_PPI_GUID \
+ { 0x8c9f4de3, 0x7b90, 0x47ef, { 0x93, 0x8, 0x28, 0x7c, 0xec, 0xd6, 0x6d, 0xe8 } }
+
+typedef EFI_RESET_NOTIFICATION_PROTOCOL EDKII_PLATFORM_SPECIFIC_RESET_FILTER_PPI;
+
+extern EFI_GUID gEdkiiPlatformSpecificResetFilterPpiGuid;
+
+#endif
diff --git a/MdeModulePkg/Include/Ppi/PlatformSpecificResetHandler.h b/MdeModulePkg/Include/Ppi/PlatformSpecificResetHandler.h
new file mode 100644
index 0000000..d5f1350
--- /dev/null
+++ b/MdeModulePkg/Include/Ppi/PlatformSpecificResetHandler.h
@@ -0,0 +1,29 @@
+/** @file
+ This PPI provides services to register a platform specific handler for
+ ResetSystem(). The registered handlers are processed after
+ EDKII_PLATFORM_SPECIFIC_RESET_FILTER_PPI notifications.
+
+ Copyright (c) 2017 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 that accompanies this distribution.
+ The full text of the license may be found at
+ http://opensource.org/licenses/bsd-license.php.
+
+ THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+**/
+
+#ifndef _PLATFORM_SPECIFIC_RESET_HANDLER_PPI_H_
+#define _PLATFORM_SPECIFIC_RESET_HANDLER_PPI_H_
+
+#include <Protocol/ResetNotification.h>
+
+#define EDKII_PLATFORM_SPECIFIC_RESET_HANDLER_PPI_GUID \
+ { 0x75cf14ae, 0x3441, 0x49dc, { 0xaa, 0x10, 0xbb, 0x35, 0xa7, 0xba, 0x8b, 0xab } }
+
+typedef EFI_RESET_NOTIFICATION_PROTOCOL EDKII_PLATFORM_SPECIFIC_RESET_HANDLER_PPI;
+
+extern EFI_GUID gEdkiiPlatformSpecificResetHandlerPpiGuid;
+
+#endif
diff --git a/MdeModulePkg/Include/Protocol/PlatformSpecificResetFilter.h b/MdeModulePkg/Include/Protocol/PlatformSpecificResetFilter.h
new file mode 100644
index 0000000..ff5ca48
--- /dev/null
+++ b/MdeModulePkg/Include/Protocol/PlatformSpecificResetFilter.h
@@ -0,0 +1,31 @@
+/** @file
+ This Protocol provides services to register a platform specific reset filter
+ for ResetSystem(). A reset filter evaluates the parameters passed to
+ ResetSystem() and converts a ResetType of EfiResetPlatformSpecific to a
+ non-platform specific reset type. The registered filters are processed before
+ the UEFI 2.7 Reset Notifications.
+
+ Copyright (c) 2017 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 that accompanies this distribution.
+ The full text of the license may be found at
+ http://opensource.org/licenses/bsd-license.php.
+
+ THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+**/
+
+#ifndef _PLATFORM_SPECIFIC_RESET_FILTER_PROTOCOL_H_
+#define _PLATFORM_SPECIFIC_RESET_FILTER_PROTOCOL_H_
+
+#include <Protocol/ResetNotification.h>
+
+#define EDKII_PLATFORM_SPECIFIC_RESET_FILTER_PROTOCOL_GUID \
+ { 0x695d7835, 0x8d47, 0x4c11, { 0xab, 0x22, 0xfa, 0x8a, 0xcc, 0xe7, 0xae, 0x7a } }
+
+typedef EFI_RESET_NOTIFICATION_PROTOCOL EDKII_PLATFORM_SPECIFIC_RESET_FILTER_PROTOCOL;
+
+extern EFI_GUID gEdkiiPlatformSpecificResetFilterProtocolGuid;
+
+#endif
diff --git a/MdeModulePkg/Include/Protocol/PlatformSpecificResetHandler.h b/MdeModulePkg/Include/Protocol/PlatformSpecificResetHandler.h
new file mode 100644
index 0000000..8a44e86
--- /dev/null
+++ b/MdeModulePkg/Include/Protocol/PlatformSpecificResetHandler.h
@@ -0,0 +1,29 @@
+/** @file
+ This protocol provides services to register a platform specific handler for
+ ResetSystem(). The registered handlers are called after the UEFI 2.7 Reset
+ Notifications are processed
+
+ Copyright (c) 2017 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 that accompanies this distribution.
+ The full text of the license may be found at
+ http://opensource.org/licenses/bsd-license.php.
+
+ THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+**/
+
+#ifndef _PLATFORM_SPECIFIC_RESET_HANDLER_PROTOCOL_H_
+#define _PLATFORM_SPECIFIC_RESET_HANDLER_PROTOCOL_H_
+
+#include <Protocol/ResetNotification.h>
+
+#define EDKII_PLATFORM_SPECIFIC_RESET_HANDLER_PROTOCOL_GUID \
+ { 0x2df6ba0b, 0x7092, 0x440d, { 0xbd, 0x4, 0xfb, 0x9, 0x1e, 0xc3, 0xf3, 0xc1 } }
+
+typedef EFI_RESET_NOTIFICATION_PROTOCOL EDKII_PLATFORM_SPECIFIC_RESET_HANDLER_PROTOCOL;
+
+extern EFI_GUID gEdkiiPlatformSpecificResetHandlerProtocolGuid;
+
+#endif