]> git.proxmox.com Git - mirror_edk2.git/blame - IntelFrameworkPkg/Include/Protocol/SmmStandbyButtonDispatch.h
Change single quote to use standard ascii character.
[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
c3b35b60 8 Copyright (c) 2007, 2009 Intel Corporation\r
79964ac8 9 All rights reserved. This program and the accompanying materials\r
10 are licensed and made available under the terms and conditions of the BSD License\r
11 which accompanies this distribution. The full text of the license may be found at\r
12 http://opensource.org/licenses/bsd-license.php\r
13\r
14 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
15 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
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
79a0adf3 26#include <FrameworkSmm.h>\r
b80fbe85 27\r
79964ac8 28//\r
29// Global ID for the Standby Button SMI Protocol\r
30//\r
31#define EFI_SMM_STANDBY_BUTTON_DISPATCH_PROTOCOL_GUID \\r
32 { \\r
33 0x78965b98, 0xb0bf, 0x449e, {0x8b, 0x22, 0xd2, 0x91, 0x4e, 0x49, 0x8a, 0x98 } \\r
34 }\r
35\r
36typedef struct _EFI_SMM_STANDBY_BUTTON_DISPATCH_PROTOCOL EFI_SMM_STANDBY_BUTTON_DISPATCH_PROTOCOL;\r
37\r
38//\r
39// Related Definitions\r
40//\r
79a0adf3 41\r
c3b35b60 42///\r
43/// Standby Button. Example, Use for changing LEDs before ACPI OS is on.\r
44/// - DXE/BDS Phase\r
45/// - OS Install Phase\r
46///\r
79964ac8 47typedef enum {\r
48 EfiStandbyButtonEntry,\r
79a0adf3 49 EfiStandbyButtonExit\r
79964ac8 50} EFI_STANDBY_BUTTON_PHASE;\r
51\r
52typedef struct {\r
c3b35b60 53 /// Describes whether the child handler should be invoked upon the entry to the button\r
54 /// activation or upon exit (i.e., upon receipt of the button press event or upon release of\r
55 /// the event).\r
79964ac8 56 EFI_STANDBY_BUTTON_PHASE Phase;\r
57} EFI_SMM_STANDBY_BUTTON_DISPATCH_CONTEXT;\r
58\r
59//\r
60// Member functions\r
61//\r
79a0adf3 62\r
79964ac8 63/**\r
64 Dispatch function for a Standby Button SMI handler.\r
65\r
66 @param DispatchHandle Handle of this dispatch function.\r
67 @param DispatchContext Pointer to the dispatch function's context.\r
68 The DispatchContext fields are filled in\r
69 by the dispatching driver prior to\r
70 invoking this dispatch function.\r
71\r
79964ac8 72**/\r
73typedef\r
74VOID\r
69686d56 75(EFIAPI *EFI_SMM_STANDBY_BUTTON_DISPATCH)(\r
79964ac8 76 IN EFI_HANDLE DispatchHandle,\r
77 IN EFI_SMM_STANDBY_BUTTON_DISPATCH_CONTEXT *DispatchContext\r
78 );\r
79\r
80/**\r
700a7869 81 Provides the parent dispatch service for a given SMI source generator\r
79964ac8 82\r
700a7869 83 @param This Pointer to the EFI_SMM_STANDBY_BUTTON_DISPATCH_PROTOCOL instance.\r
84 @param DispatchFunction Function to install.\r
79964ac8 85 @param DispatchContext Pointer to the dispatch function's context.\r
86 The caller fills this context in before calling\r
87 the register function to indicate to the register\r
88 function the Standby Button SMI phase for which the dispatch\r
89 function should be invoked.\r
700a7869 90 @param DispatchHandle Handle generated by the dispatcher to track the function instance.\r
79964ac8 91\r
92 @retval EFI_SUCCESS The dispatch function has been successfully\r
93 registered and the SMI source has been enabled.\r
94 @retval EFI_DEVICE_ERROR The driver was unable to enable the SMI source.\r
95 @retval EFI_OUT_OF_RESOURCES Not enough memory (system or SMM) to manage this\r
96 child.\r
97 @retval EFI_INVALID_PARAMETER DispatchContext is invalid. The Standby Button SMI\r
98 phase is not within valid range.\r
99\r
100**/\r
101typedef\r
102EFI_STATUS\r
69686d56 103(EFIAPI *EFI_SMM_STANDBY_BUTTON_REGISTER)(\r
700a7869 104 IN EFI_SMM_STANDBY_BUTTON_DISPATCH_PROTOCOL *This,\r
105 IN EFI_SMM_STANDBY_BUTTON_DISPATCH DispatchFunction,\r
106 IN EFI_SMM_STANDBY_BUTTON_DISPATCH_CONTEXT *DispatchContext,\r
107 OUT EFI_HANDLE *DispatchHandle\r
79964ac8 108 );\r
109\r
110/**\r
111 Unregister a child SMI source dispatch function with a parent SMM driver\r
112\r
79a0adf3 113 @param This Pointer to the EFI_SMM_STANDBY_BUTTON_DISPATCH_PROTOCOL instance.\r
114 @param DispatchHandle Handle of the service to remove.\r
79964ac8 115\r
79a0adf3 116 @retval EFI_SUCCESS The dispatch function has been successfully\r
117 unregistered and the SMI source has been disabled\r
118 if there are no other registered child dispatch\r
119 functions for this SMI source.\r
120 @retval EFI_INVALID_PARAMETER Handle is invalid.\r
79964ac8 121\r
122**/\r
123typedef\r
124EFI_STATUS\r
69686d56 125(EFIAPI *EFI_SMM_STANDBY_BUTTON_UNREGISTER)(\r
79a0adf3 126 IN EFI_SMM_STANDBY_BUTTON_DISPATCH_PROTOCOL *This,\r
127 IN EFI_HANDLE DispatchHandle\r
79964ac8 128 );\r
129\r
130//\r
131// Interface structure for the SMM Standby Button SMI Dispatch Protocol\r
132//\r
c3b35b60 133/**\r
134 This protocol provices the parent dispatch service for the standby button SMI source generator.\r
135 Provides the ability to install child handlers for the given event types.\r
136 **/\r
79964ac8 137struct _EFI_SMM_STANDBY_BUTTON_DISPATCH_PROTOCOL {\r
c3b35b60 138 /// \r
139 /// Installs a child service to be dispatched by this protocol.\r
140 ///\r
141 EFI_SMM_STANDBY_BUTTON_REGISTER Register;\\r
142 ///\r
143 /// Removes a child service dispatched by this protocol.\r
144 ///\r
79964ac8 145 EFI_SMM_STANDBY_BUTTON_UNREGISTER UnRegister;\r
146};\r
147\r
148extern EFI_GUID gEfiSmmStandbyButtonDispatchProtocolGuid;\r
149\r
150#endif\r