2 * This file is part of the coreboot project.
4 * Original take from digitallogic/adl855pc
6 * Copyright (C) 2010 Travelping GmbH <info@travelping.com>
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
24 #include <device/pci_def.h>
26 #include <device/pnp_def.h>
27 #include <arch/romcc_io.h>
32 #include "pc80/udelay_io.c"
33 #include <pc80/mc146818rtc.h>
34 #include <console/console.h>
35 #include "southbridge/intel/i82801dx/i82801dx.h"
36 #include "southbridge/intel/i82801dx/i82801dx_early_smbus.c"
37 #include "northbridge/intel/i855/raminit.h"
38 #include "northbridge/intel/i855/debug.c"
39 #include "superio/winbond/w83627thg/w83627thg_early_serial.c"
40 #include "cpu/x86/mtrr/earlymtrr.c"
41 #include "cpu/x86/bist.h"
43 #define SERIAL_DEV PNP_DEV(0x2e, W83627THG_SP1)
45 static inline int spd_read_byte(unsigned device, unsigned address)
47 return smbus_read_byte(device, address);
50 #include "northbridge/intel/i855/raminit.c"
51 #include "northbridge/intel/i855/reset_test.c"
53 void main(unsigned long bist)
62 w83627thg_enable_serial(SERIAL_DEV, CONFIG_TTYS0_BASE);
66 /* Halt if there was a built in self test failure */
67 report_bist_failure(bist);
73 if (!bios_reset_detected()) {
77 dump_smbus_registers();
79 sdram_set_registers();
80 sdram_set_spd_registers();
86 dump_pci_device(PCI_DEV(0, 0, 0));
88 // Check all of memory
89 ram_check(0x00000000, msr.lo+(msr.hi<<32));
90 // Check 16MB of memory @ 0
91 ram_check(0x00000000, 0x01000000);
92 // Check 16MB of memory @ 2GB
93 ram_check(0x80000000, 0x81000000);