]> git.proxmox.com Git - mirror_edk2.git/blob - IntelFrameworkPkg/Include/Protocol/SmmStandbyButtonDispatch.h
add some definitions about HII
[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 #include <PiDxe.h>
25
26 //
27 // Global ID for the Standby Button SMI Protocol
28 //
29 #define EFI_SMM_STANDBY_BUTTON_DISPATCH_PROTOCOL_GUID \
30 { \
31 0x78965b98, 0xb0bf, 0x449e, {0x8b, 0x22, 0xd2, 0x91, 0x4e, 0x49, 0x8a, 0x98 } \
32 }
33
34 typedef struct _EFI_SMM_STANDBY_BUTTON_DISPATCH_PROTOCOL EFI_SMM_STANDBY_BUTTON_DISPATCH_PROTOCOL;
35
36 //
37 // Related Definitions
38 //
39 //
40 // Standby Button. Example, Use for changing LEDs before ACPI OS is on.
41 // - DXE/BDS Phase
42 // - OS Install Phase
43 //
44 typedef enum {
45 EfiStandbyButtonEntry,
46 EfiStandbyButtonExit,
47 EfiStandbyButtonMax
48 } EFI_STANDBY_BUTTON_PHASE;
49
50 typedef struct {
51 EFI_STANDBY_BUTTON_PHASE Phase;
52 } EFI_SMM_STANDBY_BUTTON_DISPATCH_CONTEXT;
53
54 //
55 // Member functions
56 //
57 /**
58 Dispatch function for a Standby Button SMI handler.
59
60 @param DispatchHandle Handle of this dispatch function.
61 @param DispatchContext Pointer to the dispatch function's context.
62 The DispatchContext fields are filled in
63 by the dispatching driver prior to
64 invoking this dispatch function.
65
66 @return Nothing
67
68 **/
69 typedef
70 VOID
71 (EFIAPI *EFI_SMM_STANDBY_BUTTON_DISPATCH) (
72 IN EFI_HANDLE DispatchHandle,
73 IN EFI_SMM_STANDBY_BUTTON_DISPATCH_CONTEXT *DispatchContext
74 );
75
76 /**
77 Register a child SMI source dispatch function with a parent SMM driver
78
79 @param This Protocol instance pointer.
80 @param DispatchFunction Pointer to dispatch function to be invoked for
81 this SMI source
82 @param DispatchContext Pointer to the dispatch function's context.
83 The caller fills this context in before calling
84 the register function to indicate to the register
85 function the Standby Button SMI phase for which the dispatch
86 function should be invoked.
87 @param DispatchHandle Handle of dispatch function, for when interfacing
88 with the parent Sx state SMM driver.
89
90 @retval EFI_SUCCESS The dispatch function has been successfully
91 registered and the SMI source has been enabled.
92 @retval EFI_DEVICE_ERROR The driver was unable to enable the SMI source.
93 @retval EFI_OUT_OF_RESOURCES Not enough memory (system or SMM) to manage this
94 child.
95 @retval EFI_INVALID_PARAMETER DispatchContext is invalid. The Standby Button SMI
96 phase is not within valid range.
97
98 **/
99 typedef
100 EFI_STATUS
101 (EFIAPI *EFI_SMM_STANDBY_BUTTON_REGISTER) (
102 IN EFI_SMM_STANDBY_BUTTON_DISPATCH_PROTOCOL *This,
103 IN EFI_SMM_STANDBY_BUTTON_DISPATCH DispatchFunction,
104 IN EFI_SMM_STANDBY_BUTTON_DISPATCH_CONTEXT *DispatchContext,
105 OUT EFI_HANDLE *DispatchHandle
106 );
107
108 /**
109 Unregister a child SMI source dispatch function with a parent SMM driver
110
111 @param This Protocol instance pointer.
112 @param DispatchHandle Handle of dispatch function to deregister.
113
114 @retval EFI_SUCCESS The dispatch function has been successfully
115 unregistered and the SMI source has been disabled
116 if there are no other registered child dispatch
117 functions for this SMI source.
118 @retval EFI_INVALID_PARAMETER Handle is invalid.
119 @retval other TBD
120
121 **/
122 typedef
123 EFI_STATUS
124 (EFIAPI *EFI_SMM_STANDBY_BUTTON_UNREGISTER) (
125 IN EFI_SMM_STANDBY_BUTTON_DISPATCH_PROTOCOL *This,
126 IN EFI_HANDLE DispatchHandle
127 );
128
129 //
130 // Interface structure for the SMM Standby Button SMI Dispatch Protocol
131 //
132 /**
133 @par Protocol Description:
134 Provides the parent dispatch service for the standby button SMI source generator.
135
136 @param Register
137 Installs a child service to be dispatched by this protocol.
138
139 @param UnRegister
140 Removes a child service dispatched by this protocol.
141
142 **/
143 struct _EFI_SMM_STANDBY_BUTTON_DISPATCH_PROTOCOL {
144 EFI_SMM_STANDBY_BUTTON_REGISTER Register;
145 EFI_SMM_STANDBY_BUTTON_UNREGISTER UnRegister;
146 };
147
148 extern EFI_GUID gEfiSmmStandbyButtonDispatchProtocolGuid;
149
150 #endif