]> git.proxmox.com Git - mirror_edk2.git/blame - IntelFrameworkPkg/Include/Protocol/SmmStandbyButtonDispatch.h
Update to BSD license header.
[mirror_edk2.git] / IntelFrameworkPkg / Include / Protocol / SmmStandbyButtonDispatch.h
CommitLineData
79964ac8 1/** @file\r
2 This file declares EFI Smm Standby Button Smi Child Protocol\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
b80fbe85 24#include <PiDxe.h>\r
25\r
79964ac8 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 Nothing\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 Register a child SMI source dispatch function with a parent SMM driver\r
78\r
79 @param This Protocol instance pointer.\r
80 @param DispatchFunction Pointer to dispatch function to be invoked for\r
81 this SMI source\r
82 @param DispatchContext Pointer to the dispatch function's context.\r
83 The caller fills this context in before calling\r
84 the register function to indicate to the register\r
85 function the Standby Button SMI phase for which the dispatch\r
86 function should be invoked.\r
87 @param DispatchHandle Handle of dispatch function, for when interfacing\r
88 with the parent Sx state SMM driver.\r
89\r
90 @retval EFI_SUCCESS The dispatch function has been successfully\r
91 registered and the SMI source has been enabled.\r
92 @retval EFI_DEVICE_ERROR The driver was unable to enable the SMI source.\r
93 @retval EFI_OUT_OF_RESOURCES Not enough memory (system or SMM) to manage this\r
94 child.\r
95 @retval EFI_INVALID_PARAMETER DispatchContext is invalid. The Standby Button SMI\r
96 phase is not within valid range.\r
97\r
98**/\r
99typedef\r
100EFI_STATUS\r
101(EFIAPI *EFI_SMM_STANDBY_BUTTON_REGISTER) (\r
102 IN EFI_SMM_STANDBY_BUTTON_DISPATCH_PROTOCOL *This,\r
103 IN EFI_SMM_STANDBY_BUTTON_DISPATCH DispatchFunction,\r
104 IN EFI_SMM_STANDBY_BUTTON_DISPATCH_CONTEXT *DispatchContext,\r
105 OUT EFI_HANDLE *DispatchHandle\r
106 );\r
107\r
108/**\r
109 Unregister a child SMI source dispatch function with a parent SMM driver\r
110\r
111 @param This Protocol instance pointer.\r
112 @param DispatchHandle Handle of dispatch function to deregister.\r
113\r
114 @retval EFI_SUCCESS The dispatch function has been successfully\r
115 unregistered and the SMI source has been disabled\r
116 if there are no other registered child dispatch\r
117 functions for this SMI source.\r
118 @retval EFI_INVALID_PARAMETER Handle is invalid.\r
119 @retval other TBD\r
120\r
121**/\r
122typedef\r
123EFI_STATUS\r
124(EFIAPI *EFI_SMM_STANDBY_BUTTON_UNREGISTER) (\r
125 IN EFI_SMM_STANDBY_BUTTON_DISPATCH_PROTOCOL *This,\r
126 IN EFI_HANDLE DispatchHandle\r
127 );\r
128\r
129//\r
130// Interface structure for the SMM Standby Button SMI Dispatch Protocol\r
131//\r
132/**\r
133 @par Protocol Description:\r
134 Provides the parent dispatch service for the standby button SMI source generator.\r
135\r
136 @param Register\r
137 Installs a child service to be dispatched by this protocol.\r
138\r
139 @param UnRegister\r
140 Removes a child service dispatched by this protocol.\r
141\r
142**/\r
143struct _EFI_SMM_STANDBY_BUTTON_DISPATCH_PROTOCOL {\r
144 EFI_SMM_STANDBY_BUTTON_REGISTER Register;\r
145 EFI_SMM_STANDBY_BUTTON_UNREGISTER UnRegister;\r
146};\r
147\r
148extern EFI_GUID gEfiSmmStandbyButtonDispatchProtocolGuid;\r
149\r
150#endif\r