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