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