]> git.proxmox.com Git - mirror_edk2.git/blame_incremental - IntelFrameworkPkg/Include/Protocol/SmmStandbyButtonDispatch.h
Committing changes to the comments, after review with engineers.
[mirror_edk2.git] / IntelFrameworkPkg / Include / Protocol / SmmStandbyButtonDispatch.h
... / ...
CommitLineData
1/** @file\r
2 Provides the parent dispatch service for the standby button SMI source generator.\r
3\r
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
8 Copyright (c) 2007, 2009 Intel Corporation\r
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
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
21**/\r
22\r
23#ifndef _EFI_SMM_STANDBY_BUTTON_DISPATCH_H_\r
24#define _EFI_SMM_STANDBY_BUTTON_DISPATCH_H_\r
25\r
26//\r
27// Global ID for the Standby Button SMI Protocol\r
28//\r
29#define EFI_SMM_STANDBY_BUTTON_DISPATCH_PROTOCOL_GUID \\r
30 { \\r
31 0x78965b98, 0xb0bf, 0x449e, {0x8b, 0x22, 0xd2, 0x91, 0x4e, 0x49, 0x8a, 0x98 } \\r
32 }\r
33\r
34typedef struct _EFI_SMM_STANDBY_BUTTON_DISPATCH_PROTOCOL EFI_SMM_STANDBY_BUTTON_DISPATCH_PROTOCOL;\r
35\r
36//\r
37// Related Definitions\r
38//\r
39\r
40///\r
41/// Standby Button. Example, Use for changing LEDs before ACPI OS is on.\r
42/// - DXE/BDS Phase\r
43/// - OS Install Phase\r
44///\r
45typedef enum {\r
46 EfiStandbyButtonEntry,\r
47 EfiStandbyButtonExit\r
48} EFI_STANDBY_BUTTON_PHASE;\r
49\r
50typedef struct {\r
51 /// Describes whether the child handler should be invoked upon the entry to the button\r
52 /// activation or upon exit (i.e., upon receipt of the button press event or upon release of\r
53 /// the event).\r
54 EFI_STANDBY_BUTTON_PHASE Phase;\r
55} EFI_SMM_STANDBY_BUTTON_DISPATCH_CONTEXT;\r
56\r
57//\r
58// Member functions\r
59//\r
60\r
61/**\r
62 Dispatch function for a Standby Button SMI handler.\r
63\r
64 @param DispatchHandle Handle of this dispatch function.\r
65 @param DispatchContext Pointer to the dispatch function's context.\r
66 The DispatchContext fields are filled in\r
67 by the dispatching driver prior to\r
68 invoking this dispatch function.\r
69\r
70**/\r
71typedef\r
72VOID\r
73(EFIAPI *EFI_SMM_STANDBY_BUTTON_DISPATCH)(\r
74 IN EFI_HANDLE DispatchHandle,\r
75 IN EFI_SMM_STANDBY_BUTTON_DISPATCH_CONTEXT *DispatchContext\r
76 );\r
77\r
78/**\r
79 Provides the parent dispatch service for a given SMI source generator\r
80\r
81 @param This Pointer to the EFI_SMM_STANDBY_BUTTON_DISPATCH_PROTOCOL instance.\r
82 @param DispatchFunction Function to install.\r
83 @param DispatchContext Pointer to the dispatch function's context.\r
84 Indicates to the register\r
85 function the Standby Button SMI phase for which to invoke the dispatch\r
86 function.\r
87 @param DispatchHandle Handle generated by the dispatcher to track the function instance.\r
88\r
89 @retval EFI_SUCCESS The dispatch function has been successfully\r
90 registered and the SMI source has been enabled.\r
91 @retval EFI_DEVICE_ERROR The driver could not enable the SMI source.\r
92 @retval EFI_OUT_OF_RESOURCES Not enough memory (system or SMM) to manage this\r
93 child.\r
94 @retval EFI_INVALID_PARAMETER DispatchContext is invalid. The Standby Button SMI\r
95 phase is not within valid range.\r
96\r
97**/\r
98typedef\r
99EFI_STATUS\r
100(EFIAPI *EFI_SMM_STANDBY_BUTTON_REGISTER)(\r
101 IN EFI_SMM_STANDBY_BUTTON_DISPATCH_PROTOCOL *This,\r
102 IN EFI_SMM_STANDBY_BUTTON_DISPATCH DispatchFunction,\r
103 IN EFI_SMM_STANDBY_BUTTON_DISPATCH_CONTEXT *DispatchContext,\r
104 OUT EFI_HANDLE *DispatchHandle\r
105 );\r
106\r
107/**\r
108 Unregister a child SMI source dispatch function with a parent SMM driver\r
109\r
110 @param This Pointer to the EFI_SMM_STANDBY_BUTTON_DISPATCH_PROTOCOL instance.\r
111 @param DispatchHandle Handle of the service to remove.\r
112\r
113 @retval EFI_SUCCESS The dispatch function has been successfully\r
114 unregistered and the SMI source has been disabled\r
115 if there are no other registered child dispatch\r
116 functions for this SMI source.\r
117 @retval EFI_INVALID_PARAMETER Handle is invalid.\r
118\r
119**/\r
120typedef\r
121EFI_STATUS\r
122(EFIAPI *EFI_SMM_STANDBY_BUTTON_UNREGISTER)(\r
123 IN EFI_SMM_STANDBY_BUTTON_DISPATCH_PROTOCOL *This,\r
124 IN EFI_HANDLE DispatchHandle\r
125 );\r
126\r
127//\r
128// Interface structure for the SMM Standby Button SMI Dispatch Protocol\r
129//\r
130/**\r
131 This protocol provices the parent dispatch service for the standby button SMI source generator.\r
132 Provides the ability to install child handlers for the given event types.\r
133 **/\r
134struct _EFI_SMM_STANDBY_BUTTON_DISPATCH_PROTOCOL {\r
135 /// \r
136 /// Installs a child service to be dispatched by this protocol.\r
137 ///\r
138 EFI_SMM_STANDBY_BUTTON_REGISTER Register;\\r
139 ///\r
140 /// Removes a child service dispatched by this protocol.\r
141 ///\r
142 EFI_SMM_STANDBY_BUTTON_UNREGISTER UnRegister;\r
143};\r
144\r
145extern EFI_GUID gEfiSmmStandbyButtonDispatchProtocolGuid;\r
146\r
147#endif\r