]> git.proxmox.com Git - mirror_edk2.git/blame_incremental - IntelFrameworkPkg/Include/Protocol/SmmStandbyButtonDispatch.h
Update comment in SMM Library class include file.
[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 Copyright (c) 2007, Intel Corporation\r
5 All rights reserved. This program and the accompanying materials\r
6 are licensed and made available under the terms and conditions of the BSD License\r
7 which accompanies this distribution. The full text of the license may be found at\r
8 http://opensource.org/licenses/bsd-license.php\r
9\r
10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
12\r
13 Module Name: SmmStandbyButtonDispatch.h\r
14\r
15 @par Revision Reference:\r
16 This Protocol is defined in Framework of EFI SMM Core Interface Spec\r
17 Version 0.9.\r
18\r
19**/\r
20\r
21#ifndef _EFI_SMM_STANDBY_BUTTON_DISPATCH_H_\r
22#define _EFI_SMM_STANDBY_BUTTON_DISPATCH_H_\r
23\r
24#include <PiDxe.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// Standby Button. Example, Use for changing LEDs before ACPI OS is on.\r
41// - DXE/BDS Phase\r
42// - OS Install Phase\r
43//\r
44typedef enum {\r
45 EfiStandbyButtonEntry,\r
46 EfiStandbyButtonExit,\r
47 EfiStandbyButtonMax\r
48} EFI_STANDBY_BUTTON_PHASE;\r
49\r
50typedef struct {\r
51 EFI_STANDBY_BUTTON_PHASE Phase;\r
52} EFI_SMM_STANDBY_BUTTON_DISPATCH_CONTEXT;\r
53\r
54//\r
55// Member functions\r
56//\r
57/**\r
58 Dispatch function for a Standby Button SMI handler.\r
59\r
60 @param DispatchHandle Handle of this dispatch function.\r
61 @param DispatchContext Pointer to the dispatch function's context.\r
62 The DispatchContext fields are filled in\r
63 by the dispatching driver prior to\r
64 invoking this dispatch function.\r
65\r
66 @return None\r
67\r
68**/\r
69typedef\r
70VOID\r
71(EFIAPI *EFI_SMM_STANDBY_BUTTON_DISPATCH)(\r
72 IN EFI_HANDLE DispatchHandle,\r
73 IN EFI_SMM_STANDBY_BUTTON_DISPATCH_CONTEXT *DispatchContext\r
74 );\r
75\r
76/**\r
77 Provides the parent dispatch service for a given SMI source generator\r
78\r
79 @param This Pointer to the EFI_SMM_STANDBY_BUTTON_DISPATCH_PROTOCOL instance.\r
80 @param DispatchFunction Function to install.\r
81 @param DispatchContext Pointer to the dispatch function's context.\r
82 The caller fills this context in before calling\r
83 the register function to indicate to the register\r
84 function the Standby Button SMI phase for which the dispatch\r
85 function should be invoked.\r
86 @param DispatchHandle Handle generated by the dispatcher to track the function instance.\r
87\r
88 @retval EFI_SUCCESS The dispatch function has been successfully\r
89 registered and the SMI source has been enabled.\r
90 @retval EFI_DEVICE_ERROR The driver was unable to enable the SMI source.\r
91 @retval EFI_OUT_OF_RESOURCES Not enough memory (system or SMM) to manage this\r
92 child.\r
93 @retval EFI_INVALID_PARAMETER DispatchContext is invalid. The Standby Button SMI\r
94 phase is not within valid range.\r
95\r
96**/\r
97typedef\r
98EFI_STATUS\r
99(EFIAPI *EFI_SMM_STANDBY_BUTTON_REGISTER)(\r
100 IN EFI_SMM_STANDBY_BUTTON_DISPATCH_PROTOCOL *This,\r
101 IN EFI_SMM_STANDBY_BUTTON_DISPATCH DispatchFunction,\r
102 IN EFI_SMM_STANDBY_BUTTON_DISPATCH_CONTEXT *DispatchContext,\r
103 OUT EFI_HANDLE *DispatchHandle\r
104 );\r
105\r
106/**\r
107 Unregister a child SMI source dispatch function with a parent SMM driver\r
108\r
109 @param This Pointer to the EFI_SMM_STANDBY_BUTTON_DISPATCH_PROTOCOL instance.\r
110 @param DispatchHandle Handle of the service to remove.\r
111\r
112 @retval EFI_SUCCESS The dispatch function has been successfully\r
113 unregistered and the SMI source has been disabled\r
114 if there are no other registered child dispatch\r
115 functions for this SMI source.\r
116 @retval EFI_INVALID_PARAMETER Handle is invalid.\r
117\r
118**/\r
119typedef\r
120EFI_STATUS\r
121(EFIAPI *EFI_SMM_STANDBY_BUTTON_UNREGISTER)(\r
122 IN EFI_SMM_STANDBY_BUTTON_DISPATCH_PROTOCOL *This,\r
123 IN EFI_HANDLE DispatchHandle\r
124 );\r
125\r
126//\r
127// Interface structure for the SMM Standby Button SMI Dispatch Protocol\r
128//\r
129/**\r
130 @par Protocol Description:\r
131 Provides the parent dispatch service for the standby button SMI source generator.\r
132\r
133 @param Register\r
134 Installs a child service to be dispatched by this protocol.\r
135\r
136 @param UnRegister\r
137 Removes a child service dispatched by this protocol.\r
138\r
139**/\r
140struct _EFI_SMM_STANDBY_BUTTON_DISPATCH_PROTOCOL {\r
141 EFI_SMM_STANDBY_BUTTON_REGISTER Register;\r
142 EFI_SMM_STANDBY_BUTTON_UNREGISTER UnRegister;\r
143};\r
144\r
145extern EFI_GUID gEfiSmmStandbyButtonDispatchProtocolGuid;\r
146\r
147#endif\r