blob: 04770c94eb1732b4719fbeacf1751bbb3ed8d2df [file] [log] [blame]
Elyes HAOUASf7b2fe62020-05-07 12:38:15 +02001# SPDX-License-Identifier: GPL-2.0-only
Daisuke Nojiri742fc8d2014-10-10 10:51:06 -07002
Julius Werner58c39382017-02-13 17:53:29 -08003menu "Verified Boot (vboot)"
Lee Leahy33efd982017-03-13 17:25:36 -07004
Bill XIEcdf6f3a2019-12-17 15:56:43 +08005config VBOOT_LIB
6 bool
Bill XIEcdf6f3a2019-12-17 15:56:43 +08007 help
8 Build and link the vboot library. Makes the vboot API accessible across
9 all coreboot stages, without enabling vboot verification. For verification,
10 please see the VBOOT option below.
11
Furquan Shaikh2a12e2e2016-07-25 11:48:03 -070012config VBOOT
13 bool "Verify firmware with vboot."
14 default n
Bill XIEcdf6f3a2019-12-17 15:56:43 +080015 select VBOOT_LIB
Kyösti Mälkkif303b4f2021-05-27 19:33:57 +030016 select VBOOT_MOCK_SECDATA if !TPM
Julius Wernerb38586f2020-01-14 16:25:56 -080017 depends on 0 = 0 # Must have a 'depends on' or board overrides will break it.
Furquan Shaikh2a12e2e2016-07-25 11:48:03 -070018 help
19 Enabling VBOOT will use vboot to verify the components of the firmware
20 (stages, payload, etc).
Julius Werner58c39382017-02-13 17:53:29 -080021
22if VBOOT
23
Christian Walter0bd84ed2019-07-23 10:26:30 +020024comment "Anti-Rollback Protection disabled because mocking secdata is enabled."
25 depends on VBOOT_MOCK_SECDATA
26
Philipp Deppenwiesea558ca92018-07-28 23:30:49 +020027config VBOOT_SLOTS_RW_A
28 bool "Firmware RO + RW_A"
29 help
30 Have one update partition beside the RO partition.
31
32config VBOOT_SLOTS_RW_AB
33 bool "Firmware RO + RW_A + RW_B"
34 select VBOOT_SLOTS_RW_A
35 help
36 Have two update partitions beside the RO partition.
37
Julius Werner58c39382017-02-13 17:53:29 -080038config VBOOT_VBNV_CMOS
39 bool
40 default n
41 depends on PC80_SYSTEM
42 help
43 VBNV is stored in CMOS
44
45config VBOOT_VBNV_OFFSET
46 hex
47 default 0x26
48 depends on VBOOT_VBNV_CMOS
49 help
50 CMOS offset for VbNv data. This value must match cmos.layout
51 in the mainboard directory, minus 14 bytes for the RTC.
52
53config VBOOT_VBNV_CMOS_BACKUP_TO_FLASH
54 bool
55 default n
56 depends on VBOOT_VBNV_CMOS && BOOT_DEVICE_SUPPORTS_WRITES
57 help
58 Vboot non-volatile storage data will be backed up from CMOS to flash
59 and restored from flash if the CMOS is invalid due to power loss.
60
61config VBOOT_VBNV_EC
62 bool
63 default n
64 help
65 VBNV is stored in EC
66
67config VBOOT_VBNV_FLASH
68 bool
69 default n
70 depends on BOOT_DEVICE_SUPPORTS_WRITES
71 help
72 VBNV is stored in flash storage
73
Martin Roth8a3a3c82020-05-04 10:13:45 -060074config VBOOT_STARTS_BEFORE_BOOTBLOCK
75 def_bool n
76 select VBOOT_SEPARATE_VERSTAGE
77 help
78 Firmware verification happens before the main processor is brought
79 online.
80
Julius Werner58c39382017-02-13 17:53:29 -080081config VBOOT_STARTS_IN_BOOTBLOCK
82 bool
83 default n
84 help
85 Firmware verification happens during the end of or right after the
86 bootblock. This implies that a static VBOOT2_WORK() buffer must be
87 allocated in memlayout.
88
89config VBOOT_STARTS_IN_ROMSTAGE
90 bool
91 default n
92 depends on !VBOOT_STARTS_IN_BOOTBLOCK
93 help
94 Firmware verification happens during the end of romstage (after
Yu-Ping Wu214fb9b2020-02-14 17:16:53 +080095 memory initialization). This implies that the vboot work buffer is
96 in CBMEM from the start and doesn't need to be reserved in memlayout.
Julius Werner58c39382017-02-13 17:53:29 -080097
98config VBOOT_MOCK_SECDATA
99 bool "Mock secdata for firmware verification"
100 default n
101 help
102 Enabling VBOOT_MOCK_SECDATA will mock secdata for the firmware
103 verification to avoid access to a secdata storage (typically TPM).
104 All operations for a secdata storage will be successful. This option
105 can be used during development when a TPM is not present or broken.
106 THIS SHOULD NOT BE LEFT ON FOR PRODUCTION DEVICES.
107
108config VBOOT_DISABLE_DEV_ON_RECOVERY
109 bool
110 default n
111 help
112 When this option is enabled, the Chrome OS device leaves the
113 developer mode as soon as recovery request is detected. This is
114 handy on embedded devices with limited input capabilities.
115
116config VBOOT_SEPARATE_VERSTAGE
117 bool
118 default n
Martin Roth8a3a3c82020-05-04 10:13:45 -0600119 depends on VBOOT_STARTS_IN_BOOTBLOCK || VBOOT_STARTS_BEFORE_BOOTBLOCK
Julius Werner58c39382017-02-13 17:53:29 -0800120 help
121 If this option is set, vboot verification runs in a standalone stage
122 that is loaded from the bootblock and exits into romstage. If it is
123 not set, the verification code is linked directly into the bootblock
124 or the romstage and runs as part of that stage (cf. related options
125 VBOOT_STARTS_IN_BOOTBLOCK/_ROMSTAGE and VBOOT_RETURN_FROM_VERSTAGE).
126
127config VBOOT_RETURN_FROM_VERSTAGE
128 bool
129 default n
130 depends on VBOOT_SEPARATE_VERSTAGE
131 help
132 If this is set, the verstage returns back to the calling stage instead
133 of exiting to the succeeding stage so that the verstage space can be
134 reused by the succeeding stage. This is useful if a RAM space is too
135 small to fit both the verstage and the succeeding stage.
136
Joel Kitching6672bd82019-04-10 16:06:21 +0800137config VBOOT_MUST_REQUEST_DISPLAY
Julius Werner58c39382017-02-13 17:53:29 -0800138 bool
Julius Werner9993b6f2019-03-28 18:01:26 -0700139 default y if VGA_ROM_RUN
Julius Werner58c39382017-02-13 17:53:29 -0800140 default n
141 help
142 Set this option to indicate to vboot that this platform will skip its
143 display initialization on a normal (non-recovery, non-developer) boot.
Joel Kitching6672bd82019-04-10 16:06:21 +0800144 Unless display is specifically requested, the video option ROM is not
145 loaded, and any other native display initialization code is not run.
Julius Werner58c39382017-02-13 17:53:29 -0800146
Wim Vervoorne7087a12019-11-15 14:02:02 +0100147config VBOOT_ALWAYS_ENABLE_DISPLAY
148 bool "Force to always enable display"
149 default n
150 help
151 Set this option to indicate to vboot that display should always be enabled.
152
Wim Vervoorn50337f162020-01-14 16:18:27 +0100153config VBOOT_ALWAYS_ALLOW_UDC
154 bool "Always allow UDC"
155 default n
156 depends on !CHROMEOS
157 help
158 This option allows UDC to be enabled regardless of the vboot state.
159
Julius Werner58c39382017-02-13 17:53:29 -0800160config VBOOT_HAS_REC_HASH_SPACE
161 bool
Shelley Chen9f8ac642020-10-16 12:20:16 -0700162 default y if MRC_SAVE_HASH_IN_TPM && HAS_RECOVERY_MRC_CACHE
Julius Werner58c39382017-02-13 17:53:29 -0800163 default n
164 help
165 Set this option to indicate to vboot that recovery data hash space
166 is present in TPM.
167
Julius Werner58c39382017-02-13 17:53:29 -0800168config VBOOT_LID_SWITCH
169 bool
170 default n
171 help
172 Whether this platform has a lid switch. If it does, vboot will not
173 decrement try counters for boot failures if the lid is closed.
174
175config VBOOT_WIPEOUT_SUPPORTED
176 bool
177 default n
178 help
179 When this option is enabled, the firmware provides the ability to
180 signal the application the need for factory reset (a.k.a. wipe
181 out) of the device
182
183config VBOOT_FWID_MODEL
184 string "Firmware ID model"
Patrick Georgib8fba862020-06-17 21:06:53 +0200185 default "Google_\$(CONFIG_MAINBOARD_PART_NUMBER)" if CHROMEOS
186 default "\$(CONFIG_MAINBOARD_VENDOR)_\$(CONFIG_MAINBOARD_PART_NUMBER)"
Julius Werner58c39382017-02-13 17:53:29 -0800187 help
188 This is the first part of the FWID written to various regions of a
189 vboot firmware image to identify its version.
190
191config VBOOT_FWID_VERSION
192 string "Firmware ID version"
Patrick Georgib8fba862020-06-17 21:06:53 +0200193 default ".\$(KERNELVERSION)"
Julius Werner58c39382017-02-13 17:53:29 -0800194 help
195 This is the second part of the FWID written to various regions of a
196 vboot firmware image to identify its version.
197
Philipp Deppenwiese7410f8b2017-10-18 15:29:26 +0200198config VBOOT_NO_BOARD_SUPPORT
199 bool "Allow the use of vboot without board support"
200 default n
201 help
202 Enable weak functions for get_write_protect_state and
203 get_recovery_mode_switch in order to proceed with refactoring
204 of the vboot2 code base. Later on this code is removed and replaced
205 by interfaces.
206
Martin Rothbbd5ee412017-10-05 13:53:16 -0600207config RO_REGION_ONLY
208 string "Additional files that should not be copied to RW"
209 default ""
210 help
211 Add a space delimited list of filenames that should only be in the
212 RO section.
213
Wim Vervoorna1c259b2019-11-01 10:47:01 +0100214config RW_REGION_ONLY
215 string
216 default ""
217 depends on VBOOT_SLOTS_RW_A
218 help
219 Add a space delimited list of filenames that should only be in the
220 RW sections.
Wim Vervoorn114e2e82019-11-05 14:09:16 +0100221
Martin Roth63036712020-06-25 17:20:32 -0600222config RWA_REGION_ONLY
223 string
224 default ""
225 depends on VBOOT_SLOTS_RW_AB
226 help
227 Add a space-delimited list of filenames that should only be in the
228 RW-A section.
229
230config RWB_REGION_ONLY
231 string
232 default ""
233 depends on VBOOT_SLOTS_RW_AB
234 help
235 Add a space-delimited list of filenames that should only be in the
236 RW-B section.
237
Julius Werner40acfe72021-05-12 15:59:58 -0700238config CBFS_MCACHE_RW_PERCENTAGE
239 int "Percentage of CBFS metadata cache used for RW CBFS"
240 depends on !NO_CBFS_MCACHE
241 default 50
242 help
243 The amount of the CBFS_MCACHE area that's used for the RW CBFS, in
244 percent from 0 to 100. The remaining area will be used for the RO
245 CBFS. Default is an even 50/50 split. When VBOOT is disabled, this
246 will automatically be 0 (meaning the whole MCACHE is used for RO).
247 Do NOT change this value for vboot RW updates!
248
Wim Vervoorn114e2e82019-11-05 14:09:16 +0100249config VBOOT_ENABLE_CBFS_FALLBACK
250 bool
251 default n
252 depends on VBOOT_SLOTS_RW_A
253 help
Julius Werner9f376472021-08-11 18:20:11 -0700254 When this option is enabled, the CBFS code will look for a file in the
255 RO (COREBOOT) region if it isn't available in the active RW region.
Wim Vervoorn114e2e82019-11-05 14:09:16 +0100256
Tim Wawrzynczakd6fc5572019-10-25 14:58:15 -0600257config VBOOT_EARLY_EC_SYNC
258 bool
259 default n
260 depends on EC_GOOGLE_CHROMEEC
261 help
262 Enables CrOS EC software sync in romstage, before memory training
263 runs. This is useful mainly as a way to achieve full USB-PD
264 negotiation earlier in the boot flow, as the EC will only do this once
265 it has made the sysjump to its RW firmware. It should not
266 significantly impact boot time, as this operation will be performed
267 later in the boot flow if it is disabled here.
268
Sam McNallyeded5002020-03-04 16:08:06 +1100269config VBOOT_EC_EFS
270 bool "Early firmware selection (EFS) EC"
271 default n
272 help
273 CrosEC can support EFS: Early Firmware Selection. If it's enabled,
274 software sync needs to also support it. This setting tells vboot to
275 perform EFS software sync.
276
Subrata Banik94790372021-06-17 19:27:12 +0530277config VBOOT_X86_SHA256_ACCELERATION
278 bool "Use sha extension for sha256 hash calculation"
279 default n
280 depends on ARCH_X86
281 help
282 Use sha256msg1, sha256msg2, sha256rnds2 instruction to accelerate
283 SHA hash calculation in vboot.
284
Karthikeyan Ramasubramanian4fcf13a2021-11-17 17:33:08 -0700285config VBOOT_DEFINE_WIDEVINE_COUNTERS
286 bool
287 default n
288 help
289 Set up Widevine Secure Counters in TPM NVRAM by defining space. Enabling this
290 config will only define the counter space. Counters need to be incremented
291 separately before any read operation is performed on them.
292
Julius Werner5eda52a2022-05-19 14:37:21 -0700293config VBOOT_HASH_BLOCK_SIZE
294 hex
295 default 0x400
296 help
297 Set the default hash size. Generally 1k is reasonable, but in some
298 cases it may improve hashing speed to increase the size.
299
300 Note that this buffer is allocated in the stack. Although the
301 build should fail if the stack size is exceeded, it's something to
302 be aware of when changing the size.
303
304config VBOOT_GSCVD
305 bool "Generate GSC verification data"
306 depends on TPM_GOOGLE
307 select CBFS_VERIFICATION
308 default n if TPM_GOOGLE_CR50
309 default y
310 help
311 Generate a Google Security Chip Verification Data (GSCVD) structure on the flash to
312 allow the GSC to verify the CBFS verification anchor. Used by default with Ti50 GSCs.
313 Requires an RO_GSCVD FMAP section.
314
315config VBOOT_GSC_BOARD_ID
316 string
317 depends on VBOOT_GSCVD
318 default "ZZCR"
319 help
320 GSC board ID to be embedded in the GSCVD. Usually each specific mainboard variant
321 has its own. Google engineers can find these in the go/cros-dlm database ("Products").
322 (Note: This is a completely separate thing from coreboot's `board_id()` function.)
323
Julius Werner58c39382017-02-13 17:53:29 -0800324menu "GBB configuration"
325
326config GBB_HWID
327 string "Hardware ID"
Hung-Te Lin117453e2019-09-27 12:23:20 +0800328 default ""
329 help
330 A hardware identifier for device. On Chrome OS this is used for auto
331 update and recovery, and will be generated when manufacturing by the
332 factory software, in a strictly defined format.
333 Leave empty to get a test-only Chrome OS HWID v2 string generated.
Julius Werner58c39382017-02-13 17:53:29 -0800334
335config GBB_BMPFV_FILE
336 string "Path to bmpfv image"
337 default ""
338
339config GBB_FLAG_DEV_SCREEN_SHORT_DELAY
340 bool "Reduce dev screen delay"
341 default n
342
343config GBB_FLAG_LOAD_OPTION_ROMS
344 bool "Load option ROMs"
345 default n
346
347config GBB_FLAG_ENABLE_ALTERNATE_OS
348 bool "Allow booting a non-Chrome OS kernel if dev switch is on"
349 default n
350
351config GBB_FLAG_FORCE_DEV_SWITCH_ON
352 bool "Force dev switch on"
353 default n
354
355config GBB_FLAG_FORCE_DEV_BOOT_USB
356 bool "Allow booting from USB in dev mode even if dev_boot_usb=0"
357 default y
358
359config GBB_FLAG_DISABLE_FW_ROLLBACK_CHECK
360 bool "Disable firmware rollback protection"
361 default y
362
363config GBB_FLAG_ENTER_TRIGGERS_TONORM
364 bool "Return to normal boot with Enter"
365 default n
366
Joel Kitchinga904fd62021-02-19 18:10:58 +0800367config GBB_FLAG_FORCE_DEV_BOOT_ALTFW
368 bool "Allow booting altfw in dev mode even if dev_boot_altfw=0"
Julius Werner58c39382017-02-13 17:53:29 -0800369 default n
370
Joel Kitching984d0c62019-12-04 15:33:57 +0800371config GBB_FLAG_RUNNING_FAFT
372 bool "Running FAFT tests; used as a hint to disable other debug features"
Julius Werner58c39382017-02-13 17:53:29 -0800373 default n
374
375config GBB_FLAG_DISABLE_EC_SOFTWARE_SYNC
376 bool "Disable EC software sync"
377 default n
378
Joel Kitchinga904fd62021-02-19 18:10:58 +0800379config GBB_FLAG_DEFAULT_DEV_BOOT_ALTFW
380 bool "Default to booting altfw in dev mode"
Julius Werner58c39382017-02-13 17:53:29 -0800381 default n
382
383config GBB_FLAG_DISABLE_PD_SOFTWARE_SYNC
384 bool "Disable PD software sync"
385 default n
386
387config GBB_FLAG_DISABLE_LID_SHUTDOWN
388 bool "Disable shutdown on closed lid"
389 default n
390
Julius Wernerae423852018-03-23 21:02:48 -0700391config GBB_FLAG_FORCE_MANUAL_RECOVERY
392 bool "Always assume manual recovery in recovery mode"
393 default n
394
395config GBB_FLAG_DISABLE_FWMP
396 bool "Disable Firmware Management Parameters (FWMP)"
Julius Werner58c39382017-02-13 17:53:29 -0800397 default n
398
Eric Lai1cf24272021-01-29 16:14:37 +0800399config GBB_FLAG_ENABLE_UDC
400 bool "Enable USB Device Controller"
401 default n
402
Julius Werner58c39382017-02-13 17:53:29 -0800403endmenu # GBB
404
405menu "Vboot Keys"
406config VBOOT_ROOT_KEY
407 string "Root key (public)"
Patrick Georgib8fba862020-06-17 21:06:53 +0200408 default "\$(VBOOT_SOURCE)/tests/devkeys/root_key.vbpubk"
Julius Werner58c39382017-02-13 17:53:29 -0800409
410config VBOOT_RECOVERY_KEY
411 string "Recovery key (public)"
Patrick Georgib8fba862020-06-17 21:06:53 +0200412 default "\$(VBOOT_SOURCE)/tests/devkeys/recovery_key.vbpubk"
Julius Werner58c39382017-02-13 17:53:29 -0800413
414config VBOOT_FIRMWARE_PRIVKEY
415 string "Firmware key (private)"
Patrick Georgib8fba862020-06-17 21:06:53 +0200416 default "\$(VBOOT_SOURCE)/tests/devkeys/firmware_data_key.vbprivk"
Julius Werner58c39382017-02-13 17:53:29 -0800417
418config VBOOT_KERNEL_KEY
419 string "Kernel subkey (public)"
Patrick Georgib8fba862020-06-17 21:06:53 +0200420 default "\$(VBOOT_SOURCE)/tests/devkeys/kernel_subkey.vbpubk"
Julius Werner58c39382017-02-13 17:53:29 -0800421
422config VBOOT_KEYBLOCK
423 string "Keyblock to use for the RW regions"
Patrick Georgib8fba862020-06-17 21:06:53 +0200424 default "\$(VBOOT_SOURCE)/tests/devkeys/firmware.keyblock"
Julius Werner58c39382017-02-13 17:53:29 -0800425
426config VBOOT_KEYBLOCK_VERSION
427 int "Keyblock version number"
428 default 1
429
430config VBOOT_KEYBLOCK_PREAMBLE_FLAGS
431 hex "Keyblock preamble flags"
432 default 0x0
433
Julius Werner5eda52a2022-05-19 14:37:21 -0700434if VBOOT_GSCVD
Martin Roth8839b7f2020-10-28 11:38:57 -0600435
Julius Werner5eda52a2022-05-19 14:37:21 -0700436config VBOOT_GSCVD_ROOT_PUBKEY
437 string "GSCVD root key (public)"
438 default "\$(VBOOT_SOURCE)/tests/devkeys/arv_root.vbpubk"
439
440config VBOOT_GSCVD_PLATFORM_PRIVKEY
441 string "GSCVD platform key (private)"
442 default "\$(VBOOT_SOURCE)/tests/devkeys/arv_platform.vbprivk"
443
444config VBOOT_GSCVD_PLATFORM_KEYBLOCK
445 string "GSCVD platform keyblock (public)"
446 default "\$(VBOOT_SOURCE)/tests/devkeys/arv_platform.keyblock"
447
448endif # VBOOT_GSCVD
Martin Roth8839b7f2020-10-28 11:38:57 -0600449
Julius Werner58c39382017-02-13 17:53:29 -0800450endmenu # Keys
451endif # VBOOT
452endmenu # Verified Boot (vboot)