2 Provides the parent dispatch service for the standby button SMI source generator.
4 The SMM Standby Button Dispatch Protocol is defined in
5 the Intel Platform Innovation Framework for EFI SMM Core Interface Specification
8 Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>
9 This program and the accompanying materials are licensed and made available under
10 the terms and conditions of the BSD License that accompanies this distribution.
11 The full text of the license may be found at
12 http://opensource.org/licenses/bsd-license.php.
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.
17 @par Revision Reference:
18 This Protocol is defined in Framework of EFI SMM Core Interface Spec
23 #ifndef _EFI_SMM_STANDBY_BUTTON_DISPATCH_H_
24 #define _EFI_SMM_STANDBY_BUTTON_DISPATCH_H_
27 // Share some common definitions with PI SMM
29 #include <Protocol/SmmStandbyButtonDispatch2.h>
32 // Global ID for the Standby Button SMI Protocol
34 #define EFI_SMM_STANDBY_BUTTON_DISPATCH_PROTOCOL_GUID \
36 0x78965b98, 0xb0bf, 0x449e, {0x8b, 0x22, 0xd2, 0x91, 0x4e, 0x49, 0x8a, 0x98 } \
39 typedef struct _EFI_SMM_STANDBY_BUTTON_DISPATCH_PROTOCOL EFI_SMM_STANDBY_BUTTON_DISPATCH_PROTOCOL
;
42 // Related Definitions
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
49 EFI_STANDBY_BUTTON_PHASE Phase
;
50 } EFI_SMM_STANDBY_BUTTON_DISPATCH_CONTEXT
;
57 Dispatch function for a Standby Button SMI handler.
59 @param DispatchHandle The handle of this dispatch function.
60 @param DispatchContext The 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.
68 (EFIAPI
*EFI_SMM_STANDBY_BUTTON_DISPATCH
)(
69 IN EFI_HANDLE DispatchHandle
,
70 IN EFI_SMM_STANDBY_BUTTON_DISPATCH_CONTEXT
*DispatchContext
74 Provides the parent dispatch service for a given SMI source generator
76 @param This The pointer to the EFI_SMM_STANDBY_BUTTON_DISPATCH_PROTOCOL instance.
77 @param DispatchFunction The function to install.
78 @param DispatchContext The pointer to the dispatch function's context.
79 Indicates to the register function the Standby
80 Button SMI phase for which to invoke the dispatch
82 @param DispatchHandle The handle generated by the dispatcher to track the
85 @retval EFI_SUCCESS The dispatch function has been successfully
86 registered, and the SMI source has been enabled.
87 @retval EFI_DEVICE_ERROR The driver could not enable the SMI source.
88 @retval EFI_OUT_OF_RESOURCES Not enough memory (system or SMM) to manage this
90 @retval EFI_INVALID_PARAMETER DispatchContext is invalid. The Standby Button SMI
91 phase is not within valid range.
96 (EFIAPI
*EFI_SMM_STANDBY_BUTTON_REGISTER
)(
97 IN EFI_SMM_STANDBY_BUTTON_DISPATCH_PROTOCOL
*This
,
98 IN EFI_SMM_STANDBY_BUTTON_DISPATCH DispatchFunction
,
99 IN EFI_SMM_STANDBY_BUTTON_DISPATCH_CONTEXT
*DispatchContext
,
100 OUT EFI_HANDLE
*DispatchHandle
104 Unregister a child SMI source dispatch function with a parent SMM driver.
106 @param This The pointer to the EFI_SMM_STANDBY_BUTTON_DISPATCH_PROTOCOL instance.
107 @param DispatchHandle The handle of the service to remove.
109 @retval EFI_SUCCESS The dispatch function has been successfully
110 unregistered, and the SMI source has been disabled,
111 if there are no other registered child dispatch
112 functions for this SMI source.
113 @retval EFI_INVALID_PARAMETER The handle is invalid.
118 (EFIAPI
*EFI_SMM_STANDBY_BUTTON_UNREGISTER
)(
119 IN EFI_SMM_STANDBY_BUTTON_DISPATCH_PROTOCOL
*This
,
120 IN EFI_HANDLE DispatchHandle
124 // Interface structure for the SMM Standby Button SMI Dispatch Protocol
127 This protocol provices the parent dispatch service for the standby button SMI source generator.
128 Provides the ability to install child handlers for the given event types.
130 struct _EFI_SMM_STANDBY_BUTTON_DISPATCH_PROTOCOL
{
132 /// Installs a child service to be dispatched by this protocol.
134 EFI_SMM_STANDBY_BUTTON_REGISTER Register
;\
136 /// Removes a child service dispatched by this protocol.
138 EFI_SMM_STANDBY_BUTTON_UNREGISTER UnRegister
;
141 extern EFI_GUID gEfiSmmStandbyButtonDispatchProtocolGuid
;