IEI NOVA-4899R: Add missing license headers.
[coreboot.git] / src / mainboard / iei / nova4899r / auto.c
1 /*
2  * This file is part of the LinuxBIOS project.
3  *
4  * Copyright (C) 2007 Luis Correia <luis.f.correia@gmail.com>
5  *
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; either version 2 of the License, or
9  * (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program; if not, write to the Free Software
18  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
19  */
20
21 #define ASSEMBLY 1
22
23 #include <stdint.h>
24 #include <device/pci_def.h>
25 #include <arch/io.h>
26 #include <device/pnp_def.h>
27 #include <arch/romcc_io.h>
28 #include <arch/hlt.h>
29 #include "pc80/serial.c"
30 #include "arch/i386/lib/console.c"
31 #include "ram/ramtest.c"
32 #include "superio/winbond/w83977tf/w83977tf_early_serial.c"
33 #include "cpu/x86/bist.h"
34
35 #define SERIAL_DEV PNP_DEV(0x3f0, W83977TF_SP1)
36
37 #include "northbridge/amd/gx1/raminit.c"
38
39 static void main(unsigned long bist)
40 {
41         w83977tf_enable_serial(SERIAL_DEV, TTYS0_BASE);
42         uart_init();
43         console_init();
44
45         /* Halt if there was a built in self test failure */
46         report_bist_failure(bist);
47         
48         sdram_init();
49         
50         /* Check all of memory */
51 #if 0
52         ram_check(0x00000000, msr.lo);
53 #endif
54 #if 0
55         static const struct {
56                 unsigned long lo, hi;
57         } check_addrs[] = {
58                 /* Check 16MB of memory @ 0*/
59                 { 0x00000000, 0x01000000 },
60 #if TOTAL_CPUS > 1
61                 /* Check 16MB of memory @ 2GB */
62                 { 0x80000000, 0x81000000 },
63 #endif
64         };
65         int i;
66         for(i = 0; i < sizeof(check_addrs)/sizeof(check_addrs[0]); i++) {
67                 ram_check(check_addrs[i].lo, check_addrs[i].hi);
68         }
69 #endif
70 }