]> git.proxmox.com Git - mirror_edk2.git/blob - IntelFrameworkPkg/Include/Protocol/SmmIchnDispatch.h
Update IntelFrameworkPkg
[mirror_edk2.git] / IntelFrameworkPkg / Include / Protocol / SmmIchnDispatch.h
1 /** @file
2 This file declares EFI Smm ICH [N] Specific Smi Child Protocol
3
4 Copyright (c) 2007, Intel Corporation
5 All rights reserved. This program and the accompanying materials
6 are licensed and made available under the terms and conditions of the BSD License
7 which accompanies this distribution. The full text of the license may be found at
8 http://opensource.org/licenses/bsd-license.php
9
10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
12
13 Module Name: SmmIchnDispatch.h
14
15 @par Revision Reference:
16 This Protocol is defined in Framework of EFI SMM Core Interface Spec
17 Version 0.9.
18
19 **/
20
21 #ifndef _EFI_SMM_ICHN_DISPATCH_H_
22 #define _EFI_SMM_ICHN_DISPATCH_H_
23
24 //
25 // Global ID for the ICH SMI Protocol
26 //
27 #define EFI_SMM_ICHN_DISPATCH_PROTOCOL_GUID \
28 { \
29 0xc50b323e, 0x9075, 0x4f2a, {0xac, 0x8e, 0xd2, 0x59, 0x6a, 0x10, 0x85, 0xcc } \
30 }
31
32 typedef struct _EFI_SMM_ICHN_DISPATCH_PROTOCOL EFI_SMM_ICHN_DISPATCH_PROTOCOL;
33
34 //
35 // Related Definitions
36 //
37 //
38 // ICHN Specific SMIs. These are miscellaneous SMI sources that are supported by the
39 // ICHN specific SMI implementation. These may change over time. TrapNumber is only
40 // valid if the Type is Trap.
41 //
42 typedef enum {
43 //
44 // NOTE: NEVER delete items from this list/enumeration! Doing so will prevent other versions
45 // of the code from compiling. If the ICH version your driver is written for doesn't support
46 // some of these SMIs, then simply return EFI_UNSUPPORTED when a child/client tries to register
47 // for them.
48 //
49 IchnMch,
50 IchnPme,
51 IchnRtcAlarm,
52 IchnRingIndicate,
53 IchnAc97Wake,
54 IchnSerialIrq,
55 IchnY2KRollover,
56 IchnTcoTimeout,
57 IchnOsTco,
58 IchnNmi,
59 IchnIntruderDetect,
60 IchnBiosWp,
61 IchnMcSmi,
62 IchnPmeB0,
63 IchnThrmSts,
64 IchnSmBus,
65 IchnIntelUsb2,
66 IchnMonSmi7,
67 IchnMonSmi6,
68 IchnMonSmi5,
69 IchnMonSmi4,
70 IchnDevTrap13,
71 IchnDevTrap12,
72 IchnDevTrap11,
73 IchnDevTrap10,
74 IchnDevTrap9,
75 IchnDevTrap8,
76 IchnDevTrap7,
77 IchnDevTrap6,
78 IchnDevTrap5,
79 IchnDevTrap3,
80 IchnDevTrap2,
81 IchnDevTrap1,
82 IchnDevTrap0,
83 IchnIoTrap3,
84 IchnIoTrap2,
85 IchnIoTrap1,
86 IchnIoTrap0,
87 //
88 // INSERT NEW ITEMS JUST BEFORE THIS LINE
89 //
90 NUM_ICHN_TYPES // the number of items in this enumeration
91 } EFI_SMM_ICHN_SMI_TYPE;
92
93 typedef struct {
94 EFI_SMM_ICHN_SMI_TYPE Type;
95 } EFI_SMM_ICHN_DISPATCH_CONTEXT;
96
97 //
98 // Member functions
99 //
100 /**
101 Dispatch function for a ICH n specific SMI handler.
102
103 @param DispatchHandle Handle of this dispatch function.
104 @param DispatchContext Pointer to the dispatch function's context.
105 The DispatchContext fields are filled in
106 by the dispatching driver prior to
107 invoking this dispatch function.
108
109 Nothing
110
111 **/
112 typedef
113 VOID
114 (EFIAPI *EFI_SMM_ICHN_DISPATCH) (
115 IN EFI_HANDLE DispatchHandle,
116 IN EFI_SMM_ICHN_DISPATCH_CONTEXT *DispatchContext
117 );
118
119 /**
120 Register a child SMI source dispatch function with a parent SMM driver
121
122 @param This Protocol instance pointer.
123 @param DispatchFunction Pointer to dispatch function to be invoked for
124 this SMI source
125 @param DispatchContext Pointer to the dispatch function's context.
126 The caller fills this context in before calling
127 the register function to indicate to the register
128 function the ICHN SMI source for which the dispatch
129 function should be invoked.
130 @param DispatchHandle Handle of dispatch function, for when interfacing
131 with the parent Sx state SMM driver.
132
133 @retval EFI_SUCCESS The dispatch function has been successfully
134 registered and the SMI source has been enabled.
135 @retval EFI_DEVICE_ERROR The driver was unable to enable the SMI source.
136 @retval EFI_OUT_OF_RESOURCES Not enough memory (system or SMM) to manage this
137 child.
138 @retval EFI_INVALID_PARAMETER DispatchContext is invalid. The ICHN input value
139 is not within valid range.
140
141 **/
142 typedef
143 EFI_STATUS
144 (EFIAPI *EFI_SMM_ICHN_REGISTER) (
145 IN EFI_SMM_ICHN_DISPATCH_PROTOCOL *This,
146 IN EFI_SMM_ICHN_DISPATCH DispatchFunction,
147 IN EFI_SMM_ICHN_DISPATCH_CONTEXT *DispatchContext,
148 OUT EFI_HANDLE *DispatchHandle
149 );
150
151 /**
152 Unregister a child SMI source dispatch function with a parent SMM driver
153
154 @param This Protocol instance pointer.
155 @param DispatchHandle Handle of dispatch function to deregister.
156
157 @retval EFI_SUCCESS The dispatch function has been successfully
158 unregistered and the SMI source has been disabled
159 if there are no other registered child dispatch
160 functions for this SMI source.
161 @retval EFI_INVALID_PARAMETER Handle is invalid.
162 @retval other TBD
163
164 **/
165 typedef
166 EFI_STATUS
167 (EFIAPI *EFI_SMM_ICHN_UNREGISTER) (
168 IN EFI_SMM_ICHN_DISPATCH_PROTOCOL *This,
169 IN EFI_HANDLE DispatchHandle
170 );
171
172 //
173 // Interface structure for the SMM Ich n specific SMI Dispatch Protocol
174 //
175 /**
176 @par Protocol Description:
177 Provides the parent dispatch service for a given SMI source generator.
178
179 @param Register
180 Installs a child service to be dispatched by this protocol.
181
182 @param UnRegister
183 Removes a child service dispatched by this protocol.
184
185 **/
186 struct _EFI_SMM_ICHN_DISPATCH_PROTOCOL {
187 EFI_SMM_ICHN_REGISTER Register;
188 EFI_SMM_ICHN_UNREGISTER UnRegister;
189 };
190
191 extern EFI_GUID gEfiSmmIchnDispatchProtocolGuid;
192
193 #endif