• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /** @file
2 File to contain all the hardware specific stuff for the Smm QNCn dispatch protocol.
3 
4 Copyright (c) 2013-2015 Intel Corporation.
5 
6 This program and the accompanying materials
7 are licensed and made available under the terms and conditions of the BSD License
8 which accompanies this distribution.  The full text of the license may be found at
9 http://opensource.org/licenses/bsd-license.php
10 
11 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
12 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
13 
14 
15 **/
16 
17 //
18 // Include common header file for this module.
19 //
20 #include "CommonHeader.h"
21 
22 #include "QNCSmmHelpers.h"
23 
24 QNC_SMM_SOURCE_DESC QNCN_SOURCE_DESCS[NUM_ICHN_TYPES] = {
25 
26   // QNCnMch (0)
27   NULL_SOURCE_DESC_INITIALIZER,
28 
29   // QNCnPme (1)
30   NULL_SOURCE_DESC_INITIALIZER,
31 
32   // QNCnRtcAlarm (2)
33   {
34     QNC_SMM_NO_FLAGS,
35     {
36       {{ACPI_ADDR_TYPE, {R_QNC_PM1BLK_PM1E}}, S_QNC_PM1BLK_PM1E, N_QNC_PM1BLK_PM1E_RTC},
37       NULL_BIT_DESC_INITIALIZER
38     },
39     {
40       {{ACPI_ADDR_TYPE, {R_QNC_PM1BLK_PM1S}}, S_QNC_PM1BLK_PM1S, N_QNC_PM1BLK_PM1S_RTC}
41     }
42   },
43 
44   // QNCnRingIndicate (3)
45   NULL_SOURCE_DESC_INITIALIZER,
46 
47   // QNCnAc97Wake (4)
48   NULL_SOURCE_DESC_INITIALIZER,
49 
50   // QNCnSerialIrq (5)
51   NULL_SOURCE_DESC_INITIALIZER,
52 
53   // QNCnY2KRollover (6)
54   NULL_SOURCE_DESC_INITIALIZER,
55 
56   // QNCnTcoTimeout (7)
57   NULL_SOURCE_DESC_INITIALIZER,
58 
59   // QNCnOsTco (8)
60   NULL_SOURCE_DESC_INITIALIZER,
61 
62   // QNCnNmi (9)
63   NULL_SOURCE_DESC_INITIALIZER,
64 
65   // QNCnIntruderDetect (10)
66   NULL_SOURCE_DESC_INITIALIZER,
67 
68   // QNCnBiosWp (11)
69   {
70     QNC_SMM_CLEAR_WITH_ZERO,
71     {
72       {
73         {
74           PCI_ADDR_TYPE,
75           {
76             (
77               (PCI_BUS_NUMBER_QNC << 24) |
78               (PCI_DEVICE_NUMBER_QNC_LPC << 16) |
79               (PCI_FUNCTION_NUMBER_QNC_LPC << 8) |
80               R_QNC_LPC_BIOS_CNTL
81             )
82           }
83         },
84         S_QNC_LPC_BIOS_CNTL,
85         N_QNC_LPC_BIOS_CNTL_BLE
86       },
87       NULL_BIT_DESC_INITIALIZER
88     },
89     {
90       {
91         {
92           PCI_ADDR_TYPE,
93           {
94             (
95               (PCI_BUS_NUMBER_QNC << 24) |
96               (PCI_DEVICE_NUMBER_QNC_LPC << 16) |
97               (PCI_FUNCTION_NUMBER_QNC_LPC << 8) |
98               R_QNC_LPC_BIOS_CNTL
99             )
100           }
101         },
102         S_QNC_LPC_BIOS_CNTL,
103         N_QNC_LPC_BIOS_CNTL_BIOSWE
104       }
105     }
106   },
107 
108   // QNCnMcSmi (12)
109   NULL_SOURCE_DESC_INITIALIZER,
110 
111   // QNCnPmeB0 (13)
112   NULL_SOURCE_DESC_INITIALIZER,
113 
114   // QNCnThrmSts (14)
115   {
116     QNC_SMM_SCI_EN_DEPENDENT,
117     {
118       {{GPE_ADDR_TYPE, {R_QNC_GPE0BLK_GPE0E}}, S_QNC_GPE0BLK_GPE0E, N_QNC_GPE0BLK_GPE0E_THRM},
119       NULL_BIT_DESC_INITIALIZER
120     },
121     {
122       {{GPE_ADDR_TYPE, {R_QNC_GPE0BLK_GPE0S}}, S_QNC_GPE0BLK_GPE0S, N_QNC_GPE0BLK_GPE0S_THRM}
123     }
124   },
125 
126   // QNCnSmBus (15)
127   NULL_SOURCE_DESC_INITIALIZER,
128 
129   // QNCnIntelUsb2 (16)
130   NULL_SOURCE_DESC_INITIALIZER,
131 
132   // QNCnMonSmi7 (17)
133   NULL_SOURCE_DESC_INITIALIZER,
134 
135   // QNCnMonSmi6 (18)
136   NULL_SOURCE_DESC_INITIALIZER,
137 
138   // QNCnMonSmi5 (19)
139   NULL_SOURCE_DESC_INITIALIZER,
140 
141   // QNCnMonSmi4 (20)
142   NULL_SOURCE_DESC_INITIALIZER,
143 
144   // QNCnDevTrap13 (21)
145   NULL_SOURCE_DESC_INITIALIZER,
146 
147   // QNCnDevTrap12 (22)
148   NULL_SOURCE_DESC_INITIALIZER,
149 
150   // QNCnDevTrap11 (23)
151   NULL_SOURCE_DESC_INITIALIZER,
152 
153   // QNCnDevTrap10 (24)
154   NULL_SOURCE_DESC_INITIALIZER,
155 
156   // QNCnDevTrap9 (25)
157   NULL_SOURCE_DESC_INITIALIZER,
158 
159   // QNCnDevTrap8 (26)
160   NULL_SOURCE_DESC_INITIALIZER,
161 
162   // QNCnDevTrap7 (27)
163   NULL_SOURCE_DESC_INITIALIZER,
164 
165   // QNCnDevTrap6 (28)
166   NULL_SOURCE_DESC_INITIALIZER,
167 
168   // QNCnDevTrap5 (29)
169   NULL_SOURCE_DESC_INITIALIZER,
170 
171   // QNCnDevTrap3 (30)
172   NULL_SOURCE_DESC_INITIALIZER,
173 
174   // QNCnDevTrap2 (31)
175   NULL_SOURCE_DESC_INITIALIZER,
176 
177   // QNCnDevTrap1 (32)
178   NULL_SOURCE_DESC_INITIALIZER,
179 
180   // QNCnDevTrap0 (33)
181   NULL_SOURCE_DESC_INITIALIZER,
182 
183   // QNCnIoTrap3 (34)
184   NULL_SOURCE_DESC_INITIALIZER,
185 
186   // QNCnIoTrap2 (35)
187   NULL_SOURCE_DESC_INITIALIZER,
188 
189   // QNCnIoTrap1 (36)
190   NULL_SOURCE_DESC_INITIALIZER,
191 
192   // QNCnIoTrap0 (37)
193   NULL_SOURCE_DESC_INITIALIZER,
194 
195   // QNCnPciExpress (38)
196   NULL_SOURCE_DESC_INITIALIZER,
197 
198   // QNCnMonitor (39)
199   NULL_SOURCE_DESC_INITIALIZER,
200 
201   // QNCnSpi (40)
202   NULL_SOURCE_DESC_INITIALIZER,
203 
204   // QNCnQRT (41)
205   NULL_SOURCE_DESC_INITIALIZER,
206 
207   // QNCnGpioUnlock (42)
208   NULL_SOURCE_DESC_INITIALIZER
209 };
210 
211 VOID
QNCSmmQNCnClearSource(QNC_SMM_SOURCE_DESC * SrcDesc)212 QNCSmmQNCnClearSource(
213   QNC_SMM_SOURCE_DESC   *SrcDesc
214   )
215 {
216     QNCSmmClearSource (SrcDesc);
217 }
218