blob: b0e479b1c4a6452bd4cf611ce296c393ec9314a5 [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
Arthur Heymans6e857402022-11-12 16:16:02 +010031 default !ARCH_ALL_STAGES_X86_64
Angel Ponsa32df262020-09-25 10:20:11 +020032 select ARCH_BOOTBLOCK_X86_32
Arthur Heymans6e857402022-11-12 16:16:02 +010033 select ARCH_VERSTAGE_X86_32 if !VBOOT_STARTS_BEFORE_BOOTBLOCK
Angel Ponsa32df262020-09-25 10:20:11 +020034 select ARCH_ROMSTAGE_X86_32
35 select ARCH_RAMSTAGE_X86_32
Arthur Heymans4403c562022-11-17 12:13:35 +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
Patrick Rudolphe249b1a2020-08-27 21:07:57 +020042 select SSE2
Stefan Reinauer68671202015-03-15 04:34:03 +010043
44config ARCH_VERSTAGE_X86_64
45 bool
Patrick Rudolphe249b1a2020-08-27 21:07:57 +020046 select SSE2
Stefan Reinauer68671202015-03-15 04:34:03 +010047
48config ARCH_ROMSTAGE_X86_64
49 bool
Patrick Rudolphe249b1a2020-08-27 21:07:57 +020050 select SSE2
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
Patrick Rudolphe249b1a2020-08-27 21:07:57 +020055 select SSE2
Patrick Georgi29eeece2018-10-31 14:24:47 +010056
Stefan Reinauer68671202015-03-15 04:34:03 +010057config ARCH_RAMSTAGE_X86_64
58 bool
Patrick Rudolphe249b1a2020-08-27 21:07:57 +020059 select SSE2
Arthur Heymansb86e96a2019-02-10 17:00:56 +010060
Angel Pons2db779072020-09-25 10:14:45 +020061config ARCH_ALL_STAGES_X86_64
62 bool
63 select ARCH_BOOTBLOCK_X86_64
Arthur Heymans6e857402022-11-12 16:16:02 +010064 select ARCH_VERSTAGE_X86_64 if !VBOOT_STARTS_BEFORE_BOOTBLOCK
Angel Pons2db779072020-09-25 10:14:45 +020065 select ARCH_ROMSTAGE_X86_64
66 select ARCH_RAMSTAGE_X86_64
Arthur Heymansf45c7672022-11-04 20:38:56 +010067 select ARCH_SUPPORTS_CLANG
Angel Pons2db779072020-09-25 10:14:45 +020068
Angel Pons16fe5e12021-06-22 15:41:59 +020069config HAVE_EXP_X86_64_SUPPORT
70 bool
71 help
72 Enable experimental support to build and run coreboot in 64-bit mode.
73 When selecting this option for a new platform, it is highly advisable
74 to provide a config file for Jenkins to build-test the 64-bit option.
75
76config USE_EXP_X86_64_SUPPORT
77 bool "[EXPERIMENTAL] Run coreboot in long (64-bit) mode"
78 depends on HAVE_EXP_X86_64_SUPPORT
79 select ARCH_ALL_STAGES_X86_64
80 help
81 When set, most of coreboot runs in long (64-bit) mode instead of the
82 usual protected flat (32-bit) mode. 64-bit CPUs and OSes can be used
83 irrespective of whether coreboot runs in 32-bit or 64-bit mode. This
84 is an experimental option: do not enable unless one wants to test it
85 and has the means to recover a system when coreboot fails to boot.
86
Patrick Rudolphb1ef7252019-09-28 17:44:01 +020087config ARCH_X86_64_PGTBL_LOC
88 hex "x86_64 page table location in CBFS"
89 depends on ARCH_BOOTBLOCK_X86_64
Patrick Rudolph19a60a42019-11-30 09:40:52 +010090 default 0xfffe9000
Patrick Rudolphb1ef7252019-09-28 17:44:01 +020091 help
92 The position where to place pagetables. Needs to be known at
93 compile time. Must not overlap other files in CBFS.
94
Felix Held3748fca2023-09-12 14:48:38 +020095config RESERVED_PHYSICAL_ADDRESS_BITS_SUPPORT
96 bool
97 help
98 On some systems, the upper physical address bits are reserved and
99 used as a tag which is typically related to a memory encryption
100 feature. When selecting this option, the SoC code needs to implement
101 get_reserved_phys_addr_bits so that the common code knows how many of
102 the most significant physical address bits are reserved and can't be
103 used as address bits.
104
Uwe Hermann168b11b2009-10-07 16:15:40 +0000105# This is an SMP option. It relates to starting up APs.
106# It is usually set in mainboard/*/Kconfig.
107# TODO: Improve description.
Sven Schnelle51676b12012-07-29 19:18:03 +0200108config AP_IN_SIPI_WAIT
109 bool
110 default n
Stefan Reinauer2a6f3902012-10-15 13:38:09 -0700111 depends on ARCH_X86 && SMP
Ronald G. Minnich6ed39d92009-08-29 02:59:35 +0000112
Martin Roth8418fd42019-04-22 16:26:23 -0600113config RESET_VECTOR_IN_RAM
114 bool
115 depends on ARCH_X86
Felix Heldca928c62020-04-04 01:47:37 +0200116 select NO_XIP_EARLY_STAGES
Martin Roth8418fd42019-04-22 16:26:23 -0600117 help
Felix Heldca928c62020-04-04 01:47:37 +0200118 Select this option if the x86 processor's reset vector is in
119 preinitialized DRAM instead of the traditional 0xfffffff0 location.
Martin Roth8418fd42019-04-22 16:26:23 -0600120
Kyösti Mälkkif8c7c232012-04-06 04:03:50 +0300121# Aligns 16bit entry code in bootblock so that hyper-threading CPUs
122# can boot AP CPUs to enable their shared caches.
123config SIPI_VECTOR_IN_ROM
124 bool
125 default n
126 depends on ARCH_X86
127
Alexandru Gagniuc6a622312015-10-27 10:27:30 -0700128# Traditionally BIOS region on SPI flash boot media was memory mapped right below
129# 4G and it was the last region in the IFD. This way translation between CPU
130# address space to flash address was trivial. However some IFDs on newer SoCs
Raul E Rangele92a9822021-06-24 16:54:27 -0600131# have BIOS region sandwiched between descriptor and other regions. Turning on
132# X86_CUSTOM_BOOTMEDIA disables X86_TOP4G_BOOTMEDIA_MAP which allows the
133# soc code to provide custom mmap_boot.c.
134config X86_CUSTOM_BOOTMEDIA
135 bool
136
Alexandru Gagniuc6a622312015-10-27 10:27:30 -0700137config X86_TOP4G_BOOTMEDIA_MAP
138 bool
Raul E Rangele92a9822021-06-24 16:54:27 -0600139 depends on !X86_CUSTOM_BOOTMEDIA
Alexandru Gagniuc6a622312015-10-27 10:27:30 -0700140 default y
141
Naresh G Solanki04bb4802016-12-13 21:16:46 +0530142config PRERAM_CBMEM_CONSOLE_SIZE
143 hex
144 default 0xc00
145 help
146 Increase this value if preram cbmem console is getting truncated
147
Julius Wernerbaf27db2019-10-02 17:28:56 -0700148config CBFS_MCACHE_SIZE
149 hex
150 depends on !NO_CBFS_MCACHE
Julius Werner40acfe72021-05-12 15:59:58 -0700151 default 0x4000
Julius Wernerbaf27db2019-10-02 17:28:56 -0700152 help
Julius Werner40acfe72021-05-12 15:59:58 -0700153 Increase this value if you see CBFS mcache overflow warnings. Do NOT
154 change this value for vboot RW updates!
Julius Wernerbaf27db2019-10-02 17:28:56 -0700155
Jeremy Compostella052fb7c2023-08-18 14:25:22 -0700156config PRERAM_CBFS_CACHE_SIZE
157 hex
158 default 0x4000
159 help
160 Define the size of the Pre-RAM stages CBFS cache. A size of
161 zero disables the CBFS cache feature in pre-memory stages.
162
Stefan Reinauer8aedcbc2010-12-16 23:37:17 +0000163config PC80_SYSTEM
164 bool
Furquan Shaikh99ac98f2014-04-23 10:18:48 -0700165 default y if ARCH_X86
Stefan Reinauer8aedcbc2010-12-16 23:37:17 +0000166
Lee Leahyfdc8c8b2016-06-07 08:45:17 -0700167config BOOTBLOCK_DEBUG_SPINLOOP
168 bool
169 default n
170 help
171 Add a spin (JMP .) in bootblock_crt0.S during early bootblock to wait
172 for a JTAG debugger to break into the execution sequence.
173
Patrick Georgia865b172011-01-14 07:40:24 +0000174config HAVE_CMOS_DEFAULT
175 def_bool n
Martin Rothf76303e2016-11-16 15:45:22 -0700176 depends on HAVE_OPTION_TABLE
Patrick Georgia865b172011-01-14 07:40:24 +0000177
178config CMOS_DEFAULT_FILE
179 string
Patrick Georgib8fba862020-06-17 21:06:53 +0200180 default "src/mainboard/\$(MAINBOARDDIR)/cmos.default"
Patrick Georgia865b172011-01-14 07:40:24 +0000181 depends on HAVE_CMOS_DEFAULT
182
Felix Held4e037272022-02-23 16:35:58 +0100183config HPET_MIN_TICKS
184 hex
185
Aaron Durbin65ac3d82016-02-11 14:36:19 -0600186config C_ENV_BOOTBLOCK_SIZE
187 hex
Kyösti Mälkkie76ce872020-05-25 08:52:07 +0300188 default 0x40000 if !FIXED_BOOTBLOCK_SIZE
189 help
190 This is only the default maximum of bootblock size for linking
191 purposes. Platforms may provide different limit and need to
192 specify this when FIXED_BOOTBLOCK_SIZE is selected.
Andrey Petrovccd300b2016-02-28 22:04:51 -0800193
Kyösti Mälkki49dbbe92019-12-21 10:17:56 +0200194config FIXED_BOOTBLOCK_SIZE
195 bool
196
Andrey Petrovccd300b2016-02-28 22:04:51 -0800197# Default address romstage is to be linked at
198config ROMSTAGE_ADDR
199 hex
200 default 0x2000000
201
202# Default address verstage is to be linked at
203config VERSTAGE_ADDR
204 hex
205 default 0x2000000
Aaron Durbin7f8afe02016-03-18 12:21:23 -0500206
207# Use the post CAR infrastructure for tearing down cache-as-ram
Elyes HAOUAS777ea892016-07-29 07:40:41 +0200208# from a program loaded in RAM and subsequently loading ramstage.
Aaron Durbin7f8afe02016-03-18 12:21:23 -0500209config POSTCAR_STAGE
Kyösti Mälkki0f5e01a2019-08-09 07:11:07 +0300210 def_bool y
211 depends on ARCH_X86
Felix Heldca928c62020-04-04 01:47:37 +0200212 depends on !RESET_VECTOR_IN_RAM
Lee Leahyd131ea32016-06-08 13:40:08 -0700213
214config VERSTAGE_DEBUG_SPINLOOP
215 bool
216 default n
217 help
218 Add a spin (JMP .) in assembly_entry.S during early verstage to wait
219 for a JTAG debugger to break into the execution sequence.
220
221config ROMSTAGE_DEBUG_SPINLOOP
222 bool
223 default n
224 help
225 Add a spin (JMP .) in assembly_entry.S during early romstage to wait
226 for a JTAG debugger to break into the execution sequence.
Martin Roth408fda72016-12-15 16:04:55 -0700227
228choice
229 prompt "Bootblock behaviour"
230 default BOOTBLOCK_SIMPLE
Kyösti Mälkkib8d575c2019-12-16 16:00:49 +0200231 depends on !VBOOT
Martin Roth408fda72016-12-15 16:04:55 -0700232
233config BOOTBLOCK_SIMPLE
234 bool "Always load fallback"
235
236config BOOTBLOCK_NORMAL
Arthur Heymans6f751542019-06-08 11:28:52 +0200237 select CONFIGURABLE_CBFS_PREFIX
Martin Roth408fda72016-12-15 16:04:55 -0700238 bool "Switch to normal if CMOS says so"
239
240endchoice
241
Martin Roth408fda72016-12-15 16:04:55 -0700242config SKIP_MAX_REBOOT_CNT_CLEAR
243 bool "Do not clear reboot count after successful boot"
244 depends on BOOTBLOCK_NORMAL
245 help
246 Do not clear the reboot count immediately after successful boot.
247 Set to allow the payload to control normal/fallback image recovery.
248 Note that it is the responsibility of the payload to reset the
Paul Menzelb9499022019-01-08 16:21:31 +0100249 normal boot bit to 1 after each successful boot.
Marc Jones7a2d4ea2017-08-25 18:54:23 -0600250
Furquan Shaikhbf4b7b02020-04-30 18:08:16 -0700251config ACPI_BERT
Nico Huber9df72e02018-11-24 18:25:50 +0100252 bool
Marc Jones7a2d4ea2017-08-25 18:54:23 -0600253 depends on HAVE_ACPI_TABLES
254 help
Furquan Shaikhbf4b7b02020-04-30 18:08:16 -0700255 Build an ACPI Boot Error Record Table.
Aaron Durbinf49ddb62018-01-24 17:35:58 -0700256
257config COLLECT_TIMESTAMPS_NO_TSC
258 bool
259 default n
260 depends on COLLECT_TIMESTAMPS
261 help
262 Use a non-TSC platform-dependent source for timestamps.
263
264config COLLECT_TIMESTAMPS_TSC
265 bool
266 default y if !COLLECT_TIMESTAMPS_NO_TSC
267 default n
268 depends on COLLECT_TIMESTAMPS
269 help
270 Use the TSC as the timestamp source.
Aaron Durbin0f35af8f2018-04-18 01:00:27 -0600271
272config PAGING_IN_CACHE_AS_RAM
273 bool
274 default n
275 depends on ARCH_X86
276 help
277 Chipsets scan select this option to preallocate area in cache-as-ram
278 for storing paging data structures. PAE paging is currently the
279 only thing being supported.
280
281config NUM_CAR_PAGE_TABLE_PAGES
282 int
283 default 5
284 depends on PAGING_IN_CACHE_AS_RAM
285 help
286 The number of 4KiB pages that should be pre-allocated for page tables.
Aaron Durbin4b032e42018-04-20 01:39:30 -0600287
288# Provide the interrupt handlers to every stage. Not all
289# stages may take advantage.
290config IDT_IN_EVERY_STAGE
291 bool
292 default n
293 depends on ARCH_X86
Nico Huber33fcaf92018-10-10 22:44:20 +0200294
295config HAVE_CF9_RESET
296 bool
297
298config HAVE_CF9_RESET_PREPARE
299 bool
300 depends on HAVE_CF9_RESET
Kyösti Mälkkib72b5d92019-07-04 21:08:17 +0300301
302config PIRQ_ROUTE
303 bool
304 default n
305
306config MAX_PIRQ_LINKS
307 int
308 default 4
309 depends on PIRQ_ROUTE
310 help
311 This variable specifies the number of PIRQ interrupt links which are
312 routable. On most chipsets, this is 4, INTA through INTD. Some
313 chipsets offer more than four links, commonly up to INTH. They may
314 also have a separate link for ATA or IOAPIC interrupts. When the PIRQ
315 table specifies links greater than 4, pirq_route_irqs will not
316 function properly, unless this variable is correctly set.
Arthur Heymansb86e96a2019-02-10 17:00:56 +0100317
Furquan Shaikh46514c22020-06-11 11:59:07 -0700318config MEMLAYOUT_LD_FILE
319 string
320 default "src/arch/x86/memlayout.ld"
321
Robert Zieba3f01cd12022-04-14 10:36:15 -0600322config DEBUG_HW_BREAKPOINTS
323 bool
324 default y
325 help
326 Enable support for hardware data and instruction breakpoints through
327 the x86 debug registers
328
329config DEBUG_HW_BREAKPOINTS_IN_ALL_STAGES
330 bool
331 default y
332 depends on DEBUG_HW_BREAKPOINTS && IDT_IN_EVERY_STAGE
333
334config DEBUG_NULL_DEREF_BREAKPOINTS
335 bool
336 default y
337 depends on DEBUG_HW_BREAKPOINTS
338 help
339 Enable support for catching null dereferences and instruction execution
340
341config DEBUG_NULL_DEREF_BREAKPOINTS_IN_ALL_STAGES
342 bool
343 default y
344 depends on DEBUG_NULL_DEREF_BREAKPOINTS && DEBUG_HW_BREAKPOINTS_IN_ALL_STAGES
345
346config DEBUG_NULL_DEREF_HALT
347 bool
348 default n
349 depends on DEBUG_NULL_DEREF_BREAKPOINTS
350 help
351 When enabled null dereferences and instruction fetches will halt execution.
352 Otherwise an error will be printed.
353
Bill XIEf0215b42021-03-20 21:06:11 +0800354# Some EC need an "EC firmware pointer" (a data structure hinting the address
355# of its firmware blobs) being put at a fixed position. Its space
356# (__section__(".ecfw_ptr")) should be reserved if it lies in the range of a
357# stage. Different EC may have different format and/or value for it. The actual
358# address of EC firmware pointer should be provided in the Kconfig of the EC
359# requiring it, and its value could be filled by linking a read-only global
360# data object to the section above.
361
362config ECFW_PTR_ADDR
363 hex
364 help
365 Address of reserved space for EC firmware pointer, which should not
366 overlap other data such as reset vector or FIT pointer if present.
367
368config ECFW_PTR_SIZE
369 int
370 help
371 Size of reserved space for EC firmware pointer
372
Eric Laic1ef4f32023-06-12 14:27:54 +0800373config DUMP_SMBIOS_TYPE17
Eric Lai8bbe8502023-06-26 07:56:39 +0800374 bool "Dump part of SMBIOS type17 dimm information"
Eric Laic1ef4f32023-06-12 14:27:54 +0800375 depends on GENERATE_SMBIOS_TABLES
376
Arthur Heymansb86e96a2019-02-10 17:00:56 +0100377endif