blob: 14f542aa69cceca47b596ab1c070e1bea71ea1e5 [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
Stefan Reinauer68671202015-03-15 04:34:03 +010031# stage selectors for x64
32
33config ARCH_BOOTBLOCK_X86_64
34 bool
Stefan Reinauer68671202015-03-15 04:34:03 +010035 select ARCH_X86
36
37config ARCH_VERSTAGE_X86_64
38 bool
Arthur Heymansb86e96a2019-02-10 17:00:56 +010039 select ARCH_X86
Stefan Reinauer68671202015-03-15 04:34:03 +010040
41config ARCH_ROMSTAGE_X86_64
42 bool
Arthur Heymansb86e96a2019-02-10 17:00:56 +010043 select ARCH_X86
Stefan Reinauer68671202015-03-15 04:34:03 +010044
Patrick Georgi29eeece2018-10-31 14:24:47 +010045config ARCH_POSTCAR_X86_64
46 bool
47 default ARCH_ROMSTAGE_X86_64 && POSTCAR_STAGE
48
Stefan Reinauer68671202015-03-15 04:34:03 +010049config ARCH_RAMSTAGE_X86_64
50 bool
Arthur Heymansb86e96a2019-02-10 17:00:56 +010051 select ARCH_X86
52
Angel Pons2db779072020-09-25 10:14:45 +020053config ARCH_ALL_STAGES_X86_64
54 bool
55 select ARCH_BOOTBLOCK_X86_64
56 select ARCH_VERSTAGE_X86_64
57 select ARCH_ROMSTAGE_X86_64
58 select ARCH_RAMSTAGE_X86_64
59
Arthur Heymansb86e96a2019-02-10 17:00:56 +010060if ARCH_X86
Stefan Reinauer68671202015-03-15 04:34:03 +010061
Patrick Rudolphb1ef7252019-09-28 17:44:01 +020062config ARCH_X86_64_PGTBL_LOC
63 hex "x86_64 page table location in CBFS"
64 depends on ARCH_BOOTBLOCK_X86_64
65 default 0xfffea000
66 help
67 The position where to place pagetables. Needs to be known at
68 compile time. Must not overlap other files in CBFS.
69
Martin Roth0cd9ff82016-02-01 17:33:37 -070070config USE_MARCH_586
71 def_bool n
72 help
73 Allow a platform or processor to select to be compiled using
74 the '-march=i586' option instead of the typical '-march=i686'
75
Uwe Hermann168b11b2009-10-07 16:15:40 +000076# This is an SMP option. It relates to starting up APs.
77# It is usually set in mainboard/*/Kconfig.
78# TODO: Improve description.
Sven Schnelle51676b12012-07-29 19:18:03 +020079config AP_IN_SIPI_WAIT
80 bool
81 default n
Stefan Reinauer2a6f3902012-10-15 13:38:09 -070082 depends on ARCH_X86 && SMP
Ronald G. Minnich6ed39d92009-08-29 02:59:35 +000083
Marshall Dawson67910db2019-11-01 17:30:05 -060084config X86_RESET_VECTOR
85 hex
86 depends on ARCH_X86
87 default 0xfffffff0
88 help
89 Specify the location of the x86 reset vector. In traditional devices
90 this must match the architectural reset vector to produce a bootable
91 image. Nontraditional designs may use this to position the reset
92 vector into its desired location.
93
Martin Roth8418fd42019-04-22 16:26:23 -060094config RESET_VECTOR_IN_RAM
95 bool
96 depends on ARCH_X86
Felix Heldca928c62020-04-04 01:47:37 +020097 select NO_XIP_EARLY_STAGES
Martin Roth8418fd42019-04-22 16:26:23 -060098 help
Felix Heldca928c62020-04-04 01:47:37 +020099 Select this option if the x86 processor's reset vector is in
100 preinitialized DRAM instead of the traditional 0xfffffff0 location.
Martin Roth8418fd42019-04-22 16:26:23 -0600101
Kyösti Mälkkif8c7c232012-04-06 04:03:50 +0300102# Aligns 16bit entry code in bootblock so that hyper-threading CPUs
103# can boot AP CPUs to enable their shared caches.
104config SIPI_VECTOR_IN_ROM
105 bool
106 default n
107 depends on ARCH_X86
108
Ronald G. Minnich83bd46e2018-09-16 09:59:54 -0700109# Set the rambase for systems that still need it, only 5 chipsets as of
110# Sep 2018. This value was 0x100000, chosen to match the entry point
111# of Linux 2.2 in 1999. The new value, 14 MiB, makes a lot more sense
112# for as long as we need it; with luck, that won't be much longer.
113# In the long term, both RAMBASE and RAMTOP should be removed.
114# This value leaves more than 1 MiB which is required for fam10
115# and broadwell_de.
Patrick Georgi0588d192009-08-12 15:00:51 +0000116config RAMBASE
117 hex
Ronald G. Minnich83bd46e2018-09-16 09:59:54 -0700118 default 0xe00000
Patrick Georgi0588d192009-08-12 15:00:51 +0000119
Kyösti Mälkkibec853e2016-06-15 02:25:00 +0300120config RAMTOP
121 hex
Ronald G. Minnich83bd46e2018-09-16 09:59:54 -0700122 default 0x1000000
Kyösti Mälkkibec853e2016-06-15 02:25:00 +0300123 depends on ARCH_X86
124
Alexandru Gagniuc6a622312015-10-27 10:27:30 -0700125# Traditionally BIOS region on SPI flash boot media was memory mapped right below
126# 4G and it was the last region in the IFD. This way translation between CPU
127# address space to flash address was trivial. However some IFDs on newer SoCs
128# have BIOS region sandwiched between descriptor and other regions. Turning off
129# this option enables soc code to provide custom mmap_boot.c which can be used to
130# implement complex translation.
131config X86_TOP4G_BOOTMEDIA_MAP
132 bool
133 default y
134
Ronald G. Minnichb5e777c2013-07-22 20:17:18 +0200135# This is something you almost certainly don't want to mess with.
136# How many SIPIs do we send when starting up APs and cores?
137# The answer in 2000 or so was '2'. Nowadays, on many systems,
138# it is 1. Set a safe default here, and you can override it
139# on reasonable platforms.
140config NUM_IPI_STARTS
141 int
142 default 2
143
Naresh G Solanki04bb4802016-12-13 21:16:46 +0530144config PRERAM_CBMEM_CONSOLE_SIZE
145 hex
146 default 0xc00
147 help
148 Increase this value if preram cbmem console is getting truncated
149
Stefan Reinauer8aedcbc2010-12-16 23:37:17 +0000150config PC80_SYSTEM
151 bool
Furquan Shaikh99ac98f2014-04-23 10:18:48 -0700152 default y if ARCH_X86
Stefan Reinauer8aedcbc2010-12-16 23:37:17 +0000153
Lee Leahyfdc8c8b2016-06-07 08:45:17 -0700154config BOOTBLOCK_DEBUG_SPINLOOP
155 bool
156 default n
157 help
158 Add a spin (JMP .) in bootblock_crt0.S during early bootblock to wait
159 for a JTAG debugger to break into the execution sequence.
160
Patrick Georgia865b172011-01-14 07:40:24 +0000161config HAVE_CMOS_DEFAULT
162 def_bool n
Martin Rothf76303e2016-11-16 15:45:22 -0700163 depends on HAVE_OPTION_TABLE
Patrick Georgia865b172011-01-14 07:40:24 +0000164
165config CMOS_DEFAULT_FILE
166 string
Patrick Georgib8fba862020-06-17 21:06:53 +0200167 default "src/mainboard/\$(MAINBOARDDIR)/cmos.default"
Patrick Georgia865b172011-01-14 07:40:24 +0000168 depends on HAVE_CMOS_DEFAULT
169
Patrick Georgid4d5e4d2012-03-16 19:28:15 +0100170config IOAPIC_INTERRUPTS_ON_FSB
171 bool
172 default y if !IOAPIC_INTERRUPTS_ON_APIC_SERIAL_BUS
173
174config IOAPIC_INTERRUPTS_ON_APIC_SERIAL_BUS
175 bool
176 default n
177
Kyösti Mälkkib433d262018-05-24 09:56:11 +0300178config HPET_ADDRESS_OVERRIDE
179 def_bool n
180
Patrick Georgi9aeb6942012-10-05 21:54:38 +0200181config HPET_ADDRESS
182 hex
183 default 0xfed00000 if !HPET_ADDRESS_OVERRIDE
184
Stefan Reinauer84833442012-11-13 15:04:12 -0800185config ID_SECTION_OFFSET
186 hex
187 default 0x80
Patrick Georgic32a52c2015-06-22 21:10:34 +0200188
Arthur Heymansc05b1a62019-11-22 21:01:30 +0100189# 64KiB default bootblock size
Aaron Durbin65ac3d82016-02-11 14:36:19 -0600190config C_ENV_BOOTBLOCK_SIZE
191 hex
192 default 0x10000
Andrey Petrovccd300b2016-02-28 22:04:51 -0800193
194# Default address romstage is to be linked at
195config ROMSTAGE_ADDR
196 hex
197 default 0x2000000
198
199# Default address verstage is to be linked at
200config VERSTAGE_ADDR
201 hex
202 default 0x2000000
Aaron Durbin7f8afe02016-03-18 12:21:23 -0500203
204# Use the post CAR infrastructure for tearing down cache-as-ram
Elyes HAOUAS777ea892016-07-29 07:40:41 +0200205# from a program loaded in RAM and subsequently loading ramstage.
Aaron Durbin7f8afe02016-03-18 12:21:23 -0500206config POSTCAR_STAGE
Kyösti Mälkki0f5e01a2019-08-09 07:11:07 +0300207 def_bool y
208 depends on ARCH_X86
Felix Heldca928c62020-04-04 01:47:37 +0200209 depends on !RESET_VECTOR_IN_RAM
Lee Leahyd131ea32016-06-08 13:40:08 -0700210
211config VERSTAGE_DEBUG_SPINLOOP
212 bool
213 default n
214 help
215 Add a spin (JMP .) in assembly_entry.S during early verstage to wait
216 for a JTAG debugger to break into the execution sequence.
217
218config ROMSTAGE_DEBUG_SPINLOOP
219 bool
220 default n
221 help
222 Add a spin (JMP .) in assembly_entry.S during early romstage to wait
223 for a JTAG debugger to break into the execution sequence.
Martin Roth408fda72016-12-15 16:04:55 -0700224
225choice
226 prompt "Bootblock behaviour"
227 default BOOTBLOCK_SIMPLE
Kyösti Mälkkib8d575c2019-12-16 16:00:49 +0200228 depends on !VBOOT
Martin Roth408fda72016-12-15 16:04:55 -0700229
230config BOOTBLOCK_SIMPLE
231 bool "Always load fallback"
232
233config BOOTBLOCK_NORMAL
Arthur Heymans6f751542019-06-08 11:28:52 +0200234 select CONFIGURABLE_CBFS_PREFIX
Martin Roth408fda72016-12-15 16:04:55 -0700235 bool "Switch to normal if CMOS says so"
236
237endchoice
238
Martin Roth408fda72016-12-15 16:04:55 -0700239config SKIP_MAX_REBOOT_CNT_CLEAR
240 bool "Do not clear reboot count after successful boot"
241 depends on BOOTBLOCK_NORMAL
242 help
243 Do not clear the reboot count immediately after successful boot.
244 Set to allow the payload to control normal/fallback image recovery.
245 Note that it is the responsibility of the payload to reset the
Paul Menzelb9499022019-01-08 16:21:31 +0100246 normal boot bit to 1 after each successful boot.
Marc Jones7a2d4ea2017-08-25 18:54:23 -0600247
Furquan Shaikhbf4b7b02020-04-30 18:08:16 -0700248config ACPI_BERT
Nico Huber9df72e02018-11-24 18:25:50 +0100249 bool
Marc Jones7a2d4ea2017-08-25 18:54:23 -0600250 depends on HAVE_ACPI_TABLES
251 help
Furquan Shaikhbf4b7b02020-04-30 18:08:16 -0700252 Build an ACPI Boot Error Record Table.
Aaron Durbinf49ddb62018-01-24 17:35:58 -0700253
254config COLLECT_TIMESTAMPS_NO_TSC
255 bool
256 default n
257 depends on COLLECT_TIMESTAMPS
258 help
259 Use a non-TSC platform-dependent source for timestamps.
260
261config COLLECT_TIMESTAMPS_TSC
262 bool
263 default y if !COLLECT_TIMESTAMPS_NO_TSC
264 default n
265 depends on COLLECT_TIMESTAMPS
266 help
267 Use the TSC as the timestamp source.
Aaron Durbin0f35af8f2018-04-18 01:00:27 -0600268
269config PAGING_IN_CACHE_AS_RAM
270 bool
271 default n
272 depends on ARCH_X86
273 help
274 Chipsets scan select this option to preallocate area in cache-as-ram
275 for storing paging data structures. PAE paging is currently the
276 only thing being supported.
277
278config NUM_CAR_PAGE_TABLE_PAGES
279 int
280 default 5
281 depends on PAGING_IN_CACHE_AS_RAM
282 help
283 The number of 4KiB pages that should be pre-allocated for page tables.
Aaron Durbin4b032e42018-04-20 01:39:30 -0600284
285# Provide the interrupt handlers to every stage. Not all
286# stages may take advantage.
287config IDT_IN_EVERY_STAGE
288 bool
289 default n
290 depends on ARCH_X86
Nico Huber33fcaf92018-10-10 22:44:20 +0200291
292config HAVE_CF9_RESET
293 bool
294
295config HAVE_CF9_RESET_PREPARE
296 bool
297 depends on HAVE_CF9_RESET
Kyösti Mälkkib72b5d92019-07-04 21:08:17 +0300298
299config PIRQ_ROUTE
300 bool
301 default n
302
303config MAX_PIRQ_LINKS
304 int
305 default 4
306 depends on PIRQ_ROUTE
307 help
308 This variable specifies the number of PIRQ interrupt links which are
309 routable. On most chipsets, this is 4, INTA through INTD. Some
310 chipsets offer more than four links, commonly up to INTH. They may
311 also have a separate link for ATA or IOAPIC interrupts. When the PIRQ
312 table specifies links greater than 4, pirq_route_irqs will not
313 function properly, unless this variable is correctly set.
Arthur Heymansb86e96a2019-02-10 17:00:56 +0100314
Duncan Laurief02bf352020-03-17 18:32:54 -0700315config MAX_ACPI_TABLE_SIZE_KB
316 int
317 default 144
318 help
319 Set the maximum size of all ACPI tables in KiB.
320
Furquan Shaikh46514c22020-06-11 11:59:07 -0700321config MEMLAYOUT_LD_FILE
322 string
323 default "src/arch/x86/memlayout.ld"
324
Arthur Heymansb86e96a2019-02-10 17:00:56 +0100325endif