Artec Group dbe61 mainboard support.
[coreboot.git] / src / mainboard / artecgroup / dbe61 / 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 object irq_tables.o end
48 #object reset.o
49
50
51 if USE_DCACHE_RAM
52         #compile cache_as_ram.c to auto.inc
53         makerule ./cache_as_ram_auto.inc
54                         depends "$(MAINBOARD)/cache_as_ram_auto.c option_table.h"
55                         action "$(CC) -I$(TOP)/src -I. $(CPPFLAGS) $(MAINBOARD)/cache_as_ram_auto.c -Os -nostdinc -nostdlib -fno-builtin -Wall -c -S -o $@"
56                         action "perl -e 's/.rodata/.rom.data/g' -pi $@"
57                         action "perl -e 's/.text/.section .rom.text/g' -pi $@"
58         end
59 end
60
61
62 ##
63 ## Build our 16 bit and 32 bit linuxBIOS entry code
64 ##
65 mainboardinit cpu/x86/16bit/entry16.inc
66 mainboardinit cpu/x86/32bit/entry32.inc
67 ldscript /cpu/x86/16bit/entry16.lds
68 ldscript /cpu/x86/32bit/entry32.lds
69
70 ##
71 ## Build our reset vector (This is where linuxBIOS is entered)
72 ##
73 if USE_FALLBACK_IMAGE 
74         mainboardinit cpu/x86/16bit/reset16.inc 
75         ldscript /cpu/x86/16bit/reset16.lds 
76 else
77         mainboardinit cpu/x86/32bit/reset32.inc 
78         ldscript /cpu/x86/32bit/reset32.lds 
79 end
80
81 ### Should this be in the northbridge code?
82 mainboardinit arch/i386/lib/cpu_reset.inc
83
84 ##
85 ## Include an id string (For safe flashing)
86 ##
87 mainboardinit arch/i386/lib/id.inc
88 ldscript /arch/i386/lib/id.lds
89
90 ###
91 ### This is the early phase of linuxBIOS startup 
92 ### Things are delicate and we test to see if we should
93 ### failover to another image.
94 ###
95 if USE_FALLBACK_IMAGE
96         ldscript /arch/i386/lib/failover.lds 
97 #       mainboardinit ./failover.inc
98 end
99
100 ###
101 ### O.k. We aren't just an intermediary anymore!
102 ###
103
104 ##
105 ## Setup RAM
106 ##
107 mainboardinit cpu/x86/fpu/enable_fpu.inc
108
109 if USE_DCACHE_RAM
110         mainboardinit cpu/amd/model_lx/cache_as_ram.inc
111         mainboardinit ./cache_as_ram_auto.inc
112 end
113
114 ##
115 ## Include the secondary Configuration files 
116 ##
117 dir /pc80
118 config chip.h
119
120 chip northbridge/amd/lx
121         device pci_domain 0 on
122                 device pci 1.0 on end   # Northbridge
123                 device pci 1.1 on end   # Graphics
124                 chip southbridge/amd/cs5536
125                         # IRQ 12 and 1 unmasked,  Keyboard and Mouse IRQs. OK
126                         # SIRQ Mode = Active(Quiet) mode. Save power....
127                         # Invert mask = IRQ 12 and 1 are active high. Keyboard and Mouse IRQs. OK
128                         register "lpc_serirq_enable" = "0x00001002"
129                         register "lpc_serirq_polarity" = "0x0000EFFD"
130                         register "lpc_serirq_mode" = "1"
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" = "0x2F8"
137                         register "com1_irq" = "3"
138                         register "com2_enable" = "1"
139                         register "com2_address" = "0x3F8"
140                         register "com2_irq" = "4"
141                         register "unwanted_vpci[0]" = "0"       # End of list has a zero
142                         device pci b.0 on end   # Slot 3
143                         device pci c.0 on end   # Slot 4
144                         device pci d.0 on end   # Slot 1
145                         device pci e.0 on end   # Slot 2
146                         device pci f.0 on end   # ISA Bridge
147                         device pci f.2 on end   # IDE Controller
148                         device pci f.3 on end   # Audio
149                         device pci f.4 on end   # OHCI
150                         device pci f.5 on end   # EHCI
151                 end
152         end
153         # APIC cluster is late CPU init.
154         device apic_cluster 0 on
155                 chip cpu/amd/model_lx
156                         device apic 0 on end
157                 end
158         end
159
160 end
161