]> git.proxmox.com Git - mirror_edk2.git/blob - EdkCompatibilityPkg/Foundation/Framework/Protocol/SmmStandbyButtonDispatch/SmmStandbyButtonDispatch.h
Add in the 1st version of ECP.
[mirror_edk2.git] / EdkCompatibilityPkg / Foundation / Framework / Protocol / SmmStandbyButtonDispatch / SmmStandbyButtonDispatch.h
1 /*++
2
3 Copyright (c) 1999 - 2002, Intel Corporation
4 All rights reserved. This program and the accompanying materials
5 are licensed and made available under the terms and conditions of the BSD License
6 which accompanies this distribution. The full text of the license may be found at
7 http://opensource.org/licenses/bsd-license.php
8
9 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
11
12
13 Module Name:
14
15 SmmStandbyButtonDispatch.h
16
17 Abstract:
18
19 EFI Smm Standby Button Smi Child Protocol
20
21 Revision History
22
23 --*/
24
25 #ifndef _EFI_SMM_STANDBY_BUTTON_DISPATCH_H_
26 #define _EFI_SMM_STANDBY_BUTTON_DISPATCH_H_
27
28 //
29 // Global ID for the Standby Button SMI Protocol
30 //
31 #define EFI_SMM_STANDBY_BUTTON_DISPATCH_PROTOCOL_GUID \
32 { \
33 0x78965b98, 0xb0bf, 0x449e, 0x8b, 0x22, 0xd2, 0x91, 0x4e, 0x49, 0x8a, 0x98 \
34 }
35
36 EFI_FORWARD_DECLARATION (EFI_SMM_STANDBY_BUTTON_DISPATCH_PROTOCOL);
37
38 //
39 // Related Definitions
40 //
41 //
42 // Standby Button. Example, Use for changing LEDs before ACPI OS is on.
43 // - DXE/BDS Phase
44 // - OS Install Phase
45 //
46 typedef enum {
47 Entry,
48 Exit
49 } EFI_STANDBY_BUTTON_PHASE;
50
51 typedef struct {
52 EFI_STANDBY_BUTTON_PHASE Phase;
53 } EFI_SMM_STANDBY_BUTTON_DISPATCH_CONTEXT;
54
55 //
56 // Member functions
57 //
58 typedef
59 VOID
60 (EFIAPI *EFI_SMM_STANDBY_BUTTON_DISPATCH) (
61 IN EFI_HANDLE DispatchHandle,
62 IN EFI_SMM_STANDBY_BUTTON_DISPATCH_CONTEXT * DispatchContext
63 );
64
65 /*++
66
67 Routine Description:
68 Dispatch function for a Standby Button SMI handler.
69
70 Arguments:
71 DispatchHandle - Handle of this dispatch function.
72 DispatchContext - Pointer to the dispatch function's context.
73 The DispatchContext fields are filled in
74 by the dispatching driver prior to
75 invoking this dispatch function.
76
77 Returns:
78 Nothing
79
80 --*/
81 typedef
82 EFI_STATUS
83 (EFIAPI *EFI_SMM_STANDBY_BUTTON_REGISTER) (
84 IN EFI_SMM_STANDBY_BUTTON_DISPATCH_PROTOCOL * This,
85 IN EFI_SMM_STANDBY_BUTTON_DISPATCH DispatchFunction,
86 IN EFI_SMM_STANDBY_BUTTON_DISPATCH_CONTEXT * DispatchContext,
87 OUT EFI_HANDLE * DispatchHandle
88 );
89
90 /*++
91
92 Routine Description:
93 Register a child SMI source dispatch function with a parent SMM driver
94
95 Arguments:
96 This - Protocol instance pointer.
97 DispatchFunction - Pointer to dispatch function to be invoked for
98 this SMI source
99 DispatchContext - Pointer to the dispatch function's context.
100 The caller fills this context in before calling
101 the register function to indicate to the register
102 function the Standby Button SMI phase for which the dispatch
103 function should be invoked.
104 DispatchHandle - Handle of dispatch function, for when interfacing
105 with the parent Sx state SMM driver.
106
107 Returns:
108 EFI_SUCCESS - The dispatch function has been successfully
109 registered and the SMI source has been enabled.
110 EFI_DEVICE_ERROR - The driver was unable to enable the SMI source.
111 EFI_OUT_OF_RESOURCES - Not enough memory (system or SMM) to manage this
112 child.
113 EFI_INVALID_PARAMETER - DispatchContext is invalid. The Standby Button SMI
114 phase is not within valid range.
115
116 --*/
117 typedef
118 EFI_STATUS
119 (EFIAPI *EFI_SMM_STANDBY_BUTTON_UNREGISTER) (
120 IN EFI_SMM_STANDBY_BUTTON_DISPATCH_PROTOCOL * This,
121 IN EFI_HANDLE DispatchHandle
122 );
123
124 /*++
125
126 Routine Description:
127 Unregister a child SMI source dispatch function with a parent SMM driver
128
129 Arguments:
130 This - Protocol instance pointer.
131 DispatchHandle - Handle of dispatch function to deregister.
132
133 Returns:
134 EFI_SUCCESS - The dispatch function has been successfully
135 unregistered and the SMI source has been disabled
136 if there are no other registered child dispatch
137 functions for this SMI source.
138 EFI_INVALID_PARAMETER - Handle is invalid.
139 other - TBD
140
141 --*/
142
143 //
144 // Interface structure for the SMM Standby Button SMI Dispatch Protocol
145 //
146 typedef struct _EFI_SMM_STANDBY_BUTTON_DISPATCH_PROTOCOL {
147 EFI_SMM_STANDBY_BUTTON_REGISTER Register;
148 EFI_SMM_STANDBY_BUTTON_UNREGISTER UnRegister;
149 } EFI_SMM_STANDBY_BUTTON_DISPATCH_PROTOCOL;
150
151 extern EFI_GUID gEfiSmmStandbyButtonDispatchProtocolGuid;
152
153 #endif