]> git.proxmox.com Git - mirror_edk2.git/blob - Vlv2DeviceRefCodePkg/ValleyView2Soc/SouthCluster/Include/Protocol/SmmIchnDispatchEx.h
73e12c5d6a41befde40eda422aede118830331bb
[mirror_edk2.git] / Vlv2DeviceRefCodePkg / ValleyView2Soc / SouthCluster / Include / Protocol / SmmIchnDispatchEx.h
1 /**
2 **/
3 /**
4
5 Copyright (c) 2012 - 2014, Intel Corporation. All rights reserved
6
7 SPDX-License-Identifier: BSD-2-Clause-Patent
8
9
10
11 @file
12 SmmIchnDispatchEx.h
13
14 @brief
15 SmmIchnDispatch Extended Protocol
16
17 **/
18 #ifndef _EFI_SMM_ICHN_DISPATCH_EX_H_
19 #define _EFI_SMM_ICHN_DISPATCH_EX_H_
20
21 #ifdef ECP_FLAG
22 #include <Protocol/SmmIchnDispatch/SmmIchnDispatch.h>
23 #else
24 #include <Protocol/SmmIchnDispatch.h>
25 #endif
26
27 #define EFI_SMM_ICHN_DISPATCH_EX_PROTOCOL_GUID \
28 { \
29 0x3920405b, 0xc897, 0x44da, 0x88, 0xf3, 0x4c, 0x49, 0x8a, 0x6f, 0xf7, 0x36 \
30 }
31 extern EFI_GUID gEfiSmmIchnDispatchExProtocolGuid;
32
33 ///
34 /// Forward reference for ANSI C compatibility
35 ///
36 typedef struct _EFI_SMM_ICHN_DISPATCH_EX_PROTOCOL EFI_SMM_ICHN_DISPATCH_EX_PROTOCOL;
37
38 ///
39 /// Related Definitions
40 ///
41 ///
42 /// Ichn Dispatch Extended Types
43 ///
44 typedef enum {
45 IchnExPciExpress = NUM_ICHN_TYPES + 1,
46 IchnExMonitor,
47 IchnExSpi,
48 IchnExQRT,
49 IchnExGpioUnlock,
50 IchnExTmrOverflow,
51 IchnExPcie0Hotplug,
52 IchnExPcie1Hotplug,
53 IchnExPcie2Hotplug,
54 IchnExPcie3Hotplug,
55 IchnExPcie0LinkActive,
56 IchnExPcie1LinkActive,
57 IchnExPcie2LinkActive,
58 IchnExPcie3LinkActive,
59 ///
60 /// INSERT NEW ITEMS JUST BEFORE THIS LINE
61 ///
62 IchnExTypeMAX /// the maximum number of items in this enumeration
63 } EFI_SMM_ICHN_EX_SMI_TYPE;
64
65 typedef struct {
66 EFI_SMM_ICHN_EX_SMI_TYPE Type;
67 } EFI_SMM_ICHN_DISPATCH_EX_CONTEXT;
68
69 ///
70 /// Member functions
71 ///
72 typedef
73 VOID
74 (EFIAPI *EFI_SMM_ICHN_DISPATCH_EX) (
75 IN EFI_HANDLE DispatchHandle,
76 IN EFI_SMM_ICHN_DISPATCH_EX_CONTEXT * DispatchContext
77 );
78
79 /**
80
81 @brief
82 Dispatch function for a ICH n Extended specific SMI handler.
83
84 @param[in] DispatchHandle Handle of this dispatch function.
85 @param[in] DispatchContext Pointer to the dispatch function's context.
86 The DispatchContext fields are filled in
87 by the dispatching driver prior to
88 invoking this dispatch function.
89
90 @retval None
91
92 **/
93 typedef
94 EFI_STATUS
95 (EFIAPI *EFI_SMM_ICHN_EX_REGISTER) (
96 IN EFI_SMM_ICHN_DISPATCH_EX_PROTOCOL * This,
97 IN EFI_SMM_ICHN_DISPATCH_EX DispatchFunction,
98 IN EFI_SMM_ICHN_DISPATCH_EX_CONTEXT * DispatchContext,
99 OUT EFI_HANDLE * DispatchHandle
100 );
101
102 /**
103
104 @brief
105 Register a child SMI source dispatch function with a parent SMM driver
106
107 @param[in] This Protocol instance pointer.
108 @param[in] DispatchFunction Pointer to dispatch function to be invoked for
109 this SMI source
110 @param[in] DispatchContext Pointer to the dispatch function's context.
111 The caller fills this context in before calling
112 the register function to indicate to the register
113 function the ICHN SMI source for which the dispatch
114 function should be invoked.
115 @param[in] DispatchHandle Handle of dispatch function, for when interfacing
116 with the parent SMM driver.
117
118 @retval EFI_SUCCESS The dispatch function has been successfully
119 registered and the SMI source has been enabled.
120 @retval EFI_DEVICE_ERROR The driver was unable to enable the SMI source.
121 @retval EFI_OUT_OF_RESOURCES Not enough memory (system or SMM) to manage this
122 child.
123 @retval EFI_INVALID_PARAMETER DispatchContext is invalid. The ICHN input value
124 is not within valid range.
125
126 **/
127 typedef
128 EFI_STATUS
129 (EFIAPI *EFI_SMM_ICHN_EX_UNREGISTER) (
130 IN EFI_SMM_ICHN_DISPATCH_EX_PROTOCOL * This,
131 IN EFI_HANDLE DispatchHandle
132 );
133
134 /**
135
136 @brief
137 Unregister a child SMI source dispatch function with a parent SMM driver
138
139 @param[in] This Protocol instance pointer.
140 @param[in] DispatchHandle Handle of dispatch function to deregister.
141
142 @retval EFI_SUCCESS The dispatch function has been successfully
143 unregistered and the SMI source has been disabled
144 if there are no other registered child dispatch
145 functions for this SMI source.
146 @retval EFI_INVALID_PARAMETER Handle is invalid.
147 @retval Others TBD
148
149 **/
150
151 ///
152 /// Interface structure for the SMM Ich n specific SMI Dispatch Protocol
153 ///
154 typedef struct _EFI_SMM_ICHN_DISPATCH_EX_PROTOCOL {
155 EFI_SMM_ICHN_EX_REGISTER Register;
156 EFI_SMM_ICHN_EX_UNREGISTER UnRegister;
157 };
158
159 #endif