Add initial support for the ASI/BCom MB-5BLMP mainboard, as used in
[coreboot.git] / src / mainboard / asi / mb_5blmp / Config.lb
1 ##
2 ## Compute the location and size of where this firmware image
3 ## (linuxBIOS plus bootloader) will live in the boot rom chip.
4 ##
5 if USE_FALLBACK_IMAGE
6         default ROM_SECTION_SIZE   = FALLBACK_SIZE
7         default ROM_SECTION_OFFSET = ( ROM_SIZE - FALLBACK_SIZE )
8 else
9         default ROM_SECTION_SIZE   = ( ROM_SIZE - FALLBACK_SIZE )
10         default ROM_SECTION_OFFSET = 0
11 end
12
13 ##
14 ## Compute the start location and size size of
15 ## The linuxBIOS bootloader.
16 ##
17 default CONFIG_ROM_PAYLOAD_START = (0xffffffff - ROM_SIZE + ROM_SECTION_OFFSET + 1)
18 default PAYLOAD_SIZE            = ( ROM_SECTION_SIZE - ROM_IMAGE_SIZE )
19
20 ##
21 ## Compute where this copy of linuxBIOS will start in the boot rom
22 ##
23 default _ROMBASE      = ( CONFIG_ROM_PAYLOAD_START + PAYLOAD_SIZE )
24
25 ##
26 ## Compute a range of ROM that can cached to speed up linuxBIOS,
27 ## execution speed.
28 ##
29 ## XIP_ROM_SIZE must be a power of 2.
30 ## XIP_ROM_BASE must be a multiple of XIP_ROM_SIZE
31 ##
32 default XIP_ROM_SIZE=65536
33 default XIP_ROM_BASE = ( _ROMBASE + ROM_IMAGE_SIZE - XIP_ROM_SIZE )
34
35 ##
36 ## Set all of the defaults for an x86 architecture
37 ##
38
39 arch i386 end
40
41 ##
42 ## Build the objects we have code for in this directory.
43 ##
44
45 driver mainboard.o
46
47 if HAVE_PIRQ_TABLE
48         object irq_tables.o
49 end
50
51 ##
52 ## Romcc output
53 ##
54 # makerule ./failover.E
55 #       depends "$(MAINBOARD)/failover.c ./romcc" 
56 #       action "./romcc -E -O --label-prefix=failover -I$(TOP)/src -I. $(CPPFLAGS) $(MAINBOARD)/failover.c -o $@"
57 # end
58
59 # makerule ./failover.inc
60 #       depends "$(MAINBOARD)/failover.c ./romcc"
61 #       action "./romcc    -O --label-prefix=failover -I$(TOP)/src -I. $(CPPFLAGS) $(MAINBOARD)/failover.c -o $@"
62 # end
63
64 makerule ./auto.E 
65         depends "$(MAINBOARD)/auto.c ./romcc" 
66         action  "./romcc -E -mcpu=i386 -O -I$(TOP)/src -I. $(CPPFLAGS) $(MAINBOARD)/auto.c -o $@"
67 end
68 makerule ./auto.inc 
69         depends "$(MAINBOARD)/auto.c ./romcc"
70         action  "./romcc    -mcpu=i386 -O -I$(TOP)/src -I. $(CPPFLAGS) $(MAINBOARD)/auto.c -o $@"
71 end
72
73 ##
74 ## Build our 16 bit and 32 bit linuxBIOS entry code
75 ##
76 mainboardinit cpu/x86/16bit/entry16.inc
77 mainboardinit cpu/x86/32bit/entry32.inc
78 ldscript /cpu/x86/16bit/entry16.lds
79 ldscript /cpu/x86/32bit/entry32.lds
80
81 ##
82 ## Build our reset vector (This is where linuxBIOS is entered)
83 ##
84 if USE_FALLBACK_IMAGE 
85         mainboardinit cpu/x86/16bit/reset16.inc 
86         ldscript /cpu/x86/16bit/reset16.lds 
87 else
88         mainboardinit cpu/x86/32bit/reset32.inc 
89         ldscript /cpu/x86/32bit/reset32.lds 
90 end
91
92 ### Should this be in the northbridge code?
93 mainboardinit arch/i386/lib/cpu_reset.inc
94
95 ##
96 ## Include an id string (For safe flashing)
97 ##
98 mainboardinit arch/i386/lib/id.inc
99 ldscript /arch/i386/lib/id.lds
100
101 ###
102 ### This is the early phase of linuxBIOS startup 
103 ### Things are delicate and we test to see if we should
104 ### failover to another image.
105 ###
106 # if USE_FALLBACK_IMAGE
107 #       ldscript /arch/i386/lib/failover.lds 
108 #       mainboardinit ./failover.inc
109 # end
110
111 ###
112 ### O.k. We aren't just an intermediary anymore!
113 ###
114
115 ##
116 ## Setup RAM
117 ##
118 mainboardinit cpu/x86/fpu/enable_fpu.inc
119 mainboardinit cpu/amd/model_gx1/cpu_setup.inc
120 mainboardinit cpu/amd/model_gx1/gx_setup.inc
121 mainboardinit ./auto.inc
122
123 ##
124 ## Include the secondary Configuration files 
125 ##
126 dir /pc80
127 config chip.h
128
129 chip northbridge/amd/gx1                # Northbridge
130   device pci_domain 0 on
131     device pci 0.0 on end
132       chip southbridge/amd/cs5530       # Southbridge
133         device pci 12.0 on
134           chip superio/nsc/pc87351      # Super I/O
135             device pnp 2e.0 on          # PIC
136                io 0x60 = 0x20
137                io 0x62 = 0xa0
138                irq 0x70 = 2
139             end
140             device pnp 2e.1 on          # DMA
141             end
142             device pnp 2e.2 on          # System Timer
143                io 0x60 = 0x40
144                irq 0x70 = 0
145             end
146             device pnp 2e.3 on          # RTC
147                io 0x60 = 0x70
148                irq 0x70 = 8
149             end
150             device pnp 2e.4 on          # Keyboard + Mouse
151                io 0x60 = 0x60
152                io 0x62 = 0x64
153                irq 0x70 = 1
154                irq 0x72 = 12
155             end
156             device pnp 2e.5 on          # PC Speaker
157             end
158             device pnp 2e.6 on          # Math Coprocessor (FPU)
159                io 0x60 = 0xf0
160                irq 0x70 = 13
161             end
162             device pnp 2e.7 on          # System board
163             end
164             device pnp 2e.8 on          # Motherboard resources
165             end
166             device pnp 2e.9 on          # PCI bus
167             end
168             device pnp 2e.c on          # Motherboard resources
169             end
170             device pnp 2e.d on          # Motherboard resources
171             end
172             device pnp 2e.e on          # COM1
173                io 0x60 = 0x3f8
174                irq 0x70 = 4
175             end
176             device pnp 2e.f off         # FDC
177             end
178             device pnp 2e.10 on         # Parallel port
179                io 0x60 = 0x378
180                irq 0x70 = 7
181             end
182             device pnp 2e.12 on         # COM2
183                io 0x60 = 0x2f8
184                irq 0x70 = 3
185             end
186           end
187         device pci 12.1 off end         # SMI
188         device pci 12.2 on  end         # IDE
189         device pci 12.3 off end         # Audio
190         device pci 12.4 off end         # Video (VGA)
191       end
192       # device pci 12.4 on              # VGA (onboard)
193       #   chip drivers/pci/onboard
194       #     device pci 12.4 on end
195       #     register "rom_address" = "0xfffc0000" # 256 KB image
196       #     # register "rom_address" = "0xfff80000" # 512 KB image
197       #     # register "rom_address" = "0xfff00000" # 1 MB image
198       #   end
199       # end
200       device pci 0f.0 off end           # Ethernet (Realtek RTL8139B)
201       device pci 13.0 on end            # USB
202     end
203   end
204
205   chip cpu/amd/model_gx1                # CPU
206   end
207
208 end
209