blob: c00eb0c3b52b46600409c5c1594d62d4eb00183b [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
Angel Pons8e035e32021-06-22 12:58:20 +02009if ARCH_X86
10
Stefan Reinauer68671202015-03-15 04:34:03 +010011# stage selectors for x86
12
Furquan Shaikh99ac98f2014-04-23 10:18:48 -070013config ARCH_BOOTBLOCK_X86_32
Gabe Black5fbfc912013-07-07 13:52:37 -070014 bool
Furquan Shaikh99ac98f2014-04-23 10:18:48 -070015
Stefan Reinauer77b16552015-01-14 19:51:47 +010016config ARCH_VERSTAGE_X86_32
17 bool
Stefan Reinauer77b16552015-01-14 19:51:47 +010018
Furquan Shaikh99ac98f2014-04-23 10:18:48 -070019config ARCH_ROMSTAGE_X86_32
20 bool
Furquan Shaikh99ac98f2014-04-23 10:18:48 -070021
Patrick Georgi29eeece2018-10-31 14:24:47 +010022config ARCH_POSTCAR_X86_32
23 bool
24 default ARCH_ROMSTAGE_X86_32 && POSTCAR_STAGE
25
Furquan Shaikh99ac98f2014-04-23 10:18:48 -070026config ARCH_RAMSTAGE_X86_32
27 bool
Gabe Black5fbfc912013-07-07 13:52:37 -070028
Angel Ponsa32df262020-09-25 10:20:11 +020029config ARCH_ALL_STAGES_X86_32
30 bool
Angel Pons6f5a6582021-06-22 15:18:07 +020031 default ARCH_ALL_STAGES_X86 && !ARCH_ALL_STAGES_X86_64
Angel Ponsa32df262020-09-25 10:20:11 +020032 select ARCH_BOOTBLOCK_X86_32
33 select ARCH_VERSTAGE_X86_32
34 select ARCH_ROMSTAGE_X86_32
35 select ARCH_RAMSTAGE_X86_32
Arthur Heymans5b528bc2022-03-24 10:38:54 +010036 select ARCH_SUPPORTS_CLANG
Angel Ponsa32df262020-09-25 10:20:11 +020037
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
43config ARCH_VERSTAGE_X86_64
44 bool
Stefan Reinauer68671202015-03-15 04:34:03 +010045
46config ARCH_ROMSTAGE_X86_64
47 bool
Stefan Reinauer68671202015-03-15 04:34:03 +010048
Patrick Georgi29eeece2018-10-31 14:24:47 +010049config ARCH_POSTCAR_X86_64
50 bool
51 default ARCH_ROMSTAGE_X86_64 && POSTCAR_STAGE
52
Stefan Reinauer68671202015-03-15 04:34:03 +010053config ARCH_RAMSTAGE_X86_64
54 bool
Arthur Heymansb86e96a2019-02-10 17:00:56 +010055
Angel Pons2db779072020-09-25 10:14:45 +020056config ARCH_ALL_STAGES_X86_64
57 bool
58 select ARCH_BOOTBLOCK_X86_64
59 select ARCH_VERSTAGE_X86_64
60 select ARCH_ROMSTAGE_X86_64
61 select ARCH_RAMSTAGE_X86_64
62
Angel Pons6f5a6582021-06-22 15:18:07 +020063config ARCH_ALL_STAGES_X86
64 bool
65 default y
66
Angel Pons16fe5e12021-06-22 15:41:59 +020067config HAVE_EXP_X86_64_SUPPORT
68 bool
69 help
70 Enable experimental support to build and run coreboot in 64-bit mode.
71 When selecting this option for a new platform, it is highly advisable
72 to provide a config file for Jenkins to build-test the 64-bit option.
73
74config USE_EXP_X86_64_SUPPORT
75 bool "[EXPERIMENTAL] Run coreboot in long (64-bit) mode"
76 depends on HAVE_EXP_X86_64_SUPPORT
77 select ARCH_ALL_STAGES_X86_64
78 help
79 When set, most of coreboot runs in long (64-bit) mode instead of the
80 usual protected flat (32-bit) mode. 64-bit CPUs and OSes can be used
81 irrespective of whether coreboot runs in 32-bit or 64-bit mode. This
82 is an experimental option: do not enable unless one wants to test it
83 and has the means to recover a system when coreboot fails to boot.
84
Patrick Rudolphb1ef7252019-09-28 17:44:01 +020085config ARCH_X86_64_PGTBL_LOC
86 hex "x86_64 page table location in CBFS"
87 depends on ARCH_BOOTBLOCK_X86_64
Patrick Rudolph19a60a42019-11-30 09:40:52 +010088 default 0xfffe9000
Patrick Rudolphb1ef7252019-09-28 17:44:01 +020089 help
90 The position where to place pagetables. Needs to be known at
91 compile time. Must not overlap other files in CBFS.
92
Martin Roth0cd9ff82016-02-01 17:33:37 -070093config USE_MARCH_586
94 def_bool n
95 help
96 Allow a platform or processor to select to be compiled using
97 the '-march=i586' option instead of the typical '-march=i686'
98
Uwe Hermann168b11b2009-10-07 16:15:40 +000099# This is an SMP option. It relates to starting up APs.
100# It is usually set in mainboard/*/Kconfig.
101# TODO: Improve description.
Sven Schnelle51676b12012-07-29 19:18:03 +0200102config AP_IN_SIPI_WAIT
103 bool
104 default n
Stefan Reinauer2a6f3902012-10-15 13:38:09 -0700105 depends on ARCH_X86 && SMP
Ronald G. Minnich6ed39d92009-08-29 02:59:35 +0000106
Martin Roth8418fd42019-04-22 16:26:23 -0600107config RESET_VECTOR_IN_RAM
108 bool
109 depends on ARCH_X86
Felix Heldca928c62020-04-04 01:47:37 +0200110 select NO_XIP_EARLY_STAGES
Martin Roth8418fd42019-04-22 16:26:23 -0600111 help
Felix Heldca928c62020-04-04 01:47:37 +0200112 Select this option if the x86 processor's reset vector is in
113 preinitialized DRAM instead of the traditional 0xfffffff0 location.
Martin Roth8418fd42019-04-22 16:26:23 -0600114
Kyösti Mälkkif8c7c232012-04-06 04:03:50 +0300115# Aligns 16bit entry code in bootblock so that hyper-threading CPUs
116# can boot AP CPUs to enable their shared caches.
117config SIPI_VECTOR_IN_ROM
118 bool
119 default n
120 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
Raul E Rangele92a9822021-06-24 16:54:27 -0600125# have BIOS region sandwiched between descriptor and other regions. Turning on
126# X86_CUSTOM_BOOTMEDIA disables X86_TOP4G_BOOTMEDIA_MAP which allows the
127# soc code to provide custom mmap_boot.c.
128config X86_CUSTOM_BOOTMEDIA
129 bool
130
Alexandru Gagniuc6a622312015-10-27 10:27:30 -0700131config X86_TOP4G_BOOTMEDIA_MAP
132 bool
Raul E Rangele92a9822021-06-24 16:54:27 -0600133 depends on !X86_CUSTOM_BOOTMEDIA
Alexandru Gagniuc6a622312015-10-27 10:27:30 -0700134 default y
135
Ronald G. Minnichb5e777c2013-07-22 20:17:18 +0200136# This is something you almost certainly don't want to mess with.
137# How many SIPIs do we send when starting up APs and cores?
138# The answer in 2000 or so was '2'. Nowadays, on many systems,
139# it is 1. Set a safe default here, and you can override it
140# on reasonable platforms.
141config NUM_IPI_STARTS
142 int
143 default 2
144
Naresh G Solanki04bb4802016-12-13 21:16:46 +0530145config PRERAM_CBMEM_CONSOLE_SIZE
146 hex
147 default 0xc00
148 help
149 Increase this value if preram cbmem console is getting truncated
150
Julius Wernerbaf27db2019-10-02 17:28:56 -0700151config CBFS_MCACHE_SIZE
152 hex
153 depends on !NO_CBFS_MCACHE
Julius Werner40acfe72021-05-12 15:59:58 -0700154 default 0x4000
Julius Wernerbaf27db2019-10-02 17:28:56 -0700155 help
Julius Werner40acfe72021-05-12 15:59:58 -0700156 Increase this value if you see CBFS mcache overflow warnings. Do NOT
157 change this value for vboot RW updates!
Julius Wernerbaf27db2019-10-02 17:28:56 -0700158
Stefan Reinauer8aedcbc2010-12-16 23:37:17 +0000159config PC80_SYSTEM
160 bool
Furquan Shaikh99ac98f2014-04-23 10:18:48 -0700161 default y if ARCH_X86
Stefan Reinauer8aedcbc2010-12-16 23:37:17 +0000162
Lee Leahyfdc8c8b2016-06-07 08:45:17 -0700163config BOOTBLOCK_DEBUG_SPINLOOP
164 bool
165 default n
166 help
167 Add a spin (JMP .) in bootblock_crt0.S during early bootblock to wait
168 for a JTAG debugger to break into the execution sequence.
169
Patrick Georgia865b172011-01-14 07:40:24 +0000170config HAVE_CMOS_DEFAULT
171 def_bool n
Martin Rothf76303e2016-11-16 15:45:22 -0700172 depends on HAVE_OPTION_TABLE
Patrick Georgia865b172011-01-14 07:40:24 +0000173
174config CMOS_DEFAULT_FILE
175 string
Patrick Georgib8fba862020-06-17 21:06:53 +0200176 default "src/mainboard/\$(MAINBOARDDIR)/cmos.default"
Patrick Georgia865b172011-01-14 07:40:24 +0000177 depends on HAVE_CMOS_DEFAULT
178
Felix Held4e037272022-02-23 16:35:58 +0100179config HPET_MIN_TICKS
180 hex
181
Aaron Durbin65ac3d82016-02-11 14:36:19 -0600182config C_ENV_BOOTBLOCK_SIZE
183 hex
Kyösti Mälkkie76ce872020-05-25 08:52:07 +0300184 default 0x40000 if !FIXED_BOOTBLOCK_SIZE
185 help
186 This is only the default maximum of bootblock size for linking
187 purposes. Platforms may provide different limit and need to
188 specify this when FIXED_BOOTBLOCK_SIZE is selected.
Andrey Petrovccd300b2016-02-28 22:04:51 -0800189
Kyösti Mälkki49dbbe92019-12-21 10:17:56 +0200190config FIXED_BOOTBLOCK_SIZE
191 bool
192
Andrey Petrovccd300b2016-02-28 22:04:51 -0800193# Default address romstage is to be linked at
194config ROMSTAGE_ADDR
195 hex
196 default 0x2000000
197
198# Default address verstage is to be linked at
199config VERSTAGE_ADDR
200 hex
201 default 0x2000000
Aaron Durbin7f8afe02016-03-18 12:21:23 -0500202
203# Use the post CAR infrastructure for tearing down cache-as-ram
Elyes HAOUAS777ea892016-07-29 07:40:41 +0200204# from a program loaded in RAM and subsequently loading ramstage.
Aaron Durbin7f8afe02016-03-18 12:21:23 -0500205config POSTCAR_STAGE
Kyösti Mälkki0f5e01a2019-08-09 07:11:07 +0300206 def_bool y
207 depends on ARCH_X86
Felix Heldca928c62020-04-04 01:47:37 +0200208 depends on !RESET_VECTOR_IN_RAM
Lee Leahyd131ea32016-06-08 13:40:08 -0700209
210config VERSTAGE_DEBUG_SPINLOOP
211 bool
212 default n
213 help
214 Add a spin (JMP .) in assembly_entry.S during early verstage to wait
215 for a JTAG debugger to break into the execution sequence.
216
217config ROMSTAGE_DEBUG_SPINLOOP
218 bool
219 default n
220 help
221 Add a spin (JMP .) in assembly_entry.S during early romstage to wait
222 for a JTAG debugger to break into the execution sequence.
Martin Roth408fda72016-12-15 16:04:55 -0700223
224choice
225 prompt "Bootblock behaviour"
226 default BOOTBLOCK_SIMPLE
Kyösti Mälkkib8d575c2019-12-16 16:00:49 +0200227 depends on !VBOOT
Martin Roth408fda72016-12-15 16:04:55 -0700228
229config BOOTBLOCK_SIMPLE
230 bool "Always load fallback"
231
232config BOOTBLOCK_NORMAL
Arthur Heymans6f751542019-06-08 11:28:52 +0200233 select CONFIGURABLE_CBFS_PREFIX
Martin Roth408fda72016-12-15 16:04:55 -0700234 bool "Switch to normal if CMOS says so"
235
236endchoice
237
Martin Roth408fda72016-12-15 16:04:55 -0700238config SKIP_MAX_REBOOT_CNT_CLEAR
239 bool "Do not clear reboot count after successful boot"
240 depends on BOOTBLOCK_NORMAL
241 help
242 Do not clear the reboot count immediately after successful boot.
243 Set to allow the payload to control normal/fallback image recovery.
244 Note that it is the responsibility of the payload to reset the
Paul Menzelb9499022019-01-08 16:21:31 +0100245 normal boot bit to 1 after each successful boot.
Marc Jones7a2d4ea2017-08-25 18:54:23 -0600246
Furquan Shaikhbf4b7b02020-04-30 18:08:16 -0700247config ACPI_BERT
Nico Huber9df72e02018-11-24 18:25:50 +0100248 bool
Marc Jones7a2d4ea2017-08-25 18:54:23 -0600249 depends on HAVE_ACPI_TABLES
250 help
Furquan Shaikhbf4b7b02020-04-30 18:08:16 -0700251 Build an ACPI Boot Error Record Table.
Aaron Durbinf49ddb62018-01-24 17:35:58 -0700252
253config COLLECT_TIMESTAMPS_NO_TSC
254 bool
255 default n
256 depends on COLLECT_TIMESTAMPS
257 help
258 Use a non-TSC platform-dependent source for timestamps.
259
260config COLLECT_TIMESTAMPS_TSC
261 bool
262 default y if !COLLECT_TIMESTAMPS_NO_TSC
263 default n
264 depends on COLLECT_TIMESTAMPS
265 help
266 Use the TSC as the timestamp source.
Aaron Durbin0f35af8f2018-04-18 01:00:27 -0600267
268config PAGING_IN_CACHE_AS_RAM
269 bool
270 default n
271 depends on ARCH_X86
272 help
273 Chipsets scan select this option to preallocate area in cache-as-ram
274 for storing paging data structures. PAE paging is currently the
275 only thing being supported.
276
277config NUM_CAR_PAGE_TABLE_PAGES
278 int
279 default 5
280 depends on PAGING_IN_CACHE_AS_RAM
281 help
282 The number of 4KiB pages that should be pre-allocated for page tables.
Aaron Durbin4b032e42018-04-20 01:39:30 -0600283
284# Provide the interrupt handlers to every stage. Not all
285# stages may take advantage.
286config IDT_IN_EVERY_STAGE
287 bool
288 default n
289 depends on ARCH_X86
Nico Huber33fcaf92018-10-10 22:44:20 +0200290
291config HAVE_CF9_RESET
292 bool
293
294config HAVE_CF9_RESET_PREPARE
295 bool
296 depends on HAVE_CF9_RESET
Kyösti Mälkkib72b5d92019-07-04 21:08:17 +0300297
298config PIRQ_ROUTE
299 bool
300 default n
301
302config MAX_PIRQ_LINKS
303 int
304 default 4
305 depends on PIRQ_ROUTE
306 help
307 This variable specifies the number of PIRQ interrupt links which are
308 routable. On most chipsets, this is 4, INTA through INTD. Some
309 chipsets offer more than four links, commonly up to INTH. They may
310 also have a separate link for ATA or IOAPIC interrupts. When the PIRQ
311 table specifies links greater than 4, pirq_route_irqs will not
312 function properly, unless this variable is correctly set.
Arthur Heymansb86e96a2019-02-10 17:00:56 +0100313
Duncan Laurief02bf352020-03-17 18:32:54 -0700314config MAX_ACPI_TABLE_SIZE_KB
315 int
316 default 144
317 help
318 Set the maximum size of all ACPI tables in KiB.
319
Furquan Shaikh46514c22020-06-11 11:59:07 -0700320config MEMLAYOUT_LD_FILE
321 string
322 default "src/arch/x86/memlayout.ld"
323
Robert Zieba3f01cd12022-04-14 10:36:15 -0600324config DEBUG_HW_BREAKPOINTS
325 bool
326 default y
327 help
328 Enable support for hardware data and instruction breakpoints through
329 the x86 debug registers
330
331config DEBUG_HW_BREAKPOINTS_IN_ALL_STAGES
332 bool
333 default y
334 depends on DEBUG_HW_BREAKPOINTS && IDT_IN_EVERY_STAGE
335
336config DEBUG_NULL_DEREF_BREAKPOINTS
337 bool
338 default y
339 depends on DEBUG_HW_BREAKPOINTS
340 help
341 Enable support for catching null dereferences and instruction execution
342
343config DEBUG_NULL_DEREF_BREAKPOINTS_IN_ALL_STAGES
344 bool
345 default y
346 depends on DEBUG_NULL_DEREF_BREAKPOINTS && DEBUG_HW_BREAKPOINTS_IN_ALL_STAGES
347
348config DEBUG_NULL_DEREF_HALT
349 bool
350 default n
351 depends on DEBUG_NULL_DEREF_BREAKPOINTS
352 help
353 When enabled null dereferences and instruction fetches will halt execution.
354 Otherwise an error will be printed.
355
Bill XIEf0215b42021-03-20 21:06:11 +0800356# Some EC need an "EC firmware pointer" (a data structure hinting the address
357# of its firmware blobs) being put at a fixed position. Its space
358# (__section__(".ecfw_ptr")) should be reserved if it lies in the range of a
359# stage. Different EC may have different format and/or value for it. The actual
360# address of EC firmware pointer should be provided in the Kconfig of the EC
361# requiring it, and its value could be filled by linking a read-only global
362# data object to the section above.
363
364config ECFW_PTR_ADDR
365 hex
366 help
367 Address of reserved space for EC firmware pointer, which should not
368 overlap other data such as reset vector or FIT pointer if present.
369
370config ECFW_PTR_SIZE
371 int
372 help
373 Size of reserved space for EC firmware pointer
374
Arthur Heymansb86e96a2019-02-10 17:00:56 +0100375endif