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