2 Provides the parent dispatch service for the power button SMI source generator.
4 Copyright (c) 2007, Intel Corporation
5 All rights reserved. This program and the accompanying materials
6 are licensed and made available under the terms and conditions of the BSD License
7 which accompanies this distribution. 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 Module Name: SmmPowerButtonDispatch.h
15 @par Revision Reference:
16 This Protocol is defined in Framework of EFI SMM Core Interface Spec
21 #ifndef _EFI_SMM_POWER_BUTTON_DISPATCH_H_
22 #define _EFI_SMM_POWER_BUTTON_DISPATCH_H_
27 // Global ID for the Power Button SMI Protocol
29 #define EFI_SMM_POWER_BUTTON_DISPATCH_PROTOCOL_GUID \
31 0xb709efa0, 0x47a6, 0x4b41, {0xb9, 0x31, 0x12, 0xec, 0xe7, 0xa8, 0xee, 0x56 } \
34 typedef struct _EFI_SMM_POWER_BUTTON_DISPATCH_PROTOCOL EFI_SMM_POWER_BUTTON_DISPATCH_PROTOCOL
;
37 // Related Definitions
40 // Power Button. Example, Use for changing LEDs before ACPI OS is on.
47 } EFI_POWER_BUTTON_PHASE
;
50 EFI_POWER_BUTTON_PHASE Phase
;
51 } EFI_SMM_POWER_BUTTON_DISPATCH_CONTEXT
;
57 Dispatch function for a Power Button SMI handler.
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.
70 (EFIAPI
*EFI_SMM_POWER_BUTTON_DISPATCH
)(
71 IN EFI_HANDLE DispatchHandle
,
72 IN EFI_SMM_POWER_BUTTON_DISPATCH_CONTEXT
*DispatchContext
76 Provides the parent dispatch service for a given SMI source generator
78 @param This Pointer to the EFI_SMM_POWER_BUTTON_DISPATCH_PROTOCOL instance.
79 @param DispatchFunction Function to install.
80 @param DispatchContext Pointer to the dispatch function's context.
81 The caller fills this context in before calling
82 the register function to indicate to the register
83 function the Power Button SMI phase for which the dispatch
84 function should be invoked.
85 @param DispatchHandle Handle generated by the dispatcher to track the function instance.
87 @retval EFI_SUCCESS The dispatch function has been successfully
88 registered and the SMI source has been enabled.
89 @retval EFI_DEVICE_ERROR The driver was unable to enable the SMI source.
90 @retval EFI_OUT_OF_RESOURCES Not enough memory (system or SMM) to manage this
92 @retval EFI_INVALID_PARAMETER DispatchContext is invalid. The Power Button SMI
93 phase is not within valid range.
98 (EFIAPI
*EFI_SMM_POWER_BUTTON_REGISTER
)(
99 IN EFI_SMM_POWER_BUTTON_DISPATCH_PROTOCOL
*This
,
100 IN EFI_SMM_POWER_BUTTON_DISPATCH DispatchFunction
,
101 IN EFI_SMM_POWER_BUTTON_DISPATCH_CONTEXT
*DispatchContext
,
102 OUT EFI_HANDLE
*DispatchHandle
106 Unregisters a power-button service.
108 @param This Pointer to the EFI_SMM_POWER_BUTTON_DISPATCH_PROTOCOL instance.
109 @param DispatchHandle Handle of the service to remove.
111 @retval EFI_SUCCESS The dispatch function has been successfully
112 unregistered and the SMI source has been disabled
113 if there are no other registered child dispatch
114 functions for this SMI source.
115 @retval EFI_INVALID_PARAMETER Handle is invalid.
120 (EFIAPI
*EFI_SMM_POWER_BUTTON_UNREGISTER
)(
121 IN EFI_SMM_POWER_BUTTON_DISPATCH_PROTOCOL
*This
,
122 IN EFI_HANDLE DispatchHandle
126 // Interface structure for the SMM Power Button SMI Dispatch Protocol
129 @par Protocol Description:
130 Provides the parent dispatch service for the SMM power button SMI source generator.
133 Installs a child service to be dispatched by this protocol.
136 Removes a child service dispatched by this protocol.
139 struct _EFI_SMM_POWER_BUTTON_DISPATCH_PROTOCOL
{
140 EFI_SMM_POWER_BUTTON_REGISTER Register
;
141 EFI_SMM_POWER_BUTTON_UNREGISTER UnRegister
;
144 extern EFI_GUID gEfiSmmPowerButtonDispatchProtocolGuid
;