]> git.proxmox.com Git - mirror_edk2.git/blame - IntelFrameworkPkg/Include/Protocol/SmmStandbyButtonDispatch.h
Update the copyright notice format
[mirror_edk2.git] / IntelFrameworkPkg / Include / Protocol / SmmStandbyButtonDispatch.h
CommitLineData
79964ac8 1/** @file\r
8411f1c0 2 Provides the parent dispatch service for the standby button SMI source generator.\r
79964ac8 3\r
79a0adf3 4 The SMM Standby Button Dispatch Protocol is defined in \r
5 the Intel Platform Innovation Framework for EFI SMM Core Interface Specification\r
6 (SMM CIS) Version 0.9.\r
7\r
2b3687db 8Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>\r
f22f941e 9This program and the accompanying materials are licensed and made available under \r
10the terms and conditions of the BSD License that accompanies this distribution. \r
11The full text of the license may be found at\r
12http://opensource.org/licenses/bsd-license.php. \r
13 \r
14THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
15WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
79964ac8 16\r
c3b35b60 17 @par Revision Reference:\r
18 This Protocol is defined in Framework of EFI SMM Core Interface Spec\r
19 Version 0.9.\r
20\r
79964ac8 21**/\r
22\r
23#ifndef _EFI_SMM_STANDBY_BUTTON_DISPATCH_H_\r
24#define _EFI_SMM_STANDBY_BUTTON_DISPATCH_H_\r
25\r
a2bb197e 26//\r
27// Share some common definitions with PI SMM\r
28//\r
29#include <Protocol/SmmStandbyButtonDispatch2.h>\r
30\r
79964ac8 31//\r
32// Global ID for the Standby Button SMI Protocol\r
33//\r
34#define EFI_SMM_STANDBY_BUTTON_DISPATCH_PROTOCOL_GUID \\r
35 { \\r
36 0x78965b98, 0xb0bf, 0x449e, {0x8b, 0x22, 0xd2, 0x91, 0x4e, 0x49, 0x8a, 0x98 } \\r
37 }\r
38\r
39typedef struct _EFI_SMM_STANDBY_BUTTON_DISPATCH_PROTOCOL EFI_SMM_STANDBY_BUTTON_DISPATCH_PROTOCOL;\r
40\r
41//\r
42// Related Definitions\r
43//\r
79a0adf3 44\r
79964ac8 45typedef struct {\r
c3b35b60 46 /// Describes whether the child handler should be invoked upon the entry to the button\r
47 /// activation or upon exit (i.e., upon receipt of the button press event or upon release of\r
48 /// the event).\r
79964ac8 49 EFI_STANDBY_BUTTON_PHASE Phase;\r
50} EFI_SMM_STANDBY_BUTTON_DISPATCH_CONTEXT;\r
51\r
52//\r
53// Member functions\r
54//\r
79a0adf3 55\r
79964ac8 56/**\r
57 Dispatch function for a Standby Button SMI handler.\r
58\r
f22f941e 59 @param DispatchHandle The handle of this dispatch function.\r
60 @param DispatchContext The pointer to the dispatch function's context.\r
79964ac8 61 The DispatchContext fields are filled in\r
62 by the dispatching driver prior to\r
63 invoking this dispatch function.\r
64\r
79964ac8 65**/\r
66typedef\r
67VOID\r
69686d56 68(EFIAPI *EFI_SMM_STANDBY_BUTTON_DISPATCH)(\r
79964ac8 69 IN EFI_HANDLE DispatchHandle,\r
70 IN EFI_SMM_STANDBY_BUTTON_DISPATCH_CONTEXT *DispatchContext\r
71 );\r
72\r
73/**\r
700a7869 74 Provides the parent dispatch service for a given SMI source generator\r
79964ac8 75\r
f22f941e 76 @param This The pointer to the EFI_SMM_STANDBY_BUTTON_DISPATCH_PROTOCOL instance.\r
77 @param DispatchFunction The function to install.\r
78 @param DispatchContext The pointer to the dispatch function's context.\r
79 Indicates to the register function the Standby \r
80 Button SMI phase for which to invoke the dispatch\r
5259c97d 81 function.\r
f22f941e 82 @param DispatchHandle The handle generated by the dispatcher to track the \r
83 function instance.\r
79964ac8 84\r
85 @retval EFI_SUCCESS The dispatch function has been successfully\r
f22f941e 86 registered, and the SMI source has been enabled.\r
5259c97d 87 @retval EFI_DEVICE_ERROR The driver could not enable the SMI source.\r
79964ac8 88 @retval EFI_OUT_OF_RESOURCES Not enough memory (system or SMM) to manage this\r
89 child.\r
90 @retval EFI_INVALID_PARAMETER DispatchContext is invalid. The Standby Button SMI\r
91 phase is not within valid range.\r
92\r
93**/\r
94typedef\r
95EFI_STATUS\r
69686d56 96(EFIAPI *EFI_SMM_STANDBY_BUTTON_REGISTER)(\r
700a7869 97 IN EFI_SMM_STANDBY_BUTTON_DISPATCH_PROTOCOL *This,\r
98 IN EFI_SMM_STANDBY_BUTTON_DISPATCH DispatchFunction,\r
99 IN EFI_SMM_STANDBY_BUTTON_DISPATCH_CONTEXT *DispatchContext,\r
100 OUT EFI_HANDLE *DispatchHandle\r
79964ac8 101 );\r
102\r
103/**\r
f22f941e 104 Unregister a child SMI source dispatch function with a parent SMM driver.\r
79964ac8 105\r
f22f941e 106 @param This The pointer to the EFI_SMM_STANDBY_BUTTON_DISPATCH_PROTOCOL instance.\r
107 @param DispatchHandle The handle of the service to remove.\r
79964ac8 108\r
79a0adf3 109 @retval EFI_SUCCESS The dispatch function has been successfully\r
f22f941e 110 unregistered, and the SMI source has been disabled,\r
79a0adf3 111 if there are no other registered child dispatch\r
112 functions for this SMI source.\r
f22f941e 113 @retval EFI_INVALID_PARAMETER The handle is invalid.\r
79964ac8 114\r
115**/\r
116typedef\r
117EFI_STATUS\r
69686d56 118(EFIAPI *EFI_SMM_STANDBY_BUTTON_UNREGISTER)(\r
79a0adf3 119 IN EFI_SMM_STANDBY_BUTTON_DISPATCH_PROTOCOL *This,\r
120 IN EFI_HANDLE DispatchHandle\r
79964ac8 121 );\r
122\r
123//\r
124// Interface structure for the SMM Standby Button SMI Dispatch Protocol\r
125//\r
c3b35b60 126/**\r
412fb9ef 127 This protocol provices the parent dispatch service for the standby button SMI source generator.\r
128 Provides the ability to install child handlers for the given event types.\r
c3b35b60 129 **/\r
79964ac8 130struct _EFI_SMM_STANDBY_BUTTON_DISPATCH_PROTOCOL {\r
412fb9ef 131 /// \r
c3b35b60 132 /// Installs a child service to be dispatched by this protocol.\r
133 ///\r
134 EFI_SMM_STANDBY_BUTTON_REGISTER Register;\\r
412fb9ef 135 ///\r
136 /// Removes a child service dispatched by this protocol.\r
137 ///\r
79964ac8 138 EFI_SMM_STANDBY_BUTTON_UNREGISTER UnRegister;\r
139};\r
140\r
141extern EFI_GUID gEfiSmmStandbyButtonDispatchProtocolGuid;\r
142\r
143#endif\r