3 Copyright (c) 2006, Intel Corporation
4 All rights reserved. This program and the accompanying materials
5 are licensed and made available under the terms and conditions of the BSD License
6 which accompanies this distribution. The full text of the license may be found at
7 http://opensource.org/licenses/bsd-license.php
9 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
19 EFI Smm Software Smi Child Protocol
25 #ifndef _EFI_SMM_SW_DISPATCH_H_
26 #define _EFI_SMM_SW_DISPATCH_H_
29 // Global ID for the SW SMI Protocol
31 #define EFI_SMM_SW_DISPATCH_PROTOCOL_GUID \
33 0xe541b773, 0xdd11, 0x420c, 0xb0, 0x26, 0xdf, 0x99, 0x36, 0x53, 0xf8, 0xbf \
36 EFI_FORWARD_DECLARATION (EFI_SMM_SW_DISPATCH_PROTOCOL
);
39 // Related Definitions
42 // A particular chipset may not support all possible software SMI input values.
43 // For example, the ICH supports only values 00h to 0FFh. The parent only allows a single
44 // child registration for each SwSmiInputValue.
47 UINTN SwSmiInputValue
;
48 } EFI_SMM_SW_DISPATCH_CONTEXT
;
55 (EFIAPI
*EFI_SMM_SW_DISPATCH
) (
56 IN EFI_HANDLE DispatchHandle
,
57 IN EFI_SMM_SW_DISPATCH_CONTEXT
* DispatchContext
63 Dispatch function for a Software SMI handler.
66 DispatchHandle - Handle of this dispatch function.
67 DispatchContext - Pointer to the dispatch function's context.
68 The SwSmiInputValue field is filled in
69 by the software dispatch driver prior to
70 invoking this dispatch function.
71 The dispatch function will only be called
72 for input values for which it is registered.
80 (EFIAPI
*EFI_SMM_SW_REGISTER
) (
81 IN EFI_SMM_SW_DISPATCH_PROTOCOL
* This
,
82 IN EFI_SMM_SW_DISPATCH DispatchFunction
,
83 IN EFI_SMM_SW_DISPATCH_CONTEXT
* DispatchContext
,
84 OUT EFI_HANDLE
* DispatchHandle
90 Register a child SMI source dispatch function with a parent SMM driver
93 This - Protocol instance pointer.
94 DispatchFunction - Pointer to dispatch function to be invoked for
96 DispatchContext - Pointer to the dispatch function's context.
97 The caller fills this context in before calling
98 the register function to indicate to the register
99 function which Software SMI input value the
100 dispatch function should be invoked for.
101 DispatchHandle - Handle of dispatch function, for when interfacing
102 with the parent Sx state SMM driver.
105 EFI_SUCCESS - The dispatch function has been successfully
106 registered and the SMI source has been enabled.
107 EFI_DEVICE_ERROR - The SW driver was unable to enable the SMI source.
108 EFI_OUT_OF_RESOURCES - Not enough memory (system or SMM) to manage this
110 EFI_INVALID_PARAMETER - DispatchContext is invalid. The SW SMI input value
111 is not within valid range.
116 (EFIAPI
*EFI_SMM_SW_UNREGISTER
) (
117 IN EFI_SMM_SW_DISPATCH_PROTOCOL
* This
,
118 IN EFI_HANDLE DispatchHandle
124 Unregister a child SMI source dispatch function with a parent SMM driver
127 This - Protocol instance pointer.
128 DispatchHandle - Handle of dispatch function to deregister.
131 EFI_SUCCESS - The dispatch function has been successfully
132 unregistered and the SMI source has been disabled
133 if there are no other registered child dispatch
134 functions for this SMI source.
135 EFI_INVALID_PARAMETER - Handle is invalid.
141 // Interface structure for the SMM Software SMI Dispatch Protocol
143 struct _EFI_SMM_SW_DISPATCH_PROTOCOL
{
144 EFI_SMM_SW_REGISTER Register
;
145 EFI_SMM_SW_UNREGISTER UnRegister
;
146 UINTN MaximumSwiValue
;
149 extern EFI_GUID gEfiSmmSwDispatchProtocolGuid
;