This patch cleans up the calls to $CC in mainboard Config.lb files. They
[coreboot.git] / src / mainboard / digitallogic / msm800sev / Config.lb
1 ##
2 ## Compute the location and size of where this firmware image
3 ## (coreboot 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 coreboot 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 coreboot 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 coreboot,
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         #compile cache_as_ram.c to auto.inc
52         makerule ./cache_as_ram_auto.inc
53                         depends "$(MAINBOARD)/cache_as_ram_auto.c option_table.h"
54                         action "$(CC) $(DISTRO_CFLAGS) $(CFLAGS) $(CPPFLAGS) $(DEBUG_CFLAGS) -I$(TOP)/src -I. -nostdinc -nostdlib -fno-builtin -Wall -Os -c -S $(MAINBOARD)/cache_as_ram_auto.c -o $@"
55                         action "perl -e 's/\.rodata/.rom.data/g' -pi $@"
56                         action "perl -e 's/\.text/.section .rom.text/g' -pi $@"
57         end
58
59 ##
60 ## Build our 16 bit and 32 bit coreboot entry code
61 ##
62 mainboardinit cpu/x86/16bit/entry16.inc
63 mainboardinit cpu/x86/32bit/entry32.inc
64 ldscript /cpu/x86/16bit/entry16.lds
65 ldscript /cpu/x86/32bit/entry32.lds
66
67 ##
68 ## Build our reset vector (This is where coreboot is entered)
69 ##
70 if USE_FALLBACK_IMAGE 
71         mainboardinit cpu/x86/16bit/reset16.inc 
72         ldscript /cpu/x86/16bit/reset16.lds 
73 else
74         mainboardinit cpu/x86/32bit/reset32.inc 
75         ldscript /cpu/x86/32bit/reset32.lds 
76 end
77
78 ### Should this be in the northbridge code?
79 mainboardinit arch/i386/lib/cpu_reset.inc
80
81 ##
82 ## Include an id string (For safe flashing)
83 ##
84 mainboardinit arch/i386/lib/id.inc
85 ldscript /arch/i386/lib/id.lds
86
87 ###
88 ### This is the early phase of coreboot startup 
89 ### Things are delicate and we test to see if we should
90 ### failover to another image.
91 ###
92 if USE_FALLBACK_IMAGE
93         ldscript /arch/i386/lib/failover.lds 
94 #       mainboardinit ./failover.inc
95 end
96
97 ###
98 ### O.k. We aren't just an intermediary anymore!
99 ###
100
101 ##
102 ## Setup RAM
103 ##
104 mainboardinit cpu/x86/fpu/enable_fpu.inc
105
106         mainboardinit cpu/amd/model_lx/cache_as_ram.inc
107         mainboardinit ./cache_as_ram_auto.inc
108
109 ##
110 ## Include the secondary Configuration files 
111 ##
112 dir /pc80
113 config chip.h
114
115 chip northbridge/amd/lx
116         device pci_domain 0 on 
117                 device pci 1.0 on end
118                 device pci 1.1 on end
119                 chip southbridge/amd/cs5536
120                         # IRQ 12 and 1 unmasked,  Keyboard and Mouse IRQs. OK
121                         # SIRQ Mode = Active(Quiet) mode. Save power....
122                         # Invert mask = IRQ 12 and 1 are active high. Keyboard and Mouse IRQs. OK
123                         # How to get these? Boot linux and do this:
124                         # rdmsr 0x51400025
125                         register "lpc_serirq_enable" = "0x0000105a"
126                         # rdmsr 0x5140004e -- polairy is high 16 bits of low 32 bits
127                         register "lpc_serirq_polarity" = "0x0000EFA5"
128                         # mode is high 10 bits (determined from code)
129                         register "lpc_serirq_mode" = "1"
130                         # Don't yet know how to find this.
131                         register "enable_gpio_int_route" = "0x0D0C0700"
132                         register "enable_ide_nand_flash" = "0" # 0:ide mode, 1:flash
133                         register "enable_USBP4_device" = "0"    #0: host, 1:device
134                         register "enable_USBP4_overcurrent" = "0" #0:off, xxxx:overcurrent setting CS5536 Data Book (pages 380-381)
135                         register "com1_enable" = "0"
136                         register "com1_address" = "0x3F8"
137                         register "com1_irq" = "4"
138                         register "com2_enable" = "0"
139                         register "com2_address" = "0x2F8"
140                         register "com2_irq" = "3"
141                         register "unwanted_vpci[0]" = "0"       # End of list has a zero
142                                 device pci f.0 on       # ISA Bridge
143                                 chip superio/winbond/w83627hf
144                                         device pnp 2e.0 off #  Floppy
145                                                 io 0x60 = 0x3f0
146                                                 irq 0x70 = 6
147                                                 drq 0x74 = 2
148                                         end
149                                         device pnp 2e.1 off #  Parallel Port
150                                                 io 0x60 = 0x378
151                                                 irq 0x70 = 7
152                                         end
153                                         device pnp 2e.2 on #  Com1
154                                                 io 0x60 = 0x3f8
155                                                 irq 0x70 = 4
156                                         end
157                                         device pnp 2e.3 on #  Com2
158                                                 io 0x60 = 0x2f8
159                                                 irq 0x70 = 3
160                                         end
161                                         device pnp 2e.5 on #  Keyboard
162                                                 io 0x60 = 0x60
163                                                 io 0x62 = 0x64
164                                                 irq 0x70 = 1
165                                                 irq 0x72 = 12
166                                         end
167                                         device pnp 2e.6 off #  CIR
168                                                 io 0x60 = 0x100
169                                         end
170                                         device pnp 2e.7 off #  GAME_MIDI_GIPO1
171                                                 io 0x60 = 0x220
172                                                 io 0x62 = 0x300
173                                                 irq 0x70 = 9
174                                         end                                             
175                                         device pnp 2e.8 off end #  GPIO2
176                                         device pnp 2e.9 off end #  GPIO3
177                                         device pnp 2e.a off end #  ACPI
178                                         device pnp 2e.b on #  HW Monitor
179                                                 io 0x60 = 0x290
180                                                 irq 0x70 = 5
181                                         end
182                                 end
183                         end
184                         device pci f.1 on end   # Flash controller
185                         device pci f.2 on end   # IDE controller
186                                 device pci f.3 on end   # Audio
187                                 device pci f.4 on end   # OHCI
188                         device pci f.5 on end   # EHCI
189                 end
190         end
191
192         # APIC cluster is late CPU init.
193         device apic_cluster 0 on
194                 chip cpu/amd/model_lx
195                         device apic 0 on end
196                 end
197         end
198
199 end
200