2 Provides the parent dispatch service for the power button SMI source generator.
4 Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved<BR>
5 This program and the accompanying materials are licensed and made available under
6 the terms and conditions of the BSD License that accompanies this distribution.
7 The full text of the license may be found at
8 http://opensource.org/licenses/bsd-license.php.
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.
13 @par Revision Reference:
14 This Protocol is defined in Framework of EFI SMM Core Interface Spec
19 #ifndef _EFI_SMM_POWER_BUTTON_DISPATCH_H_
20 #define _EFI_SMM_POWER_BUTTON_DISPATCH_H_
24 // Global ID for the Power Button SMI Protocol
26 #define EFI_SMM_POWER_BUTTON_DISPATCH_PROTOCOL_GUID \
28 0xb709efa0, 0x47a6, 0x4b41, {0xb9, 0x31, 0x12, 0xec, 0xe7, 0xa8, 0xee, 0x56 } \
31 typedef struct _EFI_SMM_POWER_BUTTON_DISPATCH_PROTOCOL EFI_SMM_POWER_BUTTON_DISPATCH_PROTOCOL
;
34 // Related Definitions
37 // Power Button. Example, Use for changing LEDs before ACPI OS is on.
44 } EFI_POWER_BUTTON_PHASE
;
47 EFI_POWER_BUTTON_PHASE Phase
;
48 } EFI_SMM_POWER_BUTTON_DISPATCH_CONTEXT
;
54 Dispatch function for a Power Button SMI handler.
56 @param[in] DispatchHandle The handle of this dispatch function.
57 @param[in] DispatchContext The pointer to the dispatch function's context.
58 The DispatchContext fields are filled in
59 by the dispatching driver prior to
60 invoking this dispatch function.
65 (EFIAPI
*EFI_SMM_POWER_BUTTON_DISPATCH
)(
66 IN EFI_HANDLE DispatchHandle
,
67 IN EFI_SMM_POWER_BUTTON_DISPATCH_CONTEXT
*DispatchContext
71 Provides the parent dispatch service for a given SMI source generator
73 @param[in] This The pointer to the
74 EFI_SMM_POWER_BUTTON_DISPATCH_PROTOCOL instance.
75 @param[in] DispatchFunction The function to install.
76 @param[in] DispatchContext The pointer to the dispatch function's context.
77 Indicates to the register
78 function the Power Button SMI phase for which
79 to invoke the dispatch function.
80 @param[out] DispatchHandle Handle generated by the dispatcher to track
81 the function instance.
83 @retval EFI_SUCCESS The dispatch function has been successfully
84 registered and the SMI source has been enabled.
85 @retval EFI_DEVICE_ERROR The driver was unable to enable the SMI source.
86 @retval EFI_OUT_OF_RESOURCES Not enough memory (system or SMM) to manage this
88 @retval EFI_INVALID_PARAMETER DispatchContext is invalid. The Power Button SMI
89 phase is not within valid range.
94 (EFIAPI
*EFI_SMM_POWER_BUTTON_REGISTER
)(
95 IN EFI_SMM_POWER_BUTTON_DISPATCH_PROTOCOL
*This
,
96 IN EFI_SMM_POWER_BUTTON_DISPATCH DispatchFunction
,
97 IN EFI_SMM_POWER_BUTTON_DISPATCH_CONTEXT
*DispatchContext
,
98 OUT EFI_HANDLE
*DispatchHandle
102 Unregisters a power-button service.
104 @param[in] This The pointer to the EFI_SMM_POWER_BUTTON_DISPATCH_PROTOCOL instance.
105 @param[in] DispatchHandle The handle of the service to remove.
107 @retval EFI_SUCCESS The dispatch function has been successfully
108 unregistered, and the SMI source has been
109 disabled, if there are no other registered
110 child dispatch functions for this SMI
112 @retval EFI_INVALID_PARAMETER The handle is invalid.
117 (EFIAPI
*EFI_SMM_POWER_BUTTON_UNREGISTER
)(
118 IN EFI_SMM_POWER_BUTTON_DISPATCH_PROTOCOL
*This
,
119 IN EFI_HANDLE DispatchHandle
123 @par Protocol Description:
124 Provides the parent dispatch service for the SMM power button SMI source generator.
127 struct _EFI_SMM_POWER_BUTTON_DISPATCH_PROTOCOL
{
129 /// Installs a child service to be dispatched by this protocol.
131 EFI_SMM_POWER_BUTTON_REGISTER Register
;
134 /// Removes a child service dispatched by this protocol.
136 EFI_SMM_POWER_BUTTON_UNREGISTER UnRegister
;
139 extern EFI_GUID gEfiSmmPowerButtonDispatchProtocolGuid
;