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