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