blob: b5e52e6ecfe4a469f4b8fec52c587f8b4a1b4047 [file] [log] [blame]
Patrick Georgi11f00792020-03-04 15:10:45 +01001## SPDX-License-Identifier: GPL-2.0-only
Stefan Reinauer425b61e2015-03-15 04:29:35 +01002
Stefan Reinauera48ca842015-04-04 01:58:28 +02003config ARCH_X86
4 bool
Stefan Reinauera48ca842015-04-04 01:58:28 +02005 select PCI
Kyösti Mälkkiec151f02018-06-03 22:48:51 +03006 select RELOCATABLE_MODULES
Harshit Sharma65bec1c2020-08-05 22:25:27 -07007 select HAVE_ASAN_IN_RAMSTAGE
Stefan Reinauera48ca842015-04-04 01:58:28 +02008
Stefan Reinauer68671202015-03-15 04:34:03 +01009# stage selectors for x86
10
Furquan Shaikh99ac98f2014-04-23 10:18:48 -070011config ARCH_BOOTBLOCK_X86_32
Gabe Black5fbfc912013-07-07 13:52:37 -070012 bool
Furquan Shaikh99ac98f2014-04-23 10:18:48 -070013 select ARCH_X86
14
Stefan Reinauer77b16552015-01-14 19:51:47 +010015config ARCH_VERSTAGE_X86_32
16 bool
Arthur Heymansb86e96a2019-02-10 17:00:56 +010017 select ARCH_X86
Stefan Reinauer77b16552015-01-14 19:51:47 +010018
Furquan Shaikh99ac98f2014-04-23 10:18:48 -070019config ARCH_ROMSTAGE_X86_32
20 bool
Arthur Heymansb86e96a2019-02-10 17:00:56 +010021 select ARCH_X86
Furquan Shaikh99ac98f2014-04-23 10:18:48 -070022
Patrick Georgi29eeece2018-10-31 14:24:47 +010023config ARCH_POSTCAR_X86_32
24 bool
25 default ARCH_ROMSTAGE_X86_32 && POSTCAR_STAGE
26
Furquan Shaikh99ac98f2014-04-23 10:18:48 -070027config ARCH_RAMSTAGE_X86_32
28 bool
Arthur Heymansb86e96a2019-02-10 17:00:56 +010029 select ARCH_X86
Gabe Black5fbfc912013-07-07 13:52:37 -070030
Angel Ponsa32df262020-09-25 10:20:11 +020031config ARCH_ALL_STAGES_X86_32
32 bool
33 select ARCH_BOOTBLOCK_X86_32
34 select ARCH_VERSTAGE_X86_32
35 select ARCH_ROMSTAGE_X86_32
36 select ARCH_RAMSTAGE_X86_32
37
Stefan Reinauer68671202015-03-15 04:34:03 +010038# stage selectors for x64
39
40config ARCH_BOOTBLOCK_X86_64
41 bool
Stefan Reinauer68671202015-03-15 04:34:03 +010042 select ARCH_X86
43
44config ARCH_VERSTAGE_X86_64
45 bool
Arthur Heymansb86e96a2019-02-10 17:00:56 +010046 select ARCH_X86
Stefan Reinauer68671202015-03-15 04:34:03 +010047
48config ARCH_ROMSTAGE_X86_64
49 bool
Arthur Heymansb86e96a2019-02-10 17:00:56 +010050 select ARCH_X86
Stefan Reinauer68671202015-03-15 04:34:03 +010051
Patrick Georgi29eeece2018-10-31 14:24:47 +010052config ARCH_POSTCAR_X86_64
53 bool
54 default ARCH_ROMSTAGE_X86_64 && POSTCAR_STAGE
55
Stefan Reinauer68671202015-03-15 04:34:03 +010056config ARCH_RAMSTAGE_X86_64
57 bool
Arthur Heymansb86e96a2019-02-10 17:00:56 +010058 select ARCH_X86
59
Angel Pons2db779072020-09-25 10:14:45 +020060config ARCH_ALL_STAGES_X86_64
61 bool
62 select ARCH_BOOTBLOCK_X86_64
63 select ARCH_VERSTAGE_X86_64
64 select ARCH_ROMSTAGE_X86_64
65 select ARCH_RAMSTAGE_X86_64
66
Arthur Heymansb86e96a2019-02-10 17:00:56 +010067if ARCH_X86
Stefan Reinauer68671202015-03-15 04:34:03 +010068
Patrick Rudolphb1ef7252019-09-28 17:44:01 +020069config ARCH_X86_64_PGTBL_LOC
70 hex "x86_64 page table location in CBFS"
71 depends on ARCH_BOOTBLOCK_X86_64
Patrick Rudolph19a60a42019-11-30 09:40:52 +010072 default 0xfffe9000
Patrick Rudolphb1ef7252019-09-28 17:44:01 +020073 help
74 The position where to place pagetables. Needs to be known at
75 compile time. Must not overlap other files in CBFS.
76
Martin Roth0cd9ff82016-02-01 17:33:37 -070077config USE_MARCH_586
78 def_bool n
79 help
80 Allow a platform or processor to select to be compiled using
81 the '-march=i586' option instead of the typical '-march=i686'
82
Uwe Hermann168b11b2009-10-07 16:15:40 +000083# This is an SMP option. It relates to starting up APs.
84# It is usually set in mainboard/*/Kconfig.
85# TODO: Improve description.
Sven Schnelle51676b12012-07-29 19:18:03 +020086config AP_IN_SIPI_WAIT
87 bool
88 default n
Stefan Reinauer2a6f3902012-10-15 13:38:09 -070089 depends on ARCH_X86 && SMP
Ronald G. Minnich6ed39d92009-08-29 02:59:35 +000090
Martin Roth8418fd42019-04-22 16:26:23 -060091config RESET_VECTOR_IN_RAM
92 bool
93 depends on ARCH_X86
Felix Heldca928c62020-04-04 01:47:37 +020094 select NO_XIP_EARLY_STAGES
Martin Roth8418fd42019-04-22 16:26:23 -060095 help
Felix Heldca928c62020-04-04 01:47:37 +020096 Select this option if the x86 processor's reset vector is in
97 preinitialized DRAM instead of the traditional 0xfffffff0 location.
Martin Roth8418fd42019-04-22 16:26:23 -060098
Kyösti Mälkkif8c7c232012-04-06 04:03:50 +030099# Aligns 16bit entry code in bootblock so that hyper-threading CPUs
100# can boot AP CPUs to enable their shared caches.
101config SIPI_VECTOR_IN_ROM
102 bool
103 default n
104 depends on ARCH_X86
105
Ronald G. Minnich83bd46e2018-09-16 09:59:54 -0700106# Set the rambase for systems that still need it, only 5 chipsets as of
107# Sep 2018. This value was 0x100000, chosen to match the entry point
108# of Linux 2.2 in 1999. The new value, 14 MiB, makes a lot more sense
109# for as long as we need it; with luck, that won't be much longer.
110# In the long term, both RAMBASE and RAMTOP should be removed.
111# This value leaves more than 1 MiB which is required for fam10
112# and broadwell_de.
Patrick Georgi0588d192009-08-12 15:00:51 +0000113config RAMBASE
114 hex
Ronald G. Minnich83bd46e2018-09-16 09:59:54 -0700115 default 0xe00000
Patrick Georgi0588d192009-08-12 15:00:51 +0000116
Kyösti Mälkkibec853e2016-06-15 02:25:00 +0300117config RAMTOP
118 hex
Ronald G. Minnich83bd46e2018-09-16 09:59:54 -0700119 default 0x1000000
Kyösti Mälkkibec853e2016-06-15 02:25:00 +0300120 depends on ARCH_X86
121
Alexandru Gagniuc6a622312015-10-27 10:27:30 -0700122# Traditionally BIOS region on SPI flash boot media was memory mapped right below
123# 4G and it was the last region in the IFD. This way translation between CPU
124# address space to flash address was trivial. However some IFDs on newer SoCs
125# have BIOS region sandwiched between descriptor and other regions. Turning off
126# this option enables soc code to provide custom mmap_boot.c which can be used to
127# implement complex translation.
128config X86_TOP4G_BOOTMEDIA_MAP
129 bool
130 default y
131
Ronald G. Minnichb5e777c2013-07-22 20:17:18 +0200132# This is something you almost certainly don't want to mess with.
133# How many SIPIs do we send when starting up APs and cores?
134# The answer in 2000 or so was '2'. Nowadays, on many systems,
135# it is 1. Set a safe default here, and you can override it
136# on reasonable platforms.
137config NUM_IPI_STARTS
138 int
139 default 2
140
Naresh G Solanki04bb4802016-12-13 21:16:46 +0530141config PRERAM_CBMEM_CONSOLE_SIZE
142 hex
143 default 0xc00
144 help
145 Increase this value if preram cbmem console is getting truncated
146
Stefan Reinauer8aedcbc2010-12-16 23:37:17 +0000147config PC80_SYSTEM
148 bool
Furquan Shaikh99ac98f2014-04-23 10:18:48 -0700149 default y if ARCH_X86
Stefan Reinauer8aedcbc2010-12-16 23:37:17 +0000150
Lee Leahyfdc8c8b2016-06-07 08:45:17 -0700151config BOOTBLOCK_DEBUG_SPINLOOP
152 bool
153 default n
154 help
155 Add a spin (JMP .) in bootblock_crt0.S during early bootblock to wait
156 for a JTAG debugger to break into the execution sequence.
157
Patrick Georgia865b172011-01-14 07:40:24 +0000158config HAVE_CMOS_DEFAULT
159 def_bool n
Martin Rothf76303e2016-11-16 15:45:22 -0700160 depends on HAVE_OPTION_TABLE
Patrick Georgia865b172011-01-14 07:40:24 +0000161
162config CMOS_DEFAULT_FILE
163 string
Patrick Georgib8fba862020-06-17 21:06:53 +0200164 default "src/mainboard/\$(MAINBOARDDIR)/cmos.default"
Patrick Georgia865b172011-01-14 07:40:24 +0000165 depends on HAVE_CMOS_DEFAULT
166
Patrick Georgid4d5e4d2012-03-16 19:28:15 +0100167config IOAPIC_INTERRUPTS_ON_FSB
168 bool
169 default y if !IOAPIC_INTERRUPTS_ON_APIC_SERIAL_BUS
170
171config IOAPIC_INTERRUPTS_ON_APIC_SERIAL_BUS
172 bool
173 default n
174
Kyösti Mälkkib433d262018-05-24 09:56:11 +0300175config HPET_ADDRESS_OVERRIDE
176 def_bool n
177
Patrick Georgi9aeb6942012-10-05 21:54:38 +0200178config HPET_ADDRESS
179 hex
180 default 0xfed00000 if !HPET_ADDRESS_OVERRIDE
181
Stefan Reinauer84833442012-11-13 15:04:12 -0800182config ID_SECTION_OFFSET
183 hex
184 default 0x80
Patrick Georgic32a52c2015-06-22 21:10:34 +0200185
Arthur Heymansc05b1a62019-11-22 21:01:30 +0100186# 64KiB default bootblock size
Aaron Durbin65ac3d82016-02-11 14:36:19 -0600187config C_ENV_BOOTBLOCK_SIZE
188 hex
189 default 0x10000
Andrey Petrovccd300b2016-02-28 22:04:51 -0800190
191# Default address romstage is to be linked at
192config ROMSTAGE_ADDR
193 hex
194 default 0x2000000
195
196# Default address verstage is to be linked at
197config VERSTAGE_ADDR
198 hex
199 default 0x2000000
Aaron Durbin7f8afe02016-03-18 12:21:23 -0500200
201# Use the post CAR infrastructure for tearing down cache-as-ram
Elyes HAOUAS777ea892016-07-29 07:40:41 +0200202# from a program loaded in RAM and subsequently loading ramstage.
Aaron Durbin7f8afe02016-03-18 12:21:23 -0500203config POSTCAR_STAGE
Kyösti Mälkki0f5e01a2019-08-09 07:11:07 +0300204 def_bool y
205 depends on ARCH_X86
Felix Heldca928c62020-04-04 01:47:37 +0200206 depends on !RESET_VECTOR_IN_RAM
Lee Leahyd131ea32016-06-08 13:40:08 -0700207
208config VERSTAGE_DEBUG_SPINLOOP
209 bool
210 default n
211 help
212 Add a spin (JMP .) in assembly_entry.S during early verstage to wait
213 for a JTAG debugger to break into the execution sequence.
214
215config ROMSTAGE_DEBUG_SPINLOOP
216 bool
217 default n
218 help
219 Add a spin (JMP .) in assembly_entry.S during early romstage to wait
220 for a JTAG debugger to break into the execution sequence.
Martin Roth408fda72016-12-15 16:04:55 -0700221
222choice
223 prompt "Bootblock behaviour"
224 default BOOTBLOCK_SIMPLE
Kyösti Mälkkib8d575c2019-12-16 16:00:49 +0200225 depends on !VBOOT
Martin Roth408fda72016-12-15 16:04:55 -0700226
227config BOOTBLOCK_SIMPLE
228 bool "Always load fallback"
229
230config BOOTBLOCK_NORMAL
Arthur Heymans6f751542019-06-08 11:28:52 +0200231 select CONFIGURABLE_CBFS_PREFIX
Martin Roth408fda72016-12-15 16:04:55 -0700232 bool "Switch to normal if CMOS says so"
233
234endchoice
235
Martin Roth408fda72016-12-15 16:04:55 -0700236config SKIP_MAX_REBOOT_CNT_CLEAR
237 bool "Do not clear reboot count after successful boot"
238 depends on BOOTBLOCK_NORMAL
239 help
240 Do not clear the reboot count immediately after successful boot.
241 Set to allow the payload to control normal/fallback image recovery.
242 Note that it is the responsibility of the payload to reset the
Paul Menzelb9499022019-01-08 16:21:31 +0100243 normal boot bit to 1 after each successful boot.
Marc Jones7a2d4ea2017-08-25 18:54:23 -0600244
Furquan Shaikhbf4b7b02020-04-30 18:08:16 -0700245config ACPI_BERT
Nico Huber9df72e02018-11-24 18:25:50 +0100246 bool
Marc Jones7a2d4ea2017-08-25 18:54:23 -0600247 depends on HAVE_ACPI_TABLES
248 help
Furquan Shaikhbf4b7b02020-04-30 18:08:16 -0700249 Build an ACPI Boot Error Record Table.
Aaron Durbinf49ddb62018-01-24 17:35:58 -0700250
251config COLLECT_TIMESTAMPS_NO_TSC
252 bool
253 default n
254 depends on COLLECT_TIMESTAMPS
255 help
256 Use a non-TSC platform-dependent source for timestamps.
257
258config COLLECT_TIMESTAMPS_TSC
259 bool
260 default y if !COLLECT_TIMESTAMPS_NO_TSC
261 default n
262 depends on COLLECT_TIMESTAMPS
263 help
264 Use the TSC as the timestamp source.
Aaron Durbin0f35af8f2018-04-18 01:00:27 -0600265
266config PAGING_IN_CACHE_AS_RAM
267 bool
268 default n
269 depends on ARCH_X86
270 help
271 Chipsets scan select this option to preallocate area in cache-as-ram
272 for storing paging data structures. PAE paging is currently the
273 only thing being supported.
274
275config NUM_CAR_PAGE_TABLE_PAGES
276 int
277 default 5
278 depends on PAGING_IN_CACHE_AS_RAM
279 help
280 The number of 4KiB pages that should be pre-allocated for page tables.
Aaron Durbin4b032e42018-04-20 01:39:30 -0600281
282# Provide the interrupt handlers to every stage. Not all
283# stages may take advantage.
284config IDT_IN_EVERY_STAGE
285 bool
286 default n
287 depends on ARCH_X86
Nico Huber33fcaf92018-10-10 22:44:20 +0200288
289config HAVE_CF9_RESET
290 bool
291
292config HAVE_CF9_RESET_PREPARE
293 bool
294 depends on HAVE_CF9_RESET
Kyösti Mälkkib72b5d92019-07-04 21:08:17 +0300295
296config PIRQ_ROUTE
297 bool
298 default n
299
300config MAX_PIRQ_LINKS
301 int
302 default 4
303 depends on PIRQ_ROUTE
304 help
305 This variable specifies the number of PIRQ interrupt links which are
306 routable. On most chipsets, this is 4, INTA through INTD. Some
307 chipsets offer more than four links, commonly up to INTH. They may
308 also have a separate link for ATA or IOAPIC interrupts. When the PIRQ
309 table specifies links greater than 4, pirq_route_irqs will not
310 function properly, unless this variable is correctly set.
Arthur Heymansb86e96a2019-02-10 17:00:56 +0100311
Duncan Laurief02bf352020-03-17 18:32:54 -0700312config MAX_ACPI_TABLE_SIZE_KB
313 int
314 default 144
315 help
316 Set the maximum size of all ACPI tables in KiB.
317
Furquan Shaikh46514c22020-06-11 11:59:07 -0700318config MEMLAYOUT_LD_FILE
319 string
320 default "src/arch/x86/memlayout.ld"
321
Arthur Heymansb86e96a2019-02-10 17:00:56 +0100322endif