2 This file declares Smm Gpi Smi Child Protocol
3 The EFI_SMM_GPI_DISPATCH_PROTOCOL provides the ability to install child handlers for the
4 given event types. Several inputs can be enabled. This purpose of this interface is to generate an
5 SMI in response to any of these inputs having a true value provided.
7 Copyright (c) 2007, Intel Corporation
8 All rights reserved. This program and the accompanying materials
9 are licensed and made available under the terms and conditions of the BSD License
10 which accompanies this distribution. The full text of the license may be found at
11 http://opensource.org/licenses/bsd-license.php
13 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
14 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
16 Module Name: SmmGpiDispatch.h
18 @par Revision Reference:
19 This Protocol is defined in Framework of EFI SMM Core Interface Spec
24 #ifndef _EFI_SMM_GPI_DISPATCH_H_
25 #define _EFI_SMM_GPI_DISPATCH_H_
30 // Global ID for the GPI SMI Protocol
32 #define EFI_SMM_GPI_DISPATCH_PROTOCOL_GUID \
34 0xe0744b81, 0x9513, 0x49cd, {0x8c, 0xea, 0xe9, 0x24, 0x5e, 0x70, 0x39, 0xda } \
37 typedef struct _EFI_SMM_GPI_DISPATCH_PROTOCOL EFI_SMM_GPI_DISPATCH_PROTOCOL
;
40 // Related Definitions
43 // GpiMask is a bit mask of 32 possible general purpose inputs that can generate a
44 // a SMI. Bit 0 corresponds to logical GPI[0], 1 corresponds to logical GPI[1], etc.
46 // The logical GPI index to physical pin on device is described by the GPI device name
47 // found on the same handle as the GpiSmi child dispatch protocol. The GPI device name
48 // is defined as protocol with a GUID name and NULL protocol pointer.
52 } EFI_SMM_GPI_DISPATCH_CONTEXT
;
58 Dispatch function for a GPI SMI handler.
60 @param DispatchHandle Handle of this dispatch function.
61 @param DispatchContext Pointer to the dispatch function's context.
62 The DispatchContext fields are filled in by the dispatching driver prior to
63 invoking this dispatch function.
70 (EFIAPI
*EFI_SMM_GPI_DISPATCH
) (
71 IN EFI_HANDLE DispatchHandle
,
72 IN EFI_SMM_GPI_DISPATCH_CONTEXT
*DispatchContext
76 Register a child SMI source dispatch function with a parent SMM driver
78 @param This Protocol instance pointer.
79 @param DispatchFunction Pointer to dispatch function to be invoked for
81 @param DispatchContext Pointer to the dispatch function's context.
82 The caller fills this context in before calling
83 the register function to indicate to the register
84 function the GPI(s) for which the dispatch function
86 @param DispatchHandle Handle of dispatch function, for when interfacing
87 with the parent Sx state SMM driver.
89 @retval EFI_SUCCESS The dispatch function has been successfully
90 registered and the SMI source has been enabled.
91 @retval EFI_DEVICE_ERROR The driver was unable to enable the SMI source.
92 @retval EFI_OUT_OF_RESOURCES Not enough memory (system or SMM) to manage this
94 @retval EFI_INVALID_PARAMETER DispatchContext is invalid. The GPI input value
95 is not within valid range.
100 (EFIAPI
*EFI_SMM_GPI_REGISTER
) (
101 IN EFI_SMM_GPI_DISPATCH_PROTOCOL
*This
,
102 IN EFI_SMM_GPI_DISPATCH DispatchFunction
,
103 IN EFI_SMM_GPI_DISPATCH_CONTEXT
*DispatchContext
,
104 OUT EFI_HANDLE
*DispatchHandle
108 Unregister a child SMI source dispatch function with a parent SMM driver
110 @param This Protocol instance pointer.
111 @param DispatchHandle Handle of dispatch function to deregister.
113 @retval EFI_SUCCESS The dispatch function has been successfully
114 unregistered and the SMI source has been disabled
115 if there are no other registered child dispatch
116 functions for this SMI source.
117 @retval EFI_INVALID_PARAMETER Handle is invalid.
123 (EFIAPI
*EFI_SMM_GPI_UNREGISTER
) (
124 IN EFI_SMM_GPI_DISPATCH_PROTOCOL
*This
,
125 IN EFI_HANDLE DispatchHandle
129 // Interface structure for the SMM GPI SMI Dispatch Protocol
132 @par Protocol Description:
133 Provides the parent dispatch service for the General Purpose Input
134 (GPI) SMI source generator.
137 Installs a child service to be dispatched by this protocol.
140 Removes a child service dispatched by this protocol.
142 @param NumSupportedGpis
143 Denotes the maximum value of inputs that can have handlers attached.
146 struct _EFI_SMM_GPI_DISPATCH_PROTOCOL
{
147 EFI_SMM_GPI_REGISTER Register
;
148 EFI_SMM_GPI_UNREGISTER UnRegister
;
149 UINTN NumSupportedGpis
;
152 extern EFI_GUID gEfiSmmGpiDispatchProtocolGuid
;