2 Register initialization table for Ich.
4 Copyright (c) 2013-2015 Intel Corporation.
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
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.
18 #include "CommonHeader.h"
26 // All devices on bus 0.
30 // FNC 0: IOSF2AHB Bridge
32 // FNC 0: IOSF2AHB Bridge
39 // FNC 0: PCI-LPC Bridge
41 S3PciWrite32 (PCI_LIB_ADDRESS (PCI_BUS_NUMBER_QNC
, PCI_DEVICE_NUMBER_QNC_LPC
, PCI_FUNCTION_NUMBER_QNC_LPC
, R_QNC_LPC_FWH_BIOS_DEC
),
42 B_QNC_LPC_FWH_BIOS_DEC_F0
| B_QNC_LPC_FWH_BIOS_DEC_F8
|
43 B_QNC_LPC_FWH_BIOS_DEC_E0
| B_QNC_LPC_FWH_BIOS_DEC_E8
|
44 B_QNC_LPC_FWH_BIOS_DEC_D0
| B_QNC_LPC_FWH_BIOS_DEC_D8
|
45 B_QNC_LPC_FWH_BIOS_DEC_C0
| B_QNC_LPC_FWH_BIOS_DEC_C8
49 // Program SCI Interrupt for IRQ9
51 S3PciWrite8 (PCI_LIB_ADDRESS (PCI_BUS_NUMBER_QNC
, PCI_DEVICE_NUMBER_QNC_LPC
, PCI_FUNCTION_NUMBER_QNC_LPC
, R_QNC_LPC_ACTL
),
52 V_QNC_LPC_ACTL_SCIS_IRQ9
56 // Program Quark Interrupt Route Registers
58 S3MmioWrite16 ((UINTN
)PcdGet64(PcdRcbaMmioBaseAddress
) + R_QNC_RCRB_AGENT0IR
,
59 PcdGet16(PcdQuarkAgent0IR
)
61 S3MmioWrite16 ((UINTN
)PcdGet64(PcdRcbaMmioBaseAddress
) + R_QNC_RCRB_AGENT1IR
,
62 PcdGet16(PcdQuarkAgent1IR
)
64 S3MmioWrite16 ((UINTN
)PcdGet64(PcdRcbaMmioBaseAddress
) + R_QNC_RCRB_AGENT2IR
,
65 PcdGet16(PcdQuarkAgent2IR
)
67 S3MmioWrite16 ((UINTN
)PcdGet64(PcdRcbaMmioBaseAddress
) + R_QNC_RCRB_AGENT3IR
,
68 PcdGet16(PcdQuarkAgent3IR
)
72 // Program SVID and SID for QNC PCI devices. In order to boost performance, we
73 // combine two 16 bit PCI_WRITE into one 32 bit PCI_WRITE. The programmed LPC SVID
74 // will reflect on all internal devices's SVID registers
76 S3PciWrite32 (PCI_LIB_ADDRESS (PCI_BUS_NUMBER_QNC
, PCI_DEVICE_NUMBER_QNC_LPC
, PCI_FUNCTION_NUMBER_QNC_LPC
, R_EFI_PCI_SVID
),
77 (UINT32
)(V_INTEL_VENDOR_ID
+ (QUARK_V_LPC_DEVICE_ID_0
<< 16))
81 // Write once on Element Self Description Register before OS boot
83 QNCMmio32And (PcdGet64(PcdRcbaMmioBaseAddress
), 0x04, 0xFF00FFFF);