5 #include <device/pci_def.h>
7 #include <device/pnp_def.h>
8 #include <arch/romcc_io.h>
9 #include <cpu/x86/lapic.h>
12 #include "option_table.h"
13 #include "pc80/mc146818rtc_early.c"
14 #include "pc80/serial.c"
15 #include "arch/i386/lib/console.c"
16 #include "lib/ramtest.c"
17 #include "southbridge/intel/i82801ca/i82801ca_early_smbus.c"
18 #include "northbridge/intel/e7501/raminit.h"
19 #include "cpu/x86/lapic/boot_cpu.c"
20 #include "northbridge/intel/e7501/debug.c"
21 #include "superio/smsc/lpc47b272/lpc47b272_early_serial.c"
22 #include "cpu/x86/mtrr/earlymtrr.c"
23 #include "cpu/x86/bist.h"
25 #define SUPERIO_PORT 0x2e
26 #define SERIAL_DEV PNP_DEV(SUPERIO_PORT, LPC47B272_SP1)
28 static void hard_reset(void)
33 static inline void activate_spd_rom(const struct mem_controller *ctrl)
38 static inline int spd_read_byte(unsigned device, unsigned address)
40 return smbus_read_byte(device, address);
43 #include "northbridge/intel/e7501/raminit.c"
44 #include "northbridge/intel/e7501/reset_test.c"
45 #include "lib/generic_sdram.c"
48 // This function MUST appear last (ROMCC limitation)
49 static void main(unsigned long bist)
51 static const struct mem_controller memctrl[] = {
53 .d0 = PCI_DEV(0, 0, 0),
54 .d0f1 = PCI_DEV(0, 0, 1),
55 .channel0 = { (0xa<<3)|0, (0xa<<3)|1, (0xa<<3)|2, 0 },
56 .channel1 = { (0xa<<3)|4, (0xa<<3)|5, (0xa<<3)|6, 0 },
62 // Skip this if there was a built in self test failure
68 // Get the serial port running and print a welcome banner
70 lpc47b272_enable_serial(SERIAL_DEV, CONFIG_TTYS0_BASE);
74 // Halt if there was a built in self test failure
75 report_bist_failure(bist);
77 // print_pci_devices();
79 // If this is a warm boot, some initialization can be skipped
81 if (!bios_reset_detected())
84 // dump_spd_registers(&memctrl[0]);
85 // dump_smbus_registers();
87 // memreset_setup(); No-op for this chipset
88 sdram_initialize(ARRAY_SIZE(memctrl), memctrl);
91 // NOTE: ROMCC dies with an internal compiler error
92 // if the following line is removed.
93 print_debug("SDRAM is up.\r\n");