4 #include <device/pci_def.h>
6 #include <device/pnp_def.h>
7 #include <arch/romcc_io.h>
8 #include <cpu/x86/lapic.h>
10 #include "option_table.h"
11 #include "pc80/mc146818rtc_early.c"
12 #include "pc80/serial.c"
13 #include "arch/i386/lib/console.c"
14 #include "ram/ramtest.c"
15 #include "southbridge/intel/i82801er/i82801er_early_smbus.c"
16 #include "northbridge/intel/e7501/raminit.h"
18 #include "cpu/intel/model_f2x/apic_timer.c"
19 #include "lib/delay.c"
21 #include "cpu/x86/lapic/boot_cpu.c"
22 #include "northbridge/intel/e7501/debug.c"
23 #include "superio/winbond/w83627hf/w83627hf_early_serial.c"
24 #include "cpu/x86/mtrr/earlymtrr.c"
25 #include "cpu/x86/bist.h"
27 #define SERIAL_DEV PNP_DEV(0x2e, W83627HF_SP1)
29 static void hard_reset(void)
34 static void memreset_setup(void)
38 static void memreset(int controllers, const struct mem_controller *ctrl)
44 static inline void activate_spd_rom(const struct mem_controller *ctrl)
49 static inline int spd_read_byte(unsigned device, unsigned address)
51 return smbus_read_byte(device, address);
54 #include "northbridge/intel/e7501/raminit.c"
55 #include "northbridge/intel/e7501/reset_test.c"
56 #include "sdram/generic_sdram.c"
58 static void main(unsigned long bist)
60 static const struct mem_controller memctrl[] = {
62 .d0 = PCI_DEV(0, 0, 0),
63 .d0f1 = PCI_DEV(0, 0, 1),
64 .channel0 = { (0xa<<3)|0, (0xa<<3)|1, (0xa<<3)|2, 0 },
65 .channel1 = { (0xa<<3)|4, (0xa<<3)|5, (0xa<<3)|6, 0 },
70 /* Skip this if there was a built in self test failure */
77 w83627hf_enable_serial(SERIAL_DEV, TTYS0_BASE);
81 /* Halt if there was a built in self test failure */
82 report_bist_failure(bist);
84 // setup_default_resource_map();
88 if(!bios_reset_detected()) {
91 // dump_spd_registers(&memctrl[0]);
92 dump_smbus_registers();
96 sdram_initialize(sizeof(memctrl)/sizeof(memctrl[0]), memctrl);
100 /* clear memory 1meg */
103 "movl %0, %%fs:(%1)\n\t"
108 : "a" (0), "D" (0), "c" (1024*1024)
118 dump_pci_device(PCI_DEV(0, 0, 0));
123 msr = rdmsr(TOP_MEM2);
124 print_debug("TOP_MEM2: ");
125 print_debug_hex32(msr.hi);
126 print_debug_hex32(msr.lo);
131 ram_check(0x00000000, msr.lo+(msr.hi<<32));
134 // Check 16MB of memory @ 0
135 ram_check(0x00000000, 0x01000000);
137 // Check 16MB of memory @ 2GB
138 ram_check(0x80000000, 0x81000000);