2 Provides the parent dispatch service for a given SMI source generator.
4 Copyright (c) 2007 - 2009, 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: SmmSwDispatch.h
15 @par Revision Reference:
16 This Protocol is defined in Framework for EFI SMM Core Interface Spec
21 #ifndef _EFI_SMM_SW_DISPATCH_H_
22 #define _EFI_SMM_SW_DISPATCH_H_
26 // Global ID for the SW SMI Protocol
28 #define EFI_SMM_SW_DISPATCH_PROTOCOL_GUID \
30 0xe541b773, 0xdd11, 0x420c, {0xb0, 0x26, 0xdf, 0x99, 0x36, 0x53, 0xf8, 0xbf } \
33 typedef struct _EFI_SMM_SW_DISPATCH_PROTOCOL EFI_SMM_SW_DISPATCH_PROTOCOL
;
36 // Related Definitions
39 // A particular chipset may not support all possible software SMI input values.
40 // For example, the ICH supports only values 00h to 0FFh. The parent only allows a single
41 // child registration for each SwSmiInputValue.
44 UINTN SwSmiInputValue
;
45 } EFI_SMM_SW_DISPATCH_CONTEXT
;
51 Dispatch function for a Software SMI handler.
53 @param DispatchHandle Handle of this dispatch function.
54 @param DispatchContext Pointer to the dispatch function's context.
55 The SwSmiInputValue field is filled in
56 by the software dispatch driver prior to
57 invoking this dispatch function.
58 The dispatch function will only be called
59 for input values for which it is registered.
66 (EFIAPI
*EFI_SMM_SW_DISPATCH
)(
67 IN EFI_HANDLE DispatchHandle
,
68 IN EFI_SMM_SW_DISPATCH_CONTEXT
*DispatchContext
72 Register a child SMI source dispatch function with a parent SMM driver
74 @param This Pointer to the EFI_SMM_SW_DISPATCH_PROTOCOL instance.
75 @param DispatchFunction Function to install.
76 @param DispatchContext Pointer to the dispatch function's context.
77 The caller fills this context in before calling
78 the register function to indicate to the register
79 function which Software SMI input value the
80 dispatch function should be invoked for.
81 @param DispatchHandle Handle generated by the dispatcher to track 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 SW 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 SW SMI input value
89 is not within valid range.
94 (EFIAPI
*EFI_SMM_SW_REGISTER
)(
95 IN EFI_SMM_SW_DISPATCH_PROTOCOL
*This
,
96 IN EFI_SMM_SW_DISPATCH DispatchFunction
,
97 IN EFI_SMM_SW_DISPATCH_CONTEXT
*DispatchContext
,
98 OUT EFI_HANDLE
*DispatchHandle
102 Unregister a child SMI source dispatch function with a parent SMM driver
104 @param This Pointer to the EFI_SMM_SW_DISPATCH_PROTOCOL instance.
105 @param DispatchHandle Handle of the service to remove.
107 @retval EFI_SUCCESS The dispatch function has been successfully
108 unregistered and the SMI source has been disabled
109 if there are no other registered child dispatch
110 functions for this SMI source.
111 @retval EFI_INVALID_PARAMETER Handle is invalid.
116 (EFIAPI
*EFI_SMM_SW_UNREGISTER
)(
117 IN EFI_SMM_SW_DISPATCH_PROTOCOL
*This
,
118 IN EFI_HANDLE DispatchHandle
123 // Interface structure for the SMM Software SMI Dispatch Protocol
126 Provides the parent dispatch service for a given SMI source generator.
129 /// Inconsistent with specification here:
130 /// In framework spec SmmCis, this definition is named as _EFI_SMM_ICHN_DISPATCH_PROTOCOL by mistake.
132 struct _EFI_SMM_SW_DISPATCH_PROTOCOL
{
134 /// Installs a child service to be dispatched by this protocol.
136 EFI_SMM_SW_REGISTER Register
;
139 /// Removes a child service dispatched by this protocol.
141 EFI_SMM_SW_UNREGISTER UnRegister
;
144 /// A read-only field that describes the maximum value that can be used
145 /// in the EFI_SMM_SW_DISPATCH_PROTOCOL.Register() service.
147 UINTN MaximumSwiValue
;
150 extern EFI_GUID gEfiSmmSwDispatchProtocolGuid
;