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, 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
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 // Global ID for the Standby Button SMI Protocol
29 #define EFI_SMM_STANDBY_BUTTON_DISPATCH_PROTOCOL_GUID \
31 0x78965b98, 0xb0bf, 0x449e, {0x8b, 0x22, 0xd2, 0x91, 0x4e, 0x49, 0x8a, 0x98 } \
34 typedef struct _EFI_SMM_STANDBY_BUTTON_DISPATCH_PROTOCOL EFI_SMM_STANDBY_BUTTON_DISPATCH_PROTOCOL
;
37 // Related Definitions
41 /// Standby Button. Example, Use for changing LEDs before ACPI OS is on.
43 /// - OS Install Phase
46 EfiStandbyButtonEntry
,
48 } EFI_STANDBY_BUTTON_PHASE
;
51 /// Describes whether the child handler should be invoked upon the entry to the button
52 /// activation or upon exit (i.e., upon receipt of the button press event or upon release of
54 EFI_STANDBY_BUTTON_PHASE Phase
;
55 } EFI_SMM_STANDBY_BUTTON_DISPATCH_CONTEXT
;
62 Dispatch function for a Standby Button SMI handler.
64 @param DispatchHandle Handle of this dispatch function.
65 @param DispatchContext Pointer to the dispatch function's context.
66 The DispatchContext fields are filled in
67 by the dispatching driver prior to
68 invoking this dispatch function.
73 (EFIAPI
*EFI_SMM_STANDBY_BUTTON_DISPATCH
)(
74 IN EFI_HANDLE DispatchHandle
,
75 IN EFI_SMM_STANDBY_BUTTON_DISPATCH_CONTEXT
*DispatchContext
79 Provides the parent dispatch service for a given SMI source generator
81 @param This Pointer to the EFI_SMM_STANDBY_BUTTON_DISPATCH_PROTOCOL instance.
82 @param DispatchFunction Function to install.
83 @param DispatchContext Pointer to the dispatch function's context.
84 The caller fills this context in before calling
85 the register function to indicate to the register
86 function the Standby Button SMI phase for which the dispatch
87 function should be invoked.
88 @param DispatchHandle Handle generated by the dispatcher to track the function instance.
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
95 @retval EFI_INVALID_PARAMETER DispatchContext is invalid. The Standby Button SMI
96 phase is not within valid range.
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
109 Unregister a child SMI source dispatch function with a parent SMM driver
111 @param This Pointer to the EFI_SMM_STANDBY_BUTTON_DISPATCH_PROTOCOL instance.
112 @param DispatchHandle Handle of the service to remove.
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.
123 (EFIAPI
*EFI_SMM_STANDBY_BUTTON_UNREGISTER
)(
124 IN EFI_SMM_STANDBY_BUTTON_DISPATCH_PROTOCOL
*This
,
125 IN EFI_HANDLE DispatchHandle
129 // Interface structure for the SMM Standby Button SMI Dispatch Protocol
132 This protocol provices the parent dispatch service for the standby button SMI source generator.
133 Provides the ability to install child handlers for the given event types.
135 struct _EFI_SMM_STANDBY_BUTTON_DISPATCH_PROTOCOL
{
137 /// Installs a child service to be dispatched by this protocol.
139 EFI_SMM_STANDBY_BUTTON_REGISTER Register
;\
141 /// Removes a child service dispatched by this protocol.
143 EFI_SMM_STANDBY_BUTTON_UNREGISTER UnRegister
;
146 extern EFI_GUID gEfiSmmStandbyButtonDispatchProtocolGuid
;