74eca54ba6417f147111cb1639c7c21b793e058a
[coreboot.git] / src / mainboard / advantech / pcm-5820 / Config.lb
1 ##
2 ## This file is part of the LinuxBIOS project.
3 ##
4 ## Copyright (C) 2007 Uwe Hermann <uwe@hermann-uwe.de>
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 if USE_FALLBACK_IMAGE
22         default ROM_SECTION_SIZE = FALLBACK_SIZE
23         default ROM_SECTION_OFFSET = (ROM_SIZE - FALLBACK_SIZE)
24 else
25         default ROM_SECTION_SIZE = (ROM_SIZE - FALLBACK_SIZE)
26         default ROM_SECTION_OFFSET = 0
27 end
28 default CONFIG_ROM_PAYLOAD_START = (0xffffffff - ROM_SIZE
29                                     + ROM_SECTION_OFFSET + 1)
30 default PAYLOAD_SIZE = (ROM_SECTION_SIZE - ROM_IMAGE_SIZE)
31 default _ROMBASE = (CONFIG_ROM_PAYLOAD_START + PAYLOAD_SIZE)
32 default XIP_ROM_SIZE = 64 * 1024
33 default XIP_ROM_BASE = (_ROMBASE + ROM_IMAGE_SIZE - XIP_ROM_SIZE)
34 arch i386 end
35 driver mainboard.o
36 if HAVE_PIRQ_TABLE
37         object irq_tables.o
38 end
39 makerule ./failover.E
40         depends "$(MAINBOARD)/../../../arch/i386/lib/failover.c ./romcc"
41         action "./romcc -E -O --label-prefix=failover -I$(TOP)/src -I. $(CPPFLAGS) $(MAINBOARD)/../../../arch/i386/lib/failover.c -o $@"
42 end
43 makerule ./failover.inc
44         depends "$(MAINBOARD)/../../../arch/i386/lib/failover.c ./romcc"
45         action "./romcc -O --label-prefix=failover -I$(TOP)/src -I. $(CPPFLAGS) $(MAINBOARD)/../../../arch/i386/lib/failover.c -o $@"
46 end
47 makerule ./auto.E
48         # depends       "$(MAINBOARD)/auto.c option_table.h ./romcc"
49         depends "$(MAINBOARD)/auto.c ./romcc"
50         action  "./romcc -E -O -I$(TOP)/src -I. $(CPPFLAGS) $(MAINBOARD)/auto.c -o $@"
51 end
52 makerule ./auto.inc
53         # depends "$(MAINBOARD)/auto.c option_table.h ./romcc"
54         depends "$(MAINBOARD)/auto.c ./romcc"
55         action  "./romcc -O -I$(TOP)/src -I. $(CPPFLAGS) $(MAINBOARD)/auto.c -o $@"
56 end
57 mainboardinit cpu/x86/16bit/entry16.inc
58 mainboardinit cpu/x86/32bit/entry32.inc
59 ldscript /cpu/x86/16bit/entry16.lds
60 ldscript /cpu/x86/32bit/entry32.lds
61 if USE_FALLBACK_IMAGE
62         mainboardinit cpu/x86/16bit/reset16.inc
63         ldscript /cpu/x86/16bit/reset16.lds
64 else
65         mainboardinit cpu/x86/32bit/reset32.inc
66         ldscript /cpu/x86/32bit/reset32.lds
67 end
68 mainboardinit arch/i386/lib/cpu_reset.inc
69 mainboardinit arch/i386/lib/id.inc
70 ldscript /arch/i386/lib/id.lds
71 if USE_FALLBACK_IMAGE
72         ldscript /arch/i386/lib/failover.lds
73         mainboardinit ./failover.inc
74 end
75 mainboardinit cpu/x86/fpu/enable_fpu.inc
76 mainboardinit cpu/amd/model_gx1/cpu_setup.inc
77 mainboardinit cpu/amd/model_gx1/gx_setup.inc
78 mainboardinit ./auto.inc
79
80 dir /pc80
81 config chip.h
82
83 chip northbridge/amd/gx1                # Northbridge
84   device pci_domain 0 on                # PCI domain
85     device pci 0.0 on end               # Host bridge
86     chip southbridge/amd/cs5530         # Southbridge
87       device pci 12.0 on                # ISA bridge
88         chip superio/winbond/w83977f    # SUper I/O
89           device pnp 3f0.0 on           # Floppy
90             io 0x60 = 0x3f0
91             irq 0x70 = 6
92             drq 0x74 = 2
93           end
94           device pnp 3f0.1 on           # Parallel port
95             io 0x60 = 0x378
96             irq 0x70 = 7
97           end
98           device pnp 3f0.2 on           # COM1
99             io 0x60 = 0x3f8
100             irq 0x70 = 4
101           end
102           device pnp 3f0.3 on           # COM2
103             io 0x60 = 0x2f8
104             irq 0x70 = 3
105           end
106           device pnp 3f0.4 on           # RTC / On-Now control
107             io 0x60 = 0x70
108             irq 0x70 = 8
109           end
110           device pnp 3f0.5 on           # PS/2 keyboard / mouse
111             io 0x60 = 0x60
112             io 0x62 = 0x64
113             irq 0x70 = 1                # PS/2 keyboard interrupt
114             irq 0x72 = 12               # PS/2 mouse interrupt
115           end
116           device pnp 3f0.6 on           # IR
117             # TODO?
118           end
119           device pnp 3f0.7 on           # GPIO 1
120             # TODO?
121           end
122           device pnp 3f0.8 on           # GPIO 2
123             # TODO?
124           end
125         end
126       end
127       device pci 12.1 on end            # SMI
128       device pci 12.2 on end            # IDE
129       device pci 12.3 on end            # Audio (onboard)
130       device pci 12.4 on end            # VGA
131       device pci 13.0 on end            # USB
132       register "ide0_enable" = "1"
133       register "ide1_enable" = "1"
134     end
135   end
136   chip cpu/amd/model_gx1                # CPU
137   end
138 end