f5fb2f73a054b92d9922b14ffb53d63e524fe347
[coreboot.git] / src / mainboard / newisys / khepri / Config.lb
1 ## XIP_ROM_SIZE must be a power of 2.
2 default XIP_ROM_SIZE = 64 * 1024
3 include /config/nofailovercalculation.lb
4
5 ##
6 ## Set all of the defaults for an x86 architecture
7 ##
8
9 arch i386 end
10
11 ##
12 ## Build the objects we have code for in this directory.
13 ##
14
15 driver mainboard.o
16 if HAVE_MP_TABLE object mptable.o end
17 if HAVE_PIRQ_TABLE object irq_tables.o end
18 #object reset.o
19
20 if CONFIG_USE_INIT
21
22 makerule ./auto.o
23         depends "$(MAINBOARD)/cache_as_ram_auto.c option_table.h"
24         action "$(CC) $(DISTRO_CFLAGS) $(CFLAGS) $(CPPFLAGS) -I$(TOP)/src -I. -c $(MAINBOARD)/cache_as_ram_auto.c -o $@"
25 end
26
27 else    
28                 
29 makerule ./auto.inc
30         depends "$(MAINBOARD)/cache_as_ram_auto.c option_table.h"
31         action "$(CC) $(DISTRO_CFLAGS) $(CFLAGS) $(CPPFLAGS) $(DEBUG_CFLAGS) -I$(TOP)/src -I. -c -S $(MAINBOARD)/cache_as_ram_auto.c -o $@"
32         action "perl -e 's/\.rodata/.rom.data/g' -pi $@"
33         action "perl -e 's/\.text/.section .rom.text/g' -pi $@"
34 end
35
36 end
37
38 ##
39 ## Build our 16 bit and 32 bit coreboot entry code
40 ##
41 if USE_FALLBACK_IMAGE
42         mainboardinit cpu/x86/16bit/entry16.inc
43         ldscript /cpu/x86/16bit/entry16.lds
44 end
45
46 mainboardinit cpu/x86/32bit/entry32.inc
47
48         if CONFIG_USE_INIT
49                 ldscript /cpu/x86/32bit/entry32.lds
50         end
51
52         if CONFIG_USE_INIT
53                 ldscript      /cpu/amd/car/cache_as_ram.lds
54         end
55
56 ##
57 ## Build our reset vector (This is where coreboot is entered)
58 ##
59 if USE_FALLBACK_IMAGE 
60         mainboardinit cpu/x86/16bit/reset16.inc 
61         ldscript /cpu/x86/16bit/reset16.lds 
62 else
63         mainboardinit cpu/x86/32bit/reset32.inc 
64         ldscript /cpu/x86/32bit/reset32.lds 
65 end
66
67 ##
68 ## Include an id string (For safe flashing)
69 ##
70 mainboardinit arch/i386/lib/id.inc
71 ldscript /arch/i386/lib/id.lds
72
73 ##
74 ## Setup Cache-As-Ram
75 ##
76 mainboardinit cpu/amd/car/cache_as_ram.inc
77
78 ###
79 ### This is the early phase of coreboot startup 
80 ### Things are delicate and we test to see if we should
81 ### failover to another image.
82 ###
83 if USE_FALLBACK_IMAGE
84         ldscript /arch/i386/lib/failover.lds
85 end
86
87 ###
88 ### O.k. We aren't just an intermediary anymore!
89 ###
90
91 ##
92 ## Setup RAM
93 ##
94 if CONFIG_USE_INIT
95 initobject auto.o
96 else
97 mainboardinit ./auto.inc
98 end
99
100 config chip.h
101
102 # FIXME: ROM for onboard VGA
103
104 chip northbridge/amd/amdk8/root_complex
105         device apic_cluster 0 on
106                 chip cpu/amd/socket_940
107                         device apic 0 on end
108                 end
109                 chip cpu/amd/socket_940
110                         device apic 1 on end
111                 end
112         end
113
114         device pci_domain 0 on
115                 chip northbridge/amd/amdk8
116                         device pci 18.0 on end # LDT 0 
117                         device pci 18.0 on     # LDT 1
118                                 chip southbridge/amd/amd8131
119                                         device pci 0.0 on end
120                                         device pci 0.1 on end
121                                         device pci 1.0 on end
122                                         device pci 1.1 on end
123                                 end
124                                 chip southbridge/amd/amd8111
125                                         device pci 0.0 on
126                                                 device pci 0.0 on end
127                                                 device pci 0.1 on end
128                                                 device pci 0.2 on end
129                                                 device pci 1.0 on end
130                                         end
131                                         device pci 1.0 on
132                                                 chip superio/winbond/w83627hf
133                                                         device pnp 2e.0 on #  Floppy
134                                                                 io 0x60 = 0x3f0
135                                                                 irq 0x70 = 6
136                                                                 drq 0x74 = 2
137                                                         end
138                                                         device pnp 2e.1 off #  Parallel Port
139                                                                 io 0x60 = 0x378
140                                                                 irq 0x70 = 7
141                                                         end
142                                                         device pnp 2e.2 on #  Com1
143                                                                 io 0x60 = 0x3f8
144                                                                 irq 0x70 = 4
145                                                         end
146                                                         device pnp 2e.3 on #  Com2
147                                                                 io 0x60 = 0x2f8
148                                                                 irq 0x70 = 3
149                                                         end
150                                                         device pnp 2e.5 on #  Keyboard
151                                                                 io 0x60 = 0x60
152                                                                 io 0x62 = 0x64
153                                                                 irq 0x70 = 1
154                                                                 irq 0x72 = 12
155                                                         end
156                                                         device pnp 2e.6 off #  CIR
157                                                                 io 0x60 = 0x100
158                                                         end
159                                                         device pnp 2e.7 off #  GAME_MIDI_GIPO1
160                                                                 io 0x60 = 0x220
161                                                                 io 0x62 = 0x300
162                                                                 irq 0x70 = 9
163                                                         end                                             
164                                                         device pnp 2e.8 off end #  GPIO2
165                                                         device pnp 2e.9 off end #  GPIO3
166                                                         device pnp 2e.a off end #  ACPI
167                                                         device pnp 2e.b on #  HW Monitor
168                                                                 io 0x60 = 0x290
169                                                                 irq 0x70 = 5
170                                                         end
171                                                 end
172                                         end
173                                         device pci 1.1 on end
174                                         device pci 1.2 on end
175                                         device pci 1.3 on end 
176                                         device pci 1.5 on end
177                                         device pci 1.6 on end
178                                 end
179                         end # LDT1
180                         device pci 18.0 on end # LDT2
181                         device pci 18.1 on end
182                         device pci 18.2 on end
183                         device pci 18.3 on end
184                 end
185                 chip northbridge/amd/amdk8
186                         device pci 19.0 on end
187                         device pci 19.0 on end
188                         device pci 19.0 on end
189                         device pci 19.1 on end
190                         device pci 19.2 on end
191                         device pci 19.3 on end
192                 end
193         end 
194 end
195