6dd45c9ca7d65b7481fcce358f3f40256180c609
[coreboot.git] / src / mainboard / emulation / qemu-x86 / Config.lb
1 ## we don't use CONFIG_USE_DCACHE_RAM by default
2 default CONFIG_USE_DCACHE_RAM=0
3 ##
4 ## Compute the location and size of where this firmware image
5 ## (coreboot plus bootloader) will live in the boot rom chip.
6 ##
7 default CONFIG_ROM_SIZE = 256 * 1024 
8 default CONFIG_ROM_SECTION_SIZE   = CONFIG_ROM_IMAGE_SIZE
9 default CONFIG_ROM_SECTION_OFFSET = CONFIG_ROM_SIZE - CONFIG_ROM_SECTION_SIZE
10
11 ##
12 ## Compute where this copy of coreboot will start in the boot rom
13 ##
14 default CONFIG_ROMBASE      = (0xffffffff - CONFIG_ROM_SIZE + CONFIG_ROM_SECTION_OFFSET + 1)
15
16 ##
17 ## Compute a range of ROM that can cached to speed up coreboot,
18 ## execution speed.
19 ##
20 ## CONFIG_XIP_ROM_SIZE must be a power of 2.
21 ## CONFIG_XIP_ROM_BASE must be a multiple of CONFIG_XIP_ROM_SIZE
22 ##
23 default CONFIG_XIP_ROM_SIZE=32*1024
24 default CONFIG_XIP_ROM_BASE = ( CONFIG_ROMBASE + CONFIG_ROM_IMAGE_SIZE - CONFIG_XIP_ROM_SIZE )
25
26 ##
27 ## Set all of the defaults for an x86 architecture
28 ##
29
30 arch i386 end
31
32 ##
33 ## Build the objects we have code for in this directory.
34 ##
35
36 driver mainboard.o
37 if CONFIG_GENERATE_PIRQ_TABLE object irq_tables.o end
38 #object reset.o
39
40
41 ## ALL dependencies for CONFIG_USE_DCACHE_RAM go here. 
42 ## That way, later, we can simply yank them if we wish. 
43 ## We include the old-fashioned entry code in the ! CONFIG_USE_DCACHE_RAM case. 
44 ## we do not use failover yet in this case. This is a work in progress. 
45 if CONFIG_USE_DCACHE_RAM
46         ##
47         ##
48         mainboardinit arch/i386/init/entry.S
49         mainboardinit arch/i386/init/car.S
50         ldscript  /arch/i386/init/ldscript.ld
51
52         ## The main code for the rom section is called rom.c
53         initobject rom.o
54 else
55         ##
56         ## Romcc output
57         ##
58         makerule ./failover.E
59                 depends "$(CONFIG_MAINBOARD)/failover.c ../romcc" 
60                 action "../romcc -E -O --label-prefix=failover -I$(TOP)/src -I. $(CPPFLAGS) $(CONFIG_MAINBOARD)/failover.c -o $@"
61         end
62         
63         makerule ./failover.inc
64                 depends "$(CONFIG_MAINBOARD)/failover.c ../romcc"
65                 action "../romcc    -O --label-prefix=failover -I$(TOP)/src -I. $(CPPFLAGS) $(CONFIG_MAINBOARD)/failover.c -o $@"
66         end
67         
68         makerule ./auto.E 
69                 depends "$(CONFIG_MAINBOARD)/auto.c option_table.h ../romcc" 
70                 action  "../romcc -E -mcpu=i386 -O -I$(TOP)/src -I. $(CPPFLAGS) $(CONFIG_MAINBOARD)/auto.c -o $@"
71         end
72         makerule ./auto.inc 
73                 depends "$(CONFIG_MAINBOARD)/auto.c option_table.h ../romcc"
74                 action  "../romcc    -mcpu=i386 -O -I$(TOP)/src -I. $(CPPFLAGS) $(CONFIG_MAINBOARD)/auto.c -o $@"
75         end
76         
77         ##
78         ## Build our 16 bit and 32 bit coreboot entry code
79         ##
80         mainboardinit cpu/x86/16bit/entry16.inc
81         mainboardinit cpu/x86/32bit/entry32.inc
82         ldscript /cpu/x86/16bit/entry16.lds
83         ldscript /cpu/x86/32bit/entry32.lds
84
85         ##
86         ## Build our reset vector (This is where coreboot is entered)
87         ##
88         mainboardinit cpu/x86/16bit/reset16.inc 
89         ldscript /cpu/x86/16bit/reset16.lds 
90         
91         ### Should this be in the northbridge code?
92         mainboardinit arch/i386/lib/cpu_reset.inc
93
94         ##
95         ## Setup RAM
96         ##
97         mainboardinit cpu/x86/fpu_enable.inc
98         mainboardinit ./auto.inc
99         
100         ## the id string will be in cbfs. We will expect flashrom to parse cbfs for the idstring in future. 
101         ##
102         ## Include an id string (For safe flashing)
103         ##
104         mainboardinit arch/i386/lib/id.inc
105         ldscript /arch/i386/lib/id.lds
106         
107 ##
108 ## end of CONFIG_USE_DCACHE_RAM bits. 
109 ##
110 end
111
112 ##
113 ## Include the secondary Configuration files 
114 ##
115 dir /pc80
116 config chip.h
117
118 chip cpu/emulation/qemu-x86
119         device pci_domain 0 on 
120                 device pci 0.0 on end
121
122                 chip southbridge/intel/i82371eb # southbridge
123                         device pci 01.0 on end
124                         device pci 01.1 on end
125                         register "ide0_enable" = "1"
126                         register "ide1_enable" = "1"
127                 end
128
129 #               register "com1" = "{1}"
130 #               register "com1" = "{1, 0, 0x3f8, 4}"
131         end
132 end