2 Provides the parent dispatch service for a given SMI 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 for EFI SMM Core Interface Spec
13 #ifndef _EFI_SMM_SW_DISPATCH_H_
14 #define _EFI_SMM_SW_DISPATCH_H_
18 // Global ID for the SW SMI Protocol
20 #define EFI_SMM_SW_DISPATCH_PROTOCOL_GUID \
22 0xe541b773, 0xdd11, 0x420c, {0xb0, 0x26, 0xdf, 0x99, 0x36, 0x53, 0xf8, 0xbf } \
25 typedef struct _EFI_SMM_SW_DISPATCH_PROTOCOL EFI_SMM_SW_DISPATCH_PROTOCOL
;
28 // Related Definitions
31 // A particular chipset may not support all possible software SMI input values.
32 // For example, the ICH supports only values 00h to 0FFh. The parent only allows a single
33 // child registration for each SwSmiInputValue.
36 UINTN SwSmiInputValue
;
37 } EFI_SMM_SW_DISPATCH_CONTEXT
;
43 Dispatch function for a Software SMI handler.
45 @param DispatchHandle The handle of this dispatch function.
46 @param DispatchContext The pointer to the dispatch function's context.
47 The SwSmiInputValue field is filled in
48 by the software dispatch driver prior to
49 invoking this dispatch function.
50 The dispatch function will only be called
51 for input values for which it is registered.
58 (EFIAPI
*EFI_SMM_SW_DISPATCH
)(
59 IN EFI_HANDLE DispatchHandle
,
60 IN EFI_SMM_SW_DISPATCH_CONTEXT
*DispatchContext
64 Register a child SMI source dispatch function with a parent SMM driver.
66 @param This The pointer to the EFI_SMM_SW_DISPATCH_PROTOCOL instance.
67 @param DispatchFunction The function to install.
68 @param DispatchContext The pointer to the dispatch function's context.
69 Indicates to the register
70 function the Software SMI input value for which
71 to invoke the dispatch function.
72 @param DispatchHandle The handle generated by the dispatcher to track
73 the function instance.
75 @retval EFI_SUCCESS The dispatch function has been successfully
76 registered and the SMI source has been enabled.
77 @retval EFI_DEVICE_ERROR The SW driver could not enable the SMI source.
78 @retval EFI_OUT_OF_RESOURCES Not enough memory (system or SMM) to manage this
80 @retval EFI_INVALID_PARAMETER DispatchContext is invalid. The SW SMI input value
81 is not within valid range.
86 (EFIAPI
*EFI_SMM_SW_REGISTER
)(
87 IN EFI_SMM_SW_DISPATCH_PROTOCOL
*This
,
88 IN EFI_SMM_SW_DISPATCH DispatchFunction
,
89 IN EFI_SMM_SW_DISPATCH_CONTEXT
*DispatchContext
,
90 OUT EFI_HANDLE
*DispatchHandle
94 Unregister a child SMI source dispatch function with a parent SMM driver
96 @param This The pointer to the EFI_SMM_SW_DISPATCH_PROTOCOL instance.
97 @param DispatchHandle The handle of the service to remove.
99 @retval EFI_SUCCESS The dispatch function has been successfully
100 unregistered and the SMI source has been disabled
101 if there are no other registered child dispatch
102 functions for this SMI source.
103 @retval EFI_INVALID_PARAMETER The handle is invalid.
108 (EFIAPI
*EFI_SMM_SW_UNREGISTER
)(
109 IN EFI_SMM_SW_DISPATCH_PROTOCOL
*This
,
110 IN EFI_HANDLE DispatchHandle
115 // Interface structure for the SMM Software SMI Dispatch Protocol
118 Provides the parent dispatch service for a given SMI source generator.
121 /// Inconsistent with the specification here:
122 /// In The Framework specification SmmCis, this definition is named as
123 /// _EFI_SMM_ICHN_DISPATCH_PROTOCOL by mistake.
125 struct _EFI_SMM_SW_DISPATCH_PROTOCOL
{
127 /// Installs a child service to be dispatched by this protocol.
129 EFI_SMM_SW_REGISTER Register
;
132 /// Removes a child service dispatched by this protocol.
134 EFI_SMM_SW_UNREGISTER UnRegister
;
137 /// A read-only field that describes the maximum value that can be used
138 /// in the EFI_SMM_SW_DISPATCH_PROTOCOL.Register() service.
140 UINTN MaximumSwiValue
;
143 extern EFI_GUID gEfiSmmSwDispatchProtocolGuid
;