3 #define ASM_CONSOLE_LOGLEVEL 8
5 #include <device/pci_def.h>
7 #include <device/pnp_def.h>
8 #include <arch/romcc_io.h>
10 #include <arch/smp/lapic.h>
13 //#include "option_table.h"
15 #include "pc80/mc146818rtc_early.c"
16 #include "pc80/serial.c"
17 #include "arch/i386/lib/console.c"
18 #include "lib/ramtest.c"
19 #include "southbridge/intel/i82801dbm/i82801dbm_early_smbus.c"
20 #include "northbridge/intel/i855/raminit.h"
23 #include "cpu/p6/apic_timer.c"
24 #include "lib/delay.c"
27 #include "cpu/x86/lapic/boot_cpu.c"
28 #include "northbridge/intel/i855/debug.c"
29 #include "superio/winbond/w83627hf/w83627hf_early_serial.c"
30 #include "cpu/x86/mtrr/earlymtrr.c"
31 #include "cpu/x86/bist.h"
33 #define SERIAL_DEV PNP_DEV(0x2e, W83627HF_SP1)
35 static void hard_reset(void)
40 static void memreset_setup(void)
44 static void memreset(int controllers, const struct mem_controller *ctrl)
50 static inline void activate_spd_rom(const struct mem_controller *ctrl)
55 static inline int spd_read_byte(unsigned device, unsigned address)
57 return smbus_read_byte(device, address);
60 #include "northbridge/intel/i855/raminit.c"
61 #include "northbridge/intel/i855/reset_test.c"
62 #include "lib/generic_sdram.c"
64 static void main(unsigned long bist)
66 static const struct mem_controller memctrl[] = {
68 .d0 = PCI_DEV(0, 0, 1),
69 .channel0 = { (0xa<<3)|0, 0 },
81 w83627hf_enable_serial(SERIAL_DEV, CONFIG_TTYS0_BASE);
86 /* Halt if there was a built in self test failure */
87 report_bist_failure(bist);
94 if(!bios_reset_detected()) {
97 dump_spd_registers(&memctrl[0]);
98 // dump_smbus_registers();
104 sdram_initialize(ARRAY_SIZE(memctrl), memctrl);
109 /* clear memory 1meg */
112 "movl %0, %%fs:(%1)\n\t"
117 : "a" (0), "D" (0), "c" (1024*1024)
127 dump_pci_device(PCI_DEV(0, 0, 0));
132 ram_check(0x00000000, msr.lo+(msr.hi<<32));
135 // Check 16MB of memory @ 0
136 ram_check(0x00000000, 0x01000000);
138 // Check 16MB of memory @ 2GB
139 ram_check(0x80000000, 0x81000000);