]> git.proxmox.com Git - mirror_edk2.git/blame - IntelFrameworkPkg/Include/Protocol/SmmStandbyButtonDispatch.h
Reviewed the description in the FatBinPkg .dec file.
[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
79964ac8 8 Copyright (c) 2007, 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
79964ac8 17**/\r
18\r
19#ifndef _EFI_SMM_STANDBY_BUTTON_DISPATCH_H_\r
20#define _EFI_SMM_STANDBY_BUTTON_DISPATCH_H_\r
21\r
79a0adf3 22#include <FrameworkSmm.h>\r
b80fbe85 23\r
79964ac8 24//\r
25// Global ID for the Standby Button SMI Protocol\r
26//\r
27#define EFI_SMM_STANDBY_BUTTON_DISPATCH_PROTOCOL_GUID \\r
28 { \\r
29 0x78965b98, 0xb0bf, 0x449e, {0x8b, 0x22, 0xd2, 0x91, 0x4e, 0x49, 0x8a, 0x98 } \\r
30 }\r
31\r
32typedef struct _EFI_SMM_STANDBY_BUTTON_DISPATCH_PROTOCOL EFI_SMM_STANDBY_BUTTON_DISPATCH_PROTOCOL;\r
33\r
34//\r
35// Related Definitions\r
36//\r
79a0adf3 37\r
79964ac8 38//\r
39// Standby Button. Example, Use for changing LEDs before ACPI OS is on.\r
40// - DXE/BDS Phase\r
41// - OS Install Phase\r
42//\r
43typedef enum {\r
44 EfiStandbyButtonEntry,\r
79a0adf3 45 EfiStandbyButtonExit\r
79964ac8 46} EFI_STANDBY_BUTTON_PHASE;\r
47\r
48typedef struct {\r
79a0adf3 49 //\r
50 // Describes whether the child handler should be invoked upon the entry to the button\r
51 // activation or upon exit (i.e., upon receipt of the button press event or upon release of\r
52 // the event).\r
53 //\r
79964ac8 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
79a0adf3 60\r
79964ac8 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
79964ac8 70**/\r
71typedef\r
72VOID\r
69686d56 73(EFIAPI *EFI_SMM_STANDBY_BUTTON_DISPATCH)(\r
79964ac8 74 IN EFI_HANDLE DispatchHandle,\r
75 IN EFI_SMM_STANDBY_BUTTON_DISPATCH_CONTEXT *DispatchContext\r
76 );\r
77\r
78/**\r
700a7869 79 Provides the parent dispatch service for a given SMI source generator\r
79964ac8 80\r
700a7869 81 @param This Pointer to the EFI_SMM_STANDBY_BUTTON_DISPATCH_PROTOCOL instance.\r
82 @param DispatchFunction Function to install.\r
79964ac8 83 @param DispatchContext Pointer to the dispatch function's context.\r
84 The caller fills this context in before calling\r
85 the register function to indicate to the register\r
86 function the Standby Button SMI phase for which the dispatch\r
87 function should be invoked.\r
700a7869 88 @param DispatchHandle Handle generated by the dispatcher to track the function instance.\r
79964ac8 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
69686d56 101(EFIAPI *EFI_SMM_STANDBY_BUTTON_REGISTER)(\r
700a7869 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
79964ac8 106 );\r
107\r
108/**\r
109 Unregister a child SMI source dispatch function with a parent SMM driver\r
110\r
79a0adf3 111 @param This Pointer to the EFI_SMM_STANDBY_BUTTON_DISPATCH_PROTOCOL instance.\r
112 @param DispatchHandle Handle of the service to remove.\r
79964ac8 113\r
79a0adf3 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
79964ac8 119\r
120**/\r
121typedef\r
122EFI_STATUS\r
69686d56 123(EFIAPI *EFI_SMM_STANDBY_BUTTON_UNREGISTER)(\r
79a0adf3 124 IN EFI_SMM_STANDBY_BUTTON_DISPATCH_PROTOCOL *This,\r
125 IN EFI_HANDLE DispatchHandle\r
79964ac8 126 );\r
127\r
128//\r
129// Interface structure for the SMM Standby Button SMI Dispatch Protocol\r
130//\r
79964ac8 131\r
79964ac8 132struct _EFI_SMM_STANDBY_BUTTON_DISPATCH_PROTOCOL {\r
133 EFI_SMM_STANDBY_BUTTON_REGISTER Register;\r
134 EFI_SMM_STANDBY_BUTTON_UNREGISTER UnRegister;\r
135};\r
136\r
137extern EFI_GUID gEfiSmmStandbyButtonDispatchProtocolGuid;\r
138\r
139#endif\r