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 - 2018, Intel Corporation. All rights reserved.<BR>
9 SPDX-License-Identifier: BSD-2-Clause-Patent
11 @par Revision Reference:
12 This Protocol is defined in Framework of EFI SMM Core Interface Spec
17 #ifndef _EFI_SMM_STANDBY_BUTTON_DISPATCH_H_
18 #define _EFI_SMM_STANDBY_BUTTON_DISPATCH_H_
21 // Share some common definitions with PI SMM
23 #include <Protocol/SmmStandbyButtonDispatch2.h>
26 // Global ID for the Standby Button SMI Protocol
28 #define EFI_SMM_STANDBY_BUTTON_DISPATCH_PROTOCOL_GUID \
30 0x78965b98, 0xb0bf, 0x449e, {0x8b, 0x22, 0xd2, 0x91, 0x4e, 0x49, 0x8a, 0x98 } \
33 typedef struct _EFI_SMM_STANDBY_BUTTON_DISPATCH_PROTOCOL EFI_SMM_STANDBY_BUTTON_DISPATCH_PROTOCOL
;
36 // Related Definitions
40 /// Describes whether the child handler should be invoked upon the entry to the button
41 /// activation or upon exit (i.e., upon receipt of the button press event or upon release of
43 EFI_STANDBY_BUTTON_PHASE Phase
;
44 } EFI_SMM_STANDBY_BUTTON_DISPATCH_CONTEXT
;
51 Dispatch function for a Standby Button SMI handler.
53 @param DispatchHandle The handle of this dispatch function.
54 @param DispatchContext The pointer to the dispatch function's context.
55 The DispatchContext fields are filled in
56 by the dispatching driver prior to
57 invoking this dispatch function.
62 (EFIAPI
*EFI_SMM_STANDBY_BUTTON_DISPATCH
)(
63 IN EFI_HANDLE DispatchHandle
,
64 IN EFI_SMM_STANDBY_BUTTON_DISPATCH_CONTEXT
*DispatchContext
68 Provides the parent dispatch service for a given SMI source generator
70 @param This The pointer to the EFI_SMM_STANDBY_BUTTON_DISPATCH_PROTOCOL instance.
71 @param DispatchFunction The function to install.
72 @param DispatchContext The pointer to the dispatch function's context.
73 Indicates to the register function the Standby
74 Button SMI phase for which to invoke the dispatch
76 @param DispatchHandle The handle generated by the dispatcher to track the
79 @retval EFI_SUCCESS The dispatch function has been successfully
80 registered, and the SMI source has been enabled.
81 @retval EFI_DEVICE_ERROR The driver could not enable the SMI source.
82 @retval EFI_OUT_OF_RESOURCES Not enough memory (system or SMM) to manage this
84 @retval EFI_INVALID_PARAMETER DispatchContext is invalid. The Standby Button SMI
85 phase is not within valid range.
90 (EFIAPI
*EFI_SMM_STANDBY_BUTTON_REGISTER
)(
91 IN EFI_SMM_STANDBY_BUTTON_DISPATCH_PROTOCOL
*This
,
92 IN EFI_SMM_STANDBY_BUTTON_DISPATCH DispatchFunction
,
93 IN EFI_SMM_STANDBY_BUTTON_DISPATCH_CONTEXT
*DispatchContext
,
94 OUT EFI_HANDLE
*DispatchHandle
98 Unregister a child SMI source dispatch function with a parent SMM driver.
100 @param This The pointer to the EFI_SMM_STANDBY_BUTTON_DISPATCH_PROTOCOL instance.
101 @param DispatchHandle The handle of the service to remove.
103 @retval EFI_SUCCESS The dispatch function has been successfully
104 unregistered, and the SMI source has been disabled,
105 if there are no other registered child dispatch
106 functions for this SMI source.
107 @retval EFI_INVALID_PARAMETER The handle is invalid.
112 (EFIAPI
*EFI_SMM_STANDBY_BUTTON_UNREGISTER
)(
113 IN EFI_SMM_STANDBY_BUTTON_DISPATCH_PROTOCOL
*This
,
114 IN EFI_HANDLE DispatchHandle
118 // Interface structure for the SMM Standby Button SMI Dispatch Protocol
121 This protocol provices the parent dispatch service for the standby button SMI source generator.
122 Provides the ability to install child handlers for the given event types.
124 struct _EFI_SMM_STANDBY_BUTTON_DISPATCH_PROTOCOL
{
126 /// Installs a child service to be dispatched by this protocol.
128 EFI_SMM_STANDBY_BUTTON_REGISTER Register
;\
130 /// Removes a child service dispatched by this protocol.
132 EFI_SMM_STANDBY_BUTTON_UNREGISTER UnRegister
;
135 extern EFI_GUID gEfiSmmStandbyButtonDispatchProtocolGuid
;