Daisuke Nojiri | 742fc8d | 2014-10-10 10:51:06 -0700 | [diff] [blame] | 1 | ## This file is part of the coreboot project. |
| 2 | ## |
| 3 | ## Copyright (C) 2014 The ChromiumOS Authors. All rights reserved. |
| 4 | ## |
| 5 | ## This program is free software; you can redistribute it and/or modify |
| 6 | ## it under the terms of the GNU General Public License as published by |
| 7 | ## the Free Software Foundation; version 2 of the License. |
| 8 | ## |
| 9 | ## This program is distributed in the hope that it will be useful, |
| 10 | ## but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 11 | ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 12 | ## GNU General Public License for more details. |
| 13 | ## |
Daisuke Nojiri | 742fc8d | 2014-10-10 10:51:06 -0700 | [diff] [blame] | 14 | |
Julius Werner | 58c3938 | 2017-02-13 17:53:29 -0800 | [diff] [blame] | 15 | menu "Verified Boot (vboot)" |
Lee Leahy | 33efd98 | 2017-03-13 17:25:36 -0700 | [diff] [blame] | 16 | |
Furquan Shaikh | 2a12e2e | 2016-07-25 11:48:03 -0700 | [diff] [blame] | 17 | config VBOOT |
| 18 | bool "Verify firmware with vboot." |
| 19 | default n |
Furquan Shaikh | 00f360e | 2017-04-25 22:32:34 -0700 | [diff] [blame] | 20 | select TPM if !MAINBOARD_HAS_TPM2 && !VBOOT_MOCK_SECDATA |
| 21 | select TPM2 if MAINBOARD_HAS_TPM2 && !VBOOT_MOCK_SECDATA |
Julius Werner | 4157bd8 | 2016-08-15 16:10:27 -0700 | [diff] [blame] | 22 | select TPM_INIT_FAILURE_IS_FATAL if PC80_SYSTEM && LPC_TPM |
| 23 | select SKIP_TPM_STARTUP_ON_NORMAL_BOOT if PC80_SYSTEM && LPC_TPM |
Furquan Shaikh | 2a12e2e | 2016-07-25 11:48:03 -0700 | [diff] [blame] | 24 | depends on HAVE_HARD_RESET |
| 25 | help |
| 26 | Enabling VBOOT will use vboot to verify the components of the firmware |
| 27 | (stages, payload, etc). |
Julius Werner | 58c3938 | 2017-02-13 17:53:29 -0800 | [diff] [blame] | 28 | |
| 29 | if VBOOT |
| 30 | |
| 31 | config VBOOT_VBNV_CMOS |
| 32 | bool |
| 33 | default n |
| 34 | depends on PC80_SYSTEM |
| 35 | help |
| 36 | VBNV is stored in CMOS |
| 37 | |
| 38 | config VBOOT_VBNV_OFFSET |
| 39 | hex |
| 40 | default 0x26 |
| 41 | depends on VBOOT_VBNV_CMOS |
| 42 | help |
| 43 | CMOS offset for VbNv data. This value must match cmos.layout |
| 44 | in the mainboard directory, minus 14 bytes for the RTC. |
| 45 | |
| 46 | config VBOOT_VBNV_CMOS_BACKUP_TO_FLASH |
| 47 | bool |
| 48 | default n |
| 49 | depends on VBOOT_VBNV_CMOS && BOOT_DEVICE_SUPPORTS_WRITES |
| 50 | help |
| 51 | Vboot non-volatile storage data will be backed up from CMOS to flash |
| 52 | and restored from flash if the CMOS is invalid due to power loss. |
| 53 | |
| 54 | config VBOOT_VBNV_EC |
| 55 | bool |
| 56 | default n |
| 57 | help |
| 58 | VBNV is stored in EC |
| 59 | |
| 60 | config VBOOT_VBNV_FLASH |
| 61 | bool |
| 62 | default n |
| 63 | depends on BOOT_DEVICE_SUPPORTS_WRITES |
| 64 | help |
| 65 | VBNV is stored in flash storage |
| 66 | |
| 67 | config VBOOT_STARTS_IN_BOOTBLOCK |
| 68 | bool |
| 69 | default n |
Aaron Durbin | 318fb80 | 2018-05-01 20:54:53 -0600 | [diff] [blame] | 70 | depends on C_ENVIRONMENT_BOOTBLOCK |
Julius Werner | 58c3938 | 2017-02-13 17:53:29 -0800 | [diff] [blame] | 71 | help |
| 72 | Firmware verification happens during the end of or right after the |
| 73 | bootblock. This implies that a static VBOOT2_WORK() buffer must be |
| 74 | allocated in memlayout. |
| 75 | |
| 76 | config VBOOT_STARTS_IN_ROMSTAGE |
| 77 | bool |
| 78 | default n |
| 79 | depends on !VBOOT_STARTS_IN_BOOTBLOCK |
| 80 | help |
| 81 | Firmware verification happens during the end of romstage (after |
| 82 | memory initialization). This implies that vboot working data is |
| 83 | allocated in CBMEM. |
| 84 | |
| 85 | config VBOOT_MOCK_SECDATA |
| 86 | bool "Mock secdata for firmware verification" |
| 87 | default n |
| 88 | help |
| 89 | Enabling VBOOT_MOCK_SECDATA will mock secdata for the firmware |
| 90 | verification to avoid access to a secdata storage (typically TPM). |
| 91 | All operations for a secdata storage will be successful. This option |
| 92 | can be used during development when a TPM is not present or broken. |
| 93 | THIS SHOULD NOT BE LEFT ON FOR PRODUCTION DEVICES. |
| 94 | |
| 95 | config VBOOT_DISABLE_DEV_ON_RECOVERY |
| 96 | bool |
| 97 | default n |
| 98 | help |
| 99 | When this option is enabled, the Chrome OS device leaves the |
| 100 | developer mode as soon as recovery request is detected. This is |
| 101 | handy on embedded devices with limited input capabilities. |
| 102 | |
| 103 | config VBOOT_SEPARATE_VERSTAGE |
| 104 | bool |
| 105 | default n |
| 106 | depends on VBOOT_STARTS_IN_BOOTBLOCK |
| 107 | help |
| 108 | If this option is set, vboot verification runs in a standalone stage |
| 109 | that is loaded from the bootblock and exits into romstage. If it is |
| 110 | not set, the verification code is linked directly into the bootblock |
| 111 | or the romstage and runs as part of that stage (cf. related options |
| 112 | VBOOT_STARTS_IN_BOOTBLOCK/_ROMSTAGE and VBOOT_RETURN_FROM_VERSTAGE). |
| 113 | |
| 114 | config VBOOT_RETURN_FROM_VERSTAGE |
| 115 | bool |
| 116 | default n |
| 117 | depends on VBOOT_SEPARATE_VERSTAGE |
| 118 | help |
| 119 | If this is set, the verstage returns back to the calling stage instead |
| 120 | of exiting to the succeeding stage so that the verstage space can be |
| 121 | reused by the succeeding stage. This is useful if a RAM space is too |
| 122 | small to fit both the verstage and the succeeding stage. |
| 123 | |
| 124 | config VBOOT_SAVE_RECOVERY_REASON_ON_REBOOT |
| 125 | bool |
| 126 | default n |
| 127 | help |
| 128 | This option ensures that the recovery request is not lost because of |
| 129 | reboots caused after vboot verification is run. e.g. reboots caused by |
| 130 | FSP components on Intel platforms. |
| 131 | |
| 132 | config VBOOT_OPROM_MATTERS |
| 133 | bool |
| 134 | default n |
| 135 | help |
| 136 | Set this option to indicate to vboot that this platform will skip its |
| 137 | display initialization on a normal (non-recovery, non-developer) boot. |
| 138 | Vboot calls this "oprom matters" because on x86 devices this |
| 139 | traditionally meant that the video option ROM will not be loaded, but |
| 140 | it works functionally the same for other platforms that can skip their |
| 141 | native display initialization code instead. |
| 142 | |
| 143 | config VBOOT_HAS_REC_HASH_SPACE |
| 144 | bool |
| 145 | default n |
| 146 | help |
| 147 | Set this option to indicate to vboot that recovery data hash space |
| 148 | is present in TPM. |
| 149 | |
| 150 | config VBOOT_SOFT_REBOOT_WORKAROUND |
| 151 | bool |
| 152 | default n |
| 153 | |
| 154 | config VBOOT_EC_SOFTWARE_SYNC |
| 155 | bool "Enable EC software sync" |
| 156 | default y if EC_GOOGLE_CHROMEEC |
| 157 | default n |
| 158 | help |
| 159 | EC software sync is a mechanism where the AP helps the EC verify its |
| 160 | firmware similar to how vboot verifies the main system firmware. This |
| 161 | option selects whether vboot should support EC software sync. |
| 162 | |
| 163 | config VBOOT_EC_SLOW_UPDATE |
| 164 | bool |
| 165 | default n |
| 166 | depends on VBOOT_EC_SOFTWARE_SYNC |
| 167 | help |
| 168 | Whether the EC (or PD) is slow to update and needs to display a |
| 169 | screen that informs the user the update is happening. |
| 170 | |
Daisuke Nojiri | 6732b4f | 2017-08-18 13:05:56 -0700 | [diff] [blame] | 171 | config VBOOT_EC_EFS |
| 172 | bool |
| 173 | default n |
| 174 | depends on VBOOT_EC_SOFTWARE_SYNC |
| 175 | help |
| 176 | CrosEC can support EFS: Early Firmware Selection. If it's enabled, |
| 177 | software sync need to also support it. This setting tells vboot to |
| 178 | perform EFS software sync. |
| 179 | |
Julius Werner | 58c3938 | 2017-02-13 17:53:29 -0800 | [diff] [blame] | 180 | config VBOOT_PHYSICAL_DEV_SWITCH |
| 181 | bool |
| 182 | default n |
| 183 | help |
| 184 | Whether this platform has a physical developer switch. Note that this |
| 185 | disables virtual dev switch functionality (through secdata). Operation |
| 186 | where both a physical pin and the virtual switch get sampled is not |
| 187 | supported by coreboot. |
| 188 | |
| 189 | config VBOOT_PHYSICAL_REC_SWITCH |
| 190 | bool |
| 191 | default n |
| 192 | help |
| 193 | Whether this platform has a physical recovery switch. |
| 194 | |
| 195 | config VBOOT_LID_SWITCH |
| 196 | bool |
| 197 | default n |
| 198 | help |
| 199 | Whether this platform has a lid switch. If it does, vboot will not |
| 200 | decrement try counters for boot failures if the lid is closed. |
| 201 | |
| 202 | config VBOOT_WIPEOUT_SUPPORTED |
| 203 | bool |
| 204 | default n |
| 205 | help |
| 206 | When this option is enabled, the firmware provides the ability to |
| 207 | signal the application the need for factory reset (a.k.a. wipe |
| 208 | out) of the device |
| 209 | |
| 210 | config VBOOT_FWID_MODEL |
| 211 | string "Firmware ID model" |
Furquan Shaikh | c18aa1c | 2017-09-08 15:14:30 -0700 | [diff] [blame] | 212 | default "Google_$(CONFIG_MAINBOARD_PART_NUMBER)" if CHROMEOS |
Julius Werner | 58c3938 | 2017-02-13 17:53:29 -0800 | [diff] [blame] | 213 | default "$(CONFIG_MAINBOARD_VENDOR)_$(CONFIG_MAINBOARD_PART_NUMBER)" |
| 214 | help |
| 215 | This is the first part of the FWID written to various regions of a |
| 216 | vboot firmware image to identify its version. |
| 217 | |
| 218 | config VBOOT_FWID_VERSION |
| 219 | string "Firmware ID version" |
Julius Werner | 46f292f | 2017-04-27 16:29:02 -0700 | [diff] [blame] | 220 | default ".$(KERNELVERSION)" |
Julius Werner | 58c3938 | 2017-02-13 17:53:29 -0800 | [diff] [blame] | 221 | help |
| 222 | This is the second part of the FWID written to various regions of a |
| 223 | vboot firmware image to identify its version. |
| 224 | |
Philipp Deppenwiese | 7410f8b | 2017-10-18 15:29:26 +0200 | [diff] [blame] | 225 | config VBOOT_NO_BOARD_SUPPORT |
| 226 | bool "Allow the use of vboot without board support" |
| 227 | default n |
| 228 | help |
| 229 | Enable weak functions for get_write_protect_state and |
| 230 | get_recovery_mode_switch in order to proceed with refactoring |
| 231 | of the vboot2 code base. Later on this code is removed and replaced |
| 232 | by interfaces. |
| 233 | |
Martin Roth | bbd5ee41 | 2017-10-05 13:53:16 -0600 | [diff] [blame] | 234 | config RO_REGION_ONLY |
| 235 | string "Additional files that should not be copied to RW" |
| 236 | default "" |
| 237 | help |
| 238 | Add a space delimited list of filenames that should only be in the |
| 239 | RO section. |
| 240 | |
Julius Werner | 58c3938 | 2017-02-13 17:53:29 -0800 | [diff] [blame] | 241 | menu "GBB configuration" |
| 242 | |
| 243 | config GBB_HWID |
| 244 | string "Hardware ID" |
| 245 | default "NOCONF HWID" |
| 246 | |
| 247 | config GBB_BMPFV_FILE |
| 248 | string "Path to bmpfv image" |
| 249 | default "" |
| 250 | |
| 251 | config GBB_FLAG_DEV_SCREEN_SHORT_DELAY |
| 252 | bool "Reduce dev screen delay" |
| 253 | default n |
| 254 | |
| 255 | config GBB_FLAG_LOAD_OPTION_ROMS |
| 256 | bool "Load option ROMs" |
| 257 | default n |
| 258 | |
| 259 | config GBB_FLAG_ENABLE_ALTERNATE_OS |
| 260 | bool "Allow booting a non-Chrome OS kernel if dev switch is on" |
| 261 | default n |
| 262 | |
| 263 | config GBB_FLAG_FORCE_DEV_SWITCH_ON |
| 264 | bool "Force dev switch on" |
| 265 | default n |
| 266 | |
| 267 | config GBB_FLAG_FORCE_DEV_BOOT_USB |
| 268 | bool "Allow booting from USB in dev mode even if dev_boot_usb=0" |
| 269 | default y |
| 270 | |
| 271 | config GBB_FLAG_DISABLE_FW_ROLLBACK_CHECK |
| 272 | bool "Disable firmware rollback protection" |
| 273 | default y |
| 274 | |
| 275 | config GBB_FLAG_ENTER_TRIGGERS_TONORM |
| 276 | bool "Return to normal boot with Enter" |
| 277 | default n |
| 278 | |
| 279 | config GBB_FLAG_FORCE_DEV_BOOT_LEGACY |
| 280 | bool "Allow booting to legacy in dev mode even if dev_boot_legacy=0" |
| 281 | default n |
| 282 | |
| 283 | config GBB_FLAG_FAFT_KEY_OVERIDE |
| 284 | bool "Allow booting using alternative keys for FAFT servo testing" |
| 285 | default n |
| 286 | |
| 287 | config GBB_FLAG_DISABLE_EC_SOFTWARE_SYNC |
| 288 | bool "Disable EC software sync" |
| 289 | default n |
| 290 | |
| 291 | config GBB_FLAG_DEFAULT_DEV_BOOT_LEGACY |
| 292 | bool "Default to booting to legacy in dev mode" |
| 293 | default n |
| 294 | |
| 295 | config GBB_FLAG_DISABLE_PD_SOFTWARE_SYNC |
| 296 | bool "Disable PD software sync" |
| 297 | default n |
| 298 | |
| 299 | config GBB_FLAG_DISABLE_LID_SHUTDOWN |
| 300 | bool "Disable shutdown on closed lid" |
| 301 | default n |
| 302 | |
| 303 | config GBB_FLAG_FORCE_DEV_BOOT_FASTBOOT_FULL_CAP |
| 304 | bool "Allow fastboot even if dev_boot_fastboot_full_cap=0" |
| 305 | default n |
| 306 | |
Julius Werner | ae42385 | 2018-03-23 21:02:48 -0700 | [diff] [blame] | 307 | config GBB_FLAG_FORCE_MANUAL_RECOVERY |
| 308 | bool "Always assume manual recovery in recovery mode" |
| 309 | default n |
| 310 | |
| 311 | config GBB_FLAG_DISABLE_FWMP |
| 312 | bool "Disable Firmware Management Parameters (FWMP)" |
Julius Werner | 58c3938 | 2017-02-13 17:53:29 -0800 | [diff] [blame] | 313 | default n |
| 314 | |
| 315 | endmenu # GBB |
| 316 | |
| 317 | menu "Vboot Keys" |
| 318 | config VBOOT_ROOT_KEY |
| 319 | string "Root key (public)" |
| 320 | default "$(VBOOT_SOURCE)/tests/devkeys/root_key.vbpubk" |
| 321 | |
| 322 | config VBOOT_RECOVERY_KEY |
| 323 | string "Recovery key (public)" |
| 324 | default "$(VBOOT_SOURCE)/tests/devkeys/recovery_key.vbpubk" |
| 325 | |
| 326 | config VBOOT_FIRMWARE_PRIVKEY |
| 327 | string "Firmware key (private)" |
| 328 | default "$(VBOOT_SOURCE)/tests/devkeys/firmware_data_key.vbprivk" |
| 329 | |
| 330 | config VBOOT_KERNEL_KEY |
| 331 | string "Kernel subkey (public)" |
| 332 | default "$(VBOOT_SOURCE)/tests/devkeys/kernel_subkey.vbpubk" |
| 333 | |
| 334 | config VBOOT_KEYBLOCK |
| 335 | string "Keyblock to use for the RW regions" |
| 336 | default "$(VBOOT_SOURCE)/tests/devkeys/firmware.keyblock" |
| 337 | |
| 338 | config VBOOT_KEYBLOCK_VERSION |
| 339 | int "Keyblock version number" |
| 340 | default 1 |
| 341 | |
| 342 | config VBOOT_KEYBLOCK_PREAMBLE_FLAGS |
| 343 | hex "Keyblock preamble flags" |
| 344 | default 0x0 |
| 345 | |
| 346 | endmenu # Keys |
| 347 | endif # VBOOT |
| 348 | endmenu # Verified Boot (vboot) |