]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdePkg/Include/Protocol/SmmStandbyButtonDispatch2.h
MdePkg FirmwareManagement.h: Fix typo EFI_SECURITY_VIOLATIO
[mirror_edk2.git] / MdePkg / Include / Protocol / SmmStandbyButtonDispatch2.h
index ddfa230d070b269b4c4d15f312d112548e564edd..f4385eff273829b9f482aaf597a2a641ced2795f 100644 (file)
@@ -4,8 +4,8 @@
 \r
   This protocol provides the parent dispatch service for the standby button SMI source generator.\r
 \r
-  Copyright (c) 2009, Intel Corporation\r
-  All rights reserved. This program and the accompanying materials\r
+  Copyright (c) 2009 - 2010, 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
 #ifndef _SMM_STANDBY_BUTTON_DISPATCH2_H_\r
 #define _SMM_STANDBY_BUTTON_DISPATCH2_H_\r
 \r
-#include <Pi/PiSmmCis.h>\r
+#include <Protocol/MmStandbyButtonDispatch.h>\r
 \r
-///\r
-/// Note:\r
-///   To avoid name conflict between PI and Framework SMM spec, the following names defined\r
-///   in PI 1.2 SMM spec are renamed. These renamings are not yet in a public PI spec and errta.\r
-///\r
-///   EFI_SMM_STANDBY_BUTTON_REGISTER   -> EFI_SMM_STANDBY_BUTTON_REGISTER2\r
-///   EFI_SMM_STANDBY_BUTTON_UNREGISTER -> EFI_SMM_STANDBY_BUTTON_UNREGISTER2\r
-///\r
-\r
-#define EFI_SMM_STANDBY_BUTTON_DISPATCH2_PROTOCOL_GUID \\r
-  { \\r
-    0x7300c4a1, 0x43f2, 0x4017, {0xa5, 0x1b, 0xc8, 0x1a, 0x7f, 0x40, 0x58, 0x5b } \\r
-  }\r
-\r
-///\r
-/// Standby Button phases\r
-///\r
-typedef enum {\r
-  EfiStandbyButtonEntry,\r
-  EfiStandbyButtonExit,\r
-  EfiStandbyButtonMax\r
-} EFI_STANDBY_BUTTON_PHASE;\r
+#define EFI_SMM_STANDBY_BUTTON_DISPATCH2_PROTOCOL_GUID EFI_MM_STANDBY_BUTTON_DISPATCH_PROTOCOL_GUID\r
 \r
 ///\r
 /// The dispatch function's context.\r
 ///\r
-typedef struct {\r
-  ///\r
-  /// Describes whether the child handler should be invoked upon the entry to the button \r
-  /// activation or upon exit.\r
-  ///\r
-  EFI_STANDBY_BUTTON_PHASE  Phase;\r
-} EFI_SMM_STANDBY_BUTTON_REGISTER_CONTEXT;\r
-\r
-typedef struct _EFI_SMM_STANDBY_BUTTON_DISPATCH2_PROTOCOL EFI_SMM_STANDBY_BUTTON_DISPATCH2_PROTOCOL;\r
+typedef EFI_MM_STANDBY_BUTTON_REGISTER_CONTEXT EFI_SMM_STANDBY_BUTTON_REGISTER_CONTEXT;\r
 \r
-/**\r
-  Provides the parent dispatch service for a standby button event.\r
+typedef EFI_MM_STANDBY_BUTTON_DISPATCH_PROTOCOL EFI_SMM_STANDBY_BUTTON_DISPATCH2_PROTOCOL;\r
 \r
-  This service registers a function (DispatchFunction) which will be called when an SMI is \r
-  generated because the standby button was pressed or released, as specified by \r
-  RegisterContext. On return, DispatchHandle contains a unique handle which may be used \r
-  later to unregister the function using UnRegister().\r
-  The DispatchFunction will be called with Context set to the same value as was passed into \r
-  this function in RegisterContext and with CommBuffer and CommBufferSize set to NULL. \r
+typedef EFI_MM_STANDBY_BUTTON_REGISTER EFI_SMM_STANDBY_BUTTON_REGISTER2;\r
 \r
-  @param[in]  This               Pointer to the EFI_SMM_STANDBY_BUTTON_DISPATCH2_PROTOCOL instance.\r
-  @param[in]  DispatchFunction   Function to register for handler when the standby button is pressed or released.\r
-  @param[in]  RegisterContext    Pointer to the dispatch function's context. The caller fills in this context\r
-                                 before calling the register function to indicate to the register function the \r
-                                 standby button SMI source for which the dispatch function should be invoked.\r
-  @param[out] DispatchHandle     Handle generated by the dispatcher to track the function instance. \r
-\r
-  @retval EFI_SUCCESS            The dispatch function has been successfully\r
-                                 registered and the SMI source has been enabled.\r
-  @retval EFI_DEVICE_ERROR       The driver was unable to enable the SMI source.\r
-  @retval EFI_INVALID_PARAMETER  RegisterContext is invalid. The standby button input value\r
-                                 is not within valid range.\r
-  @retval EFI_OUT_OF_RESOURCES   There is not enough memory (system or SMM) to manage this child.\r
-**/\r
-typedef\r
-EFI_STATUS\r
-(EFIAPI *EFI_SMM_STANDBY_BUTTON_REGISTER2)(\r
-  IN CONST EFI_SMM_STANDBY_BUTTON_DISPATCH2_PROTOCOL  *This,\r
-  IN       EFI_SMM_HANDLER_ENTRY_POINT2               DispatchFunction,\r
-  IN       EFI_SMM_STANDBY_BUTTON_REGISTER_CONTEXT    *RegisterContext,\r
-  OUT      EFI_HANDLE                                 *DispatchHandle\r
-  );\r
-\r
-/**\r
-  Unregisters a child SMI source dispatch function with a parent SMM driver.\r
-\r
-  This service removes the handler associated with DispatchHandle so that it will no longer be \r
-  called when the standby button is pressed or released.\r
-\r
-  @param[in] This                Pointer to the EFI_SMM_STANDBY_BUTTON_DISPATCH2_PROTOCOL instance.\r
-  @param[in] DispatchHandle      Handle of the service to remove.\r
-\r
-  @retval EFI_SUCCESS            The service has been successfully removed.\r
-  @retval EFI_INVALID_PARAMETER  The DispatchHandle was not valid.\r
-**/\r
-typedef\r
-EFI_STATUS\r
-(EFIAPI *EFI_SMM_STANDBY_BUTTON_UNREGISTER2)(\r
-  IN CONST EFI_SMM_STANDBY_BUTTON_DISPATCH2_PROTOCOL  *This,\r
-  IN       EFI_HANDLE                                 DispatchHandle\r
-  );\r
-\r
-///\r
-/// Interface structure for the SMM Standby Button Dispatch2 Protocol.\r
-///\r
-/// This protocol provides the parent dispatch service for the standby\r
-/// button SMI source generator.\r
-///\r
-struct _EFI_SMM_STANDBY_BUTTON_DISPATCH2_PROTOCOL {\r
-  EFI_SMM_STANDBY_BUTTON_REGISTER2    Register;\r
-  EFI_SMM_STANDBY_BUTTON_UNREGISTER2  UnRegister;\r
-};\r
+typedef EFI_MM_STANDBY_BUTTON_UNREGISTER EFI_SMM_STANDBY_BUTTON_UNREGISTER2;\r
 \r
 extern EFI_GUID gEfiSmmStandbyButtonDispatch2ProtocolGuid;\r
 \r