2 Provides the parent dispatch service for a given Sx-state source generator.
4 Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR>
5 SPDX-License-Identifier: BSD-2-Clause-Patent
7 @par Revision Reference:
8 This Protocol is defined in Framework of EFI SMM Core Interface Spec
13 #ifndef _EFI_SMM_SX_DISPATCH_H_
14 #define _EFI_SMM_SX_DISPATCH_H_
17 // Share some common definitions with PI SMM
19 #include <Protocol/SmmSxDispatch2.h>
22 // Global ID for the Sx SMI Protocol
24 #define EFI_SMM_SX_DISPATCH_PROTOCOL_GUID \
26 0x14fc52be, 0x1dc, 0x426c, {0x91, 0xae, 0xa2, 0x3c, 0x3e, 0x22, 0xa, 0xe8 } \
29 typedef struct _EFI_SMM_SX_DISPATCH_PROTOCOL EFI_SMM_SX_DISPATCH_PROTOCOL
;
33 EFI_SLEEP_PHASE Phase
;
34 } EFI_SMM_SX_DISPATCH_CONTEXT
;
40 Dispatch function for a Sx state SMI handler.
42 @param DispatchHandle The handle of this dispatch function.
43 @param DispatchContext The pointer to the dispatch function's context.
44 The Type and Phase fields are filled in by the Sx dispatch driver
45 prior to invoking this dispatch function. For this interface,
46 the Sx driver will call the dispatch function for all Sx type
47 and phases, so the Sx state handler(s) must check the Type and
48 Phase field of EFI_SMM_SX_DISPATCH_CONTEXT, and act accordingly.
55 (EFIAPI
*EFI_SMM_SX_DISPATCH
)(
56 IN EFI_HANDLE DispatchHandle
,
57 IN EFI_SMM_SX_DISPATCH_CONTEXT
*DispatchContext
61 Register a child SMI source dispatch function with a parent SMM driver.
63 @param This The pointer to the EFI_SMM_SX_DISPATCH_PROTOCOL instance.
64 @param DispatchFunction The function to install.
65 @param DispatchContext The pointer to the dispatch function's context.
66 The caller fills in this context before calling
67 the register function to indicates to the register
68 function which Sx state type and phase the caller
69 wishes to be called back on. For this interface,
70 the Sx driver will call the registered handlers for
71 all Sx type and phases, so the Sx state handler(s)
72 must check the Type and Phase field of the Dispatch
73 context, and act accordingly.
74 @param DispatchHandle The handle of dispatch function, for interfacing
75 with the parent Sx state SMM driver.
77 @retval EFI_SUCCESS The dispatch function has been successfully
78 registered and the SMI source has been enabled.
79 @retval EFI_UNSUPPORTED The Sx driver or hardware does not support that
81 @retval EFI_DEVICE_ERROR The Sx driver was unable to 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. Type & Phase are not
90 (EFIAPI
*EFI_SMM_SX_REGISTER
)(
91 IN EFI_SMM_SX_DISPATCH_PROTOCOL
*This
,
92 IN EFI_SMM_SX_DISPATCH DispatchFunction
,
93 IN EFI_SMM_SX_DISPATCH_CONTEXT
*DispatchContext
,
94 OUT EFI_HANDLE
*DispatchHandle
98 Unregisters an Sx-state service
100 @param This The pointer to the EFI_SMM_SX_DISPATCH_PROTOCOL instance.
101 @param DispatchHandle The handle of the service to remove.
103 @retval EFI_SUCCESS The dispatch function has been successfully unregistered, and the
104 SMI source has been disabled, if there are no other registered child
105 dispatch functions for this SMI source.
106 @retval EFI_INVALID_PARAMETER Handle is invalid.
111 (EFIAPI
*EFI_SMM_SX_UNREGISTER
)(
112 IN EFI_SMM_SX_DISPATCH_PROTOCOL
*This
,
113 IN EFI_HANDLE DispatchHandle
117 // Interface structure for the SMM Child Dispatch Protocol
120 Provides the parent dispatch service for a given Sx-state source generator.
122 struct _EFI_SMM_SX_DISPATCH_PROTOCOL
{
123 EFI_SMM_SX_REGISTER Register
; ///< Installs a child service to be dispatched by this protocol.
124 EFI_SMM_SX_UNREGISTER UnRegister
; ///< Removes a child service dispatched by this protocol.
127 extern EFI_GUID gEfiSmmSxDispatchProtocolGuid
;