]> git.proxmox.com Git - mirror_edk2.git/blame - IntelFrameworkPkg/Include/Protocol/SmmIchnDispatch.h
IntelFrameworkPkg: Replace BSD License with BSD+Patent License
[mirror_edk2.git] / IntelFrameworkPkg / Include / Protocol / SmmIchnDispatch.h
CommitLineData
79964ac8 1/** @file\r
8411f1c0 2 Provides the parent dispatch service for a given SMI source generator.\r
3 The EFI_SMM_ICHN_DISPATCH_PROTOCOL provides the ability to install child handlers for\r
4 the given event types.\r
79964ac8 5\r
1c2f052d 6Copyright (c) 2008 - 2018, Intel Corporation. All rights reserved.<BR>\r
22a69a5e 7SPDX-License-Identifier: BSD-2-Clause-Patent\r
79964ac8 8\r
79964ac8 9 @par Revision Reference:\r
10 This Protocol is defined in Framework of EFI SMM Core Interface Spec\r
11 Version 0.9.\r
12\r
13**/\r
14\r
15#ifndef _EFI_SMM_ICHN_DISPATCH_H_\r
16#define _EFI_SMM_ICHN_DISPATCH_H_\r
17\r
b80fbe85 18\r
79964ac8 19//\r
20// Global ID for the ICH SMI Protocol\r
21//\r
22#define EFI_SMM_ICHN_DISPATCH_PROTOCOL_GUID \\r
23 { \\r
24 0xc50b323e, 0x9075, 0x4f2a, {0xac, 0x8e, 0xd2, 0x59, 0x6a, 0x10, 0x85, 0xcc } \\r
25 }\r
26\r
27typedef struct _EFI_SMM_ICHN_DISPATCH_PROTOCOL EFI_SMM_ICHN_DISPATCH_PROTOCOL;\r
28\r
29//\r
30// Related Definitions\r
31//\r
32//\r
33// ICHN Specific SMIs. These are miscellaneous SMI sources that are supported by the\r
34// ICHN specific SMI implementation. These may change over time. TrapNumber is only\r
35// valid if the Type is Trap.\r
36//\r
37typedef enum {\r
38 //\r
39 // NOTE: NEVER delete items from this list/enumeration! Doing so will prevent other versions\r
40 // of the code from compiling. If the ICH version your driver is written for doesn't support\r
41 // some of these SMIs, then simply return EFI_UNSUPPORTED when a child/client tries to register\r
42 // for them.\r
43 //\r
44 IchnMch,\r
45 IchnPme,\r
46 IchnRtcAlarm,\r
47 IchnRingIndicate,\r
48 IchnAc97Wake,\r
49 IchnSerialIrq,\r
50 IchnY2KRollover,\r
51 IchnTcoTimeout,\r
52 IchnOsTco,\r
53 IchnNmi,\r
54 IchnIntruderDetect,\r
55 IchnBiosWp,\r
56 IchnMcSmi,\r
57 IchnPmeB0,\r
58 IchnThrmSts,\r
59 IchnSmBus,\r
60 IchnIntelUsb2,\r
61 IchnMonSmi7,\r
62 IchnMonSmi6,\r
63 IchnMonSmi5,\r
64 IchnMonSmi4,\r
65 IchnDevTrap13,\r
66 IchnDevTrap12,\r
67 IchnDevTrap11,\r
68 IchnDevTrap10,\r
69 IchnDevTrap9,\r
70 IchnDevTrap8,\r
71 IchnDevTrap7,\r
72 IchnDevTrap6,\r
73 IchnDevTrap5,\r
74 IchnDevTrap3,\r
75 IchnDevTrap2,\r
76 IchnDevTrap1,\r
77 IchnDevTrap0,\r
78 IchnIoTrap3,\r
79 IchnIoTrap2,\r
80 IchnIoTrap1,\r
81 IchnIoTrap0,\r
9d198522 82 IchnPciExpress,\r
83 IchnMonitor,\r
84 IchnSpi,\r
85 IchnQRT,\r
86 IchnGpioUnlock,\r
79964ac8 87 //\r
88 // INSERT NEW ITEMS JUST BEFORE THIS LINE\r
89 //\r
90 NUM_ICHN_TYPES // the number of items in this enumeration\r
91} EFI_SMM_ICHN_SMI_TYPE;\r
92\r
93typedef struct {\r
94 EFI_SMM_ICHN_SMI_TYPE Type;\r
95} EFI_SMM_ICHN_DISPATCH_CONTEXT;\r
96\r
97//\r
98// Member functions\r
99//\r
100/**\r
700a7869 101 Dispatch function for a ICHN specific SMI handler.\r
79964ac8 102\r
f22f941e 103 @param DispatchHandle The handle of this dispatch function.\r
104 @param DispatchContext The pointer to the dispatch function's context.\r
79964ac8 105 The DispatchContext fields are filled in\r
106 by the dispatching driver prior to\r
107 invoking this dispatch function.\r
108\r
700a7869 109 @return None\r
79964ac8 110\r
111**/\r
112typedef\r
113VOID\r
69686d56 114(EFIAPI *EFI_SMM_ICHN_DISPATCH)(\r
79964ac8 115 IN EFI_HANDLE DispatchHandle,\r
116 IN EFI_SMM_ICHN_DISPATCH_CONTEXT *DispatchContext\r
117 );\r
118\r
119/**\r
f22f941e 120 Register a child SMI source dispatch function with a parent SMM driver.\r
79964ac8 121\r
f22f941e 122 @param This The pointer to the EFI_SMM_ICHN_DISPATCH_PROTOCOL instance.\r
123 @param DispatchFunction The function to install.\r
124 @param DispatchContext The pointer to the dispatch function's context.\r
5259c97d 125 The caller fills in this context before calling\r
79964ac8 126 the register function to indicate to the register\r
127 function the ICHN SMI source for which the dispatch\r
128 function should be invoked.\r
f22f941e 129 @param DispatchHandle The handle generated by the dispatcher to track the function\r
700a7869 130 instance.\r
79964ac8 131\r
132 @retval EFI_SUCCESS The dispatch function has been successfully\r
133 registered and the SMI source has been enabled.\r
5259c97d 134 @retval EFI_DEVICE_ERROR The driver could not enable the SMI source.\r
79964ac8 135 @retval EFI_OUT_OF_RESOURCES Not enough memory (system or SMM) to manage this\r
136 child.\r
137 @retval EFI_INVALID_PARAMETER DispatchContext is invalid. The ICHN input value\r
138 is not within valid range.\r
139\r
140**/\r
141typedef\r
142EFI_STATUS\r
69686d56 143(EFIAPI *EFI_SMM_ICHN_REGISTER)(\r
700a7869 144 IN EFI_SMM_ICHN_DISPATCH_PROTOCOL *This,\r
145 IN EFI_SMM_ICHN_DISPATCH DispatchFunction,\r
146 IN EFI_SMM_ICHN_DISPATCH_CONTEXT *DispatchContext,\r
147 OUT EFI_HANDLE *DispatchHandle\r
79964ac8 148 );\r
149\r
150/**\r
151 Unregister a child SMI source dispatch function with a parent SMM driver\r
152\r
f22f941e 153 @param This The pointer to the EFI_SMM_ICHN_DISPATCH_PROTOCOL instance.\r
154 @param DispatchHandle The handle of the service to remove.\r
79964ac8 155\r
156 @retval EFI_SUCCESS The dispatch function has been successfully\r
f22f941e 157 unregistered, and the SMI source has been disabled,\r
79964ac8 158 if there are no other registered child dispatch\r
159 functions for this SMI source.\r
f22f941e 160 @retval EFI_INVALID_PARAMETER The handle is invalid.\r
79964ac8 161\r
162**/\r
163typedef\r
164EFI_STATUS\r
69686d56 165(EFIAPI *EFI_SMM_ICHN_UNREGISTER)(\r
700a7869 166 IN EFI_SMM_ICHN_DISPATCH_PROTOCOL *This,\r
167 IN EFI_HANDLE DispatchHandle\r
79964ac8 168 );\r
169\r
170//\r
700a7869 171// Interface structure for the SMM ICHN specific SMI Dispatch Protocol\r
79964ac8 172//\r
173/**\r
79964ac8 174 Provides the parent dispatch service for a given SMI source generator.\r
79964ac8 175**/\r
176struct _EFI_SMM_ICHN_DISPATCH_PROTOCOL {\r
2bbaeb0d 177 EFI_SMM_ICHN_REGISTER Register; ///< Installs a child service to be dispatched by this protocol.\r
178 EFI_SMM_ICHN_UNREGISTER UnRegister; ///< Removes a child service dispatched by this protocol.\r
79964ac8 179};\r
180\r
181extern EFI_GUID gEfiSmmIchnDispatchProtocolGuid;\r
182\r
183#endif\r