]> git.proxmox.com Git - mirror_edk2.git/blame - IntelFrameworkPkg/Include/Protocol/SmmStandbyButtonDispatch.h
add some framework definitions
[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
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
37//\r
38// Standby Button. Example, Use for changing LEDs before ACPI OS is on.\r
39// - DXE/BDS Phase\r
40// - OS Install Phase\r
41//\r
42typedef enum {\r
43 EfiStandbyButtonEntry,\r
44 EfiStandbyButtonExit,\r
45 EfiStandbyButtonMax\r
46} EFI_STANDBY_BUTTON_PHASE;\r
47\r
48typedef struct {\r
49 EFI_STANDBY_BUTTON_PHASE Phase;\r
50} EFI_SMM_STANDBY_BUTTON_DISPATCH_CONTEXT;\r
51\r
52//\r
53// Member functions\r
54//\r
55/**\r
56 Dispatch function for a Standby Button SMI handler.\r
57\r
58 @param DispatchHandle Handle of this dispatch function.\r
59 @param DispatchContext Pointer to the dispatch function's context.\r
60 The DispatchContext fields are filled in\r
61 by the dispatching driver prior to\r
62 invoking this dispatch function.\r
63\r
64 @return Nothing\r
65\r
66**/\r
67typedef\r
68VOID\r
69(EFIAPI *EFI_SMM_STANDBY_BUTTON_DISPATCH) (\r
70 IN EFI_HANDLE DispatchHandle,\r
71 IN EFI_SMM_STANDBY_BUTTON_DISPATCH_CONTEXT *DispatchContext\r
72 );\r
73\r
74/**\r
75 Register a child SMI source dispatch function with a parent SMM driver\r
76\r
77 @param This Protocol instance pointer.\r
78 @param DispatchFunction Pointer to dispatch function to be invoked for\r
79 this SMI source\r
80 @param DispatchContext Pointer to the dispatch function's context.\r
81 The caller fills this context in before calling\r
82 the register function to indicate to the register\r
83 function the Standby Button SMI phase for which the dispatch\r
84 function should be invoked.\r
85 @param DispatchHandle Handle of dispatch function, for when interfacing\r
86 with the parent Sx state SMM driver.\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 Protocol instance pointer.\r
110 @param DispatchHandle Handle of dispatch function to deregister.\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 @retval other TBD\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 @par Protocol Description:\r
132 Provides the parent dispatch service for the standby button SMI source generator.\r
133\r
134 @param Register\r
135 Installs a child service to be dispatched by this protocol.\r
136\r
137 @param UnRegister\r
138 Removes a child service dispatched by this protocol.\r
139\r
140**/\r
141struct _EFI_SMM_STANDBY_BUTTON_DISPATCH_PROTOCOL {\r
142 EFI_SMM_STANDBY_BUTTON_REGISTER Register;\r
143 EFI_SMM_STANDBY_BUTTON_UNREGISTER UnRegister;\r
144};\r
145\r
146extern EFI_GUID gEfiSmmStandbyButtonDispatchProtocolGuid;\r
147\r
148#endif\r