3 Copyright (c) 1999 - 2002, 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 Gpi Smi Child Protocol
25 #ifndef _EFI_SMM_GPI_DISPATCH_H_
26 #define _EFI_SMM_GPI_DISPATCH_H_
29 // Global ID for the GPI SMI Protocol
31 #define EFI_SMM_GPI_DISPATCH_PROTOCOL_GUID \
33 0xe0744b81, 0x9513, 0x49cd, {0x8c, 0xea, 0xe9, 0x24, 0x5e, 0x70, 0x39, 0xda} \
36 EFI_FORWARD_DECLARATION (EFI_SMM_GPI_DISPATCH_PROTOCOL
);
39 // Related Definitions
42 // GpiMask is a bit mask of 32 possible general purpose inputs that can generate a
43 // a SMI. Bit 0 corresponds to logical GPI[0], 1 corresponds to logical GPI[1], etc.
45 // The logical GPI index to physical pin on device is described by the GPI device name
46 // found on the same handle as the GpiSmi child dispatch protocol. The GPI device name
47 // is defined as protocol with a GUID name and NULL protocol pointer.
51 } EFI_SMM_GPI_DISPATCH_CONTEXT
;
58 (EFIAPI
*EFI_SMM_GPI_DISPATCH
) (
59 IN EFI_HANDLE DispatchHandle
,
60 IN EFI_SMM_GPI_DISPATCH_CONTEXT
* DispatchContext
66 Dispatch function for a GPI SMI handler.
69 DispatchHandle - Handle of this dispatch function.
70 DispatchContext - Pointer to the dispatch function's context.
71 The DispatchContext fields are filled in
72 by the dispatching driver prior to
73 invoking this dispatch function.
81 (EFIAPI
*EFI_SMM_GPI_REGISTER
) (
82 IN EFI_SMM_GPI_DISPATCH_PROTOCOL
* This
,
83 IN EFI_SMM_GPI_DISPATCH DispatchFunction
,
84 IN EFI_SMM_GPI_DISPATCH_CONTEXT
* DispatchContext
,
85 OUT EFI_HANDLE
* DispatchHandle
91 Register a child SMI source dispatch function with a parent SMM driver
94 This - Protocol instance pointer.
95 DispatchFunction - Pointer to dispatch function to be invoked for
97 DispatchContext - Pointer to the dispatch function's context.
98 The caller fills this context in before calling
99 the register function to indicate to the register
100 function the GPI(s) for which the dispatch function
102 DispatchHandle - Handle of dispatch function, for when interfacing
103 with the parent Sx state SMM driver.
106 EFI_SUCCESS - The dispatch function has been successfully
107 registered and the SMI source has been enabled.
108 EFI_DEVICE_ERROR - The driver was unable to enable the SMI source.
109 EFI_OUT_OF_RESOURCES - Not enough memory (system or SMM) to manage this
111 EFI_INVALID_PARAMETER - DispatchContext is invalid. The GPI input value
112 is not within valid range.
117 (EFIAPI
*EFI_SMM_GPI_UNREGISTER
) (
118 IN EFI_SMM_GPI_DISPATCH_PROTOCOL
* This
,
119 IN EFI_HANDLE DispatchHandle
125 Unregister a child SMI source dispatch function with a parent SMM driver
128 This - Protocol instance pointer.
129 DispatchHandle - Handle of dispatch function to deregister.
132 EFI_SUCCESS - The dispatch function has been successfully
133 unregistered and the SMI source has been disabled
134 if there are no other registered child dispatch
135 functions for this SMI source.
136 EFI_INVALID_PARAMETER - Handle is invalid.
142 // Interface structure for the SMM GPI SMI Dispatch Protocol
144 struct _EFI_SMM_GPI_DISPATCH_PROTOCOL
{
145 EFI_SMM_GPI_REGISTER Register
;
146 EFI_SMM_GPI_UNREGISTER UnRegister
;
147 UINTN NumSupportedGpis
;
150 extern EFI_GUID gEfiSmmGpiDispatchProtocolGuid
;