]> git.proxmox.com Git - mirror_edk2.git/blame - IntelFrameworkPkg/Include/Protocol/SmmGpiDispatch.h
Remove the blank in function typedef, it will break doxygen document generation.
[mirror_edk2.git] / IntelFrameworkPkg / Include / Protocol / SmmGpiDispatch.h
CommitLineData
79964ac8 1/** @file\r
2 This file declares Smm Gpi Smi Child Protocol\r
8411f1c0 3 The EFI_SMM_GPI_DISPATCH_PROTOCOL provides the ability to install child handlers for the\r
4 given event types. Several inputs can be enabled. This purpose of this interface is to generate an\r
5 SMI in response to any of these inputs having a true value provided.\r
6 \r
79964ac8 7 Copyright (c) 2007, Intel Corporation\r
8 All rights reserved. This program and the accompanying materials\r
9 are licensed and made available under the terms and conditions of the BSD License\r
10 which accompanies this distribution. The full text of the license may be found at\r
11 http://opensource.org/licenses/bsd-license.php\r
12\r
13 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
14 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
15\r
16 Module Name: SmmGpiDispatch.h\r
17\r
18 @par Revision Reference:\r
19 This Protocol is defined in Framework of EFI SMM Core Interface Spec\r
20 Version 0.9.\r
21\r
22**/\r
23\r
24#ifndef _EFI_SMM_GPI_DISPATCH_H_\r
25#define _EFI_SMM_GPI_DISPATCH_H_\r
26\r
b80fbe85 27#include <PiDxe.h>\r
28\r
79964ac8 29//\r
30// Global ID for the GPI SMI Protocol\r
31//\r
32#define EFI_SMM_GPI_DISPATCH_PROTOCOL_GUID \\r
33 { \\r
34 0xe0744b81, 0x9513, 0x49cd, {0x8c, 0xea, 0xe9, 0x24, 0x5e, 0x70, 0x39, 0xda } \\r
35 }\r
36\r
37typedef struct _EFI_SMM_GPI_DISPATCH_PROTOCOL EFI_SMM_GPI_DISPATCH_PROTOCOL;\r
38\r
39//\r
40// Related Definitions\r
41//\r
42//\r
43// GpiMask is a bit mask of 32 possible general purpose inputs that can generate a\r
44// a SMI. Bit 0 corresponds to logical GPI[0], 1 corresponds to logical GPI[1], etc.\r
45//\r
46// The logical GPI index to physical pin on device is described by the GPI device name\r
47// found on the same handle as the GpiSmi child dispatch protocol. The GPI device name\r
48// is defined as protocol with a GUID name and NULL protocol pointer.\r
49//\r
50typedef struct {\r
51 UINTN GpiNum;\r
52} EFI_SMM_GPI_DISPATCH_CONTEXT;\r
53\r
54//\r
55// Member functions\r
56//\r
57/**\r
58 Dispatch function for a GPI SMI handler.\r
59\r
60 @param DispatchHandle Handle of this dispatch function.\r
61 @param DispatchContext Pointer to the dispatch function's context.\r
62 The DispatchContext fields are filled in by the dispatching driver prior to\r
63 invoking this dispatch function.\r
64\r
65 @return None\r
66\r
67**/\r
68typedef\r
69VOID\r
70(EFIAPI *EFI_SMM_GPI_DISPATCH) (\r
71 IN EFI_HANDLE DispatchHandle,\r
72 IN EFI_SMM_GPI_DISPATCH_CONTEXT *DispatchContext\r
73 );\r
74\r
75/**\r
76 Register a child SMI source dispatch function with a parent SMM driver\r
77\r
78 @param This Protocol instance pointer.\r
79 @param DispatchFunction Pointer to dispatch function to be invoked for\r
80 this SMI source\r
81 @param DispatchContext Pointer to the dispatch function's context.\r
82 The caller fills this context in before calling\r
83 the register function to indicate to the register\r
84 function the GPI(s) for which the dispatch function\r
85 should be invoked.\r
86 @param DispatchHandle Handle of dispatch function, for when interfacing\r
87 with the parent Sx state SMM driver.\r
88\r
89 @retval EFI_SUCCESS The dispatch function has been successfully\r
90 registered and the SMI source has been enabled.\r
91 @retval EFI_DEVICE_ERROR The driver was unable to enable the SMI source.\r
92 @retval EFI_OUT_OF_RESOURCES Not enough memory (system or SMM) to manage this\r
93 child.\r
94 @retval EFI_INVALID_PARAMETER DispatchContext is invalid. The GPI input value\r
95 is not within valid range.\r
96\r
97**/\r
98typedef\r
99EFI_STATUS\r
100(EFIAPI *EFI_SMM_GPI_REGISTER) (\r
101 IN EFI_SMM_GPI_DISPATCH_PROTOCOL *This,\r
102 IN EFI_SMM_GPI_DISPATCH DispatchFunction,\r
103 IN EFI_SMM_GPI_DISPATCH_CONTEXT *DispatchContext,\r
104 OUT EFI_HANDLE *DispatchHandle\r
105 );\r
106\r
107/**\r
108 Unregister a child SMI source dispatch function with a parent SMM driver\r
109\r
110 @param This Protocol instance pointer.\r
111 @param DispatchHandle Handle of dispatch function to deregister.\r
112\r
113 @retval EFI_SUCCESS The dispatch function has been successfully\r
114 unregistered and the SMI source has been disabled\r
115 if there are no other registered child dispatch\r
116 functions for this SMI source.\r
117 @retval EFI_INVALID_PARAMETER Handle is invalid.\r
118 @retval other TBD\r
119\r
120**/\r
121typedef\r
122EFI_STATUS\r
123(EFIAPI *EFI_SMM_GPI_UNREGISTER) (\r
124 IN EFI_SMM_GPI_DISPATCH_PROTOCOL *This,\r
125 IN EFI_HANDLE DispatchHandle\r
126 );\r
127\r
128//\r
129// Interface structure for the SMM GPI SMI Dispatch Protocol\r
130//\r
131/**\r
132 @par Protocol Description:\r
133 Provides the parent dispatch service for the General Purpose Input\r
134 (GPI) SMI source generator.\r
135\r
136 @param Register\r
137 Installs a child service to be dispatched by this protocol.\r
138\r
139 @param UnRegister\r
140 Removes a child service dispatched by this protocol.\r
141\r
142 @param NumSupportedGpis\r
143 Denotes the maximum value of inputs that can have handlers attached.\r
144\r
145**/\r
146struct _EFI_SMM_GPI_DISPATCH_PROTOCOL {\r
147 EFI_SMM_GPI_REGISTER Register;\r
148 EFI_SMM_GPI_UNREGISTER UnRegister;\r
149 UINTN NumSupportedGpis;\r
150};\r
151\r
152extern EFI_GUID gEfiSmmGpiDispatchProtocolGuid;\r
153\r
154#endif\r