2 * This file is part of the coreboot project.
4 * Copyright (C) 2009-2010 iWave Systems
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; version 2 of the License.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
17 #include <southbridge/intel/sch/sch.h>
20 static void sch_set_mtrr(void)
23 printk(BIOS_DEBUG
, "1");
27 printk(BIOS_DEBUG
, "2");
31 printk(BIOS_DEBUG
, "3");
35 printk(BIOS_DEBUG
, "4");
39 printk(BIOS_DEBUG
, "5");
43 printk(BIOS_DEBUG
, "6");
47 printk(BIOS_DEBUG
, "7");
51 printk(BIOS_DEBUG
, "8");
55 printk(BIOS_DEBUG
, "9");
59 printk(BIOS_DEBUG
, "10");
63 printk(BIOS_DEBUG
, "11");
67 printk(BIOS_DEBUG
, "12");
71 printk(BIOS_DEBUG
, "13");
75 printk(BIOS_DEBUG
, "14");
79 printk(BIOS_DEBUG
, "15");
83 printk(BIOS_DEBUG
, "16");
87 printk(BIOS_DEBUG
, "16");
91 printk(BIOS_DEBUG
, "17");
95 printk(BIOS_DEBUG
, "18");
99 printk(BIOS_DEBUG
, "19");
103 printk(BIOS_DEBUG
, "20");
107 printk(BIOS_DEBUG
, "21");
111 printk(BIOS_DEBUG
, "22");
115 printk(BIOS_DEBUG
, "23");
131 printk(BIOS_DEBUG
, "end");
135 static void sch_detect_chipset(void)
139 printk(BIOS_INFO
, "\n");
140 reg16
= pci_read_config16(PCI_DEV(0, 0x00, 0), 0x2);
143 printk(BIOS_INFO
, "UL11L/US15L");
146 printk(BIOS_INFO
, "US15W");
149 /* Others reserved. */
150 printk(BIOS_INFO
, "Unknown (%02x)", reg16
);
152 printk(BIOS_INFO
, " Chipset ");
154 reg8
= pci_read_config8(PCI_DEV(0, 0x1f, 0), 0x8);
157 printk(BIOS_INFO
, "Qual. Sample ES1, Stepping B1");
160 printk(BIOS_INFO
, "Qual. Sample ES2, Stepping C0");
163 printk(BIOS_INFO
, "Qual. Sample ES2-Prime, Stepping D0");
166 printk(BIOS_INFO
, "Qual. Sample QS, Stepping D1");
169 /* Others reserved. */
170 printk(BIOS_INFO
, "Unknown (%02x)", reg8
);
172 printk(BIOS_INFO
, "\n");
175 static void sch_setup_non_standard_bars(void)
177 printk(BIOS_DEBUG
, "Setting up ACPI PM1 block ");
178 /* Address 0x1000 size 16B */
179 pci_write_config32(PCI_DEV(0, 0x1f, 0), 0x48,
180 (0x80000000 | DEFAULT_PMBASE
));
182 printk(BIOS_DEBUG
, "Setting up ACPI P block ");
183 /* Address 0x1010 size 16B */
184 sch_port_access_write(4, 0x70, 4, 0x80001010);
186 /* SMBus address 0x1040 size 64B */
187 pci_write_config32(PCI_DEV(0, 0x1f, 0), 0x40, 0x80001040);
189 /* GPIO address 0x1080 size 64B */
190 pci_write_config32(PCI_DEV(0, 0x1f, 0), 0x44, 0x80001080);
192 /* GPE0 address 0x10C0 size 64B */
193 pci_write_config32(PCI_DEV(0, 0x1f, 0), 0x4C, 0x800010C0);
195 sch_port_access_write(2, 4, 4, 0x3F703F76); /* FIXME: SMM Control */
197 /* Base of Stolen Memory Address 0x1080 size 64B */
198 pci_write_config32(PCI_DEV(0, 0x02, 0), 0x5C, 0x3F800000);
200 sch_port_access_write(0, 0, 4, DEFAULT_PCIEXBAR
| 1); /* pre-b1 */
201 sch_port_access_write(2, 9, 4, DEFAULT_PCIEXBAR
| 1); /* b1+ */
204 pci_write_config32(PCI_DEV(0, 0x1f, 0), 0xF0,
205 ((uintptr_t)DEFAULT_RCBABASE
| 1));
207 printk(BIOS_DEBUG
, " done.\n");
210 static void sch_early_initialization(void)
212 /* Print some chipset specific information. */
213 sch_detect_chipset();
215 /* Setup all non standard BARs. */
216 sch_setup_non_standard_bars();