Aaron Durbin | 588ad7b | 2015-09-29 17:56:59 -0500 | [diff] [blame] | 1 | /* |
| 2 | * This file is part of the coreboot project. |
| 3 | * |
| 4 | * Copyright 2014 Google Inc. |
| 5 | * |
| 6 | * This program is free software; you can redistribute it and/or modify |
| 7 | * it under the terms of the GNU General Public License as published by |
| 8 | * the Free Software Foundation; version 2 of the License. |
| 9 | * |
| 10 | * This program is distributed in the hope that it will be useful, |
| 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 13 | * GNU General Public License for more details. |
Aaron Durbin | 588ad7b | 2015-09-29 17:56:59 -0500 | [diff] [blame] | 14 | */ |
| 15 | |
| 16 | #include <antirollback.h> |
| 17 | #include <arch/exception.h> |
| 18 | #include <assert.h> |
Furquan Shaikh | 2a12e2e | 2016-07-25 11:48:03 -0700 | [diff] [blame] | 19 | #include <bootmode.h> |
Aaron Durbin | 588ad7b | 2015-09-29 17:56:59 -0500 | [diff] [blame] | 20 | #include <console/console.h> |
| 21 | #include <console/vtxprintf.h> |
| 22 | #include <delay.h> |
| 23 | #include <string.h> |
| 24 | #include <timestamp.h> |
| 25 | #include <vb2_api.h> |
Furquan Shaikh | 2a12e2e | 2016-07-25 11:48:03 -0700 | [diff] [blame] | 26 | #include <vboot/misc.h> |
| 27 | #include <vboot/vbnv.h> |
Aaron Durbin | 588ad7b | 2015-09-29 17:56:59 -0500 | [diff] [blame] | 28 | |
Aaron Durbin | 87c9fae | 2016-01-22 15:26:04 -0600 | [diff] [blame] | 29 | /* The max hash size to expect is for SHA512. */ |
| 30 | #define VBOOT_MAX_HASH_SIZE VB2_SHA512_DIGEST_SIZE |
| 31 | |
Aaron Durbin | 588ad7b | 2015-09-29 17:56:59 -0500 | [diff] [blame] | 32 | #define TODO_BLOCK_SIZE 1024 |
| 33 | |
| 34 | static int is_slot_a(struct vb2_context *ctx) |
| 35 | { |
| 36 | return !(ctx->flags & VB2_CONTEXT_FW_SLOT_B); |
| 37 | } |
| 38 | |
| 39 | /* exports */ |
| 40 | |
| 41 | void vb2ex_printf(const char *func, const char *fmt, ...) |
| 42 | { |
| 43 | va_list args; |
| 44 | |
Randall Spangler | e80c6f6 | 2017-01-20 14:48:53 -0800 | [diff] [blame] | 45 | if (func) |
| 46 | printk(BIOS_INFO, "VB2:%s() ", func); |
| 47 | |
Aaron Durbin | 588ad7b | 2015-09-29 17:56:59 -0500 | [diff] [blame] | 48 | va_start(args, fmt); |
| 49 | do_printk_va_list(BIOS_INFO, fmt, args); |
| 50 | va_end(args); |
| 51 | |
| 52 | return; |
| 53 | } |
| 54 | |
| 55 | int vb2ex_tpm_clear_owner(struct vb2_context *ctx) |
| 56 | { |
| 57 | uint32_t rv; |
| 58 | printk(BIOS_INFO, "Clearing TPM owner\n"); |
| 59 | rv = tpm_clear_and_reenable(); |
| 60 | if (rv) |
| 61 | return VB2_ERROR_EX_TPM_CLEAR_OWNER; |
| 62 | return VB2_SUCCESS; |
| 63 | } |
| 64 | |
| 65 | int vb2ex_read_resource(struct vb2_context *ctx, |
| 66 | enum vb2_resource_index index, |
| 67 | uint32_t offset, |
| 68 | void *buf, |
| 69 | uint32_t size) |
| 70 | { |
| 71 | struct region_device rdev; |
| 72 | const char *name; |
| 73 | |
| 74 | switch (index) { |
| 75 | case VB2_RES_GBB: |
| 76 | name = "GBB"; |
| 77 | break; |
| 78 | case VB2_RES_FW_VBLOCK: |
| 79 | if (is_slot_a(ctx)) |
| 80 | name = "VBLOCK_A"; |
| 81 | else |
| 82 | name = "VBLOCK_B"; |
| 83 | break; |
| 84 | default: |
| 85 | return VB2_ERROR_EX_READ_RESOURCE_INDEX; |
| 86 | } |
| 87 | |
| 88 | if (vboot_named_region_device(name, &rdev)) |
| 89 | return VB2_ERROR_EX_READ_RESOURCE_SIZE; |
| 90 | |
| 91 | if (rdev_readat(&rdev, buf, offset, size) != size) |
| 92 | return VB2_ERROR_EX_READ_RESOURCE_SIZE; |
| 93 | |
| 94 | return VB2_SUCCESS; |
| 95 | } |
| 96 | |
| 97 | /* No-op stubs that can be overridden by SoCs with hardware crypto support. */ |
| 98 | __attribute__((weak)) |
| 99 | int vb2ex_hwcrypto_digest_init(enum vb2_hash_algorithm hash_alg, |
| 100 | uint32_t data_size) |
| 101 | { |
| 102 | return VB2_ERROR_EX_HWCRYPTO_UNSUPPORTED; |
| 103 | } |
| 104 | |
| 105 | __attribute__((weak)) |
| 106 | int vb2ex_hwcrypto_digest_extend(const uint8_t *buf, uint32_t size) |
| 107 | { |
| 108 | BUG(); /* Should never get called if init() returned an error. */ |
| 109 | return VB2_ERROR_UNKNOWN; |
| 110 | } |
| 111 | |
| 112 | __attribute__((weak)) |
| 113 | int vb2ex_hwcrypto_digest_finalize(uint8_t *digest, uint32_t digest_size) |
| 114 | { |
| 115 | BUG(); /* Should never get called if init() returned an error. */ |
| 116 | return VB2_ERROR_UNKNOWN; |
| 117 | } |
| 118 | |
Aaron Durbin | 87c9fae | 2016-01-22 15:26:04 -0600 | [diff] [blame] | 119 | static int handle_digest_result(void *slot_hash, size_t slot_hash_sz) |
| 120 | { |
| 121 | int is_resume; |
| 122 | |
| 123 | /* |
Naresh G Solanki | 1d04d16 | 2016-11-08 00:27:41 +0530 | [diff] [blame] | 124 | * Chrome EC is the only support for vboot_save_hash() & |
| 125 | * vboot_retrieve_hash(), if Chrome EC is not enabled then return. |
Naresh G Solanki | 3d44d69 | 2016-11-06 12:51:14 +0530 | [diff] [blame] | 126 | */ |
| 127 | if (!IS_ENABLED(CONFIG_EC_GOOGLE_CHROMEEC)) |
| 128 | return 0; |
| 129 | |
| 130 | /* |
Aaron Durbin | 87c9fae | 2016-01-22 15:26:04 -0600 | [diff] [blame] | 131 | * Nothing to do since resuming on the platform doesn't require |
| 132 | * vboot verification again. |
| 133 | */ |
| 134 | if (!IS_ENABLED(CONFIG_RESUME_PATH_SAME_AS_BOOT)) |
| 135 | return 0; |
| 136 | |
| 137 | /* |
| 138 | * Assume that if vboot doesn't start in bootblock verified |
| 139 | * RW memory init code is not employed. i.e. memory init code |
| 140 | * lives in RO CBFS. |
| 141 | */ |
| 142 | if (!IS_ENABLED(CONFIG_VBOOT_STARTS_IN_BOOTBLOCK)) |
| 143 | return 0; |
| 144 | |
| 145 | is_resume = vboot_platform_is_resuming(); |
| 146 | |
| 147 | if (is_resume > 0) { |
| 148 | uint8_t saved_hash[VBOOT_MAX_HASH_SIZE]; |
| 149 | const size_t saved_hash_sz = sizeof(saved_hash); |
| 150 | |
| 151 | assert(slot_hash_sz == saved_hash_sz); |
| 152 | |
| 153 | printk(BIOS_DEBUG, "Platform is resuming.\n"); |
| 154 | |
| 155 | if (vboot_retrieve_hash(saved_hash, saved_hash_sz)) { |
| 156 | printk(BIOS_ERR, "Couldn't retrieve saved hash.\n"); |
| 157 | return -1; |
| 158 | } |
| 159 | |
| 160 | if (memcmp(saved_hash, slot_hash, slot_hash_sz)) { |
| 161 | printk(BIOS_ERR, "Hash mismatch on resume.\n"); |
| 162 | return -1; |
| 163 | } |
| 164 | } else if (is_resume < 0) |
| 165 | printk(BIOS_ERR, "Unable to determine if platform resuming.\n"); |
| 166 | |
| 167 | printk(BIOS_DEBUG, "Saving vboot hash.\n"); |
| 168 | |
| 169 | /* Always save the hash for the current boot. */ |
| 170 | if (vboot_save_hash(slot_hash, slot_hash_sz)) { |
| 171 | printk(BIOS_ERR, "Error saving vboot hash.\n"); |
| 172 | /* Though this is an error don't report it up since it could |
| 173 | * lead to a reboot loop. The consequence of this is that |
| 174 | * we will most likely fail resuming because of EC issues or |
| 175 | * the hash digest not matching. */ |
| 176 | return 0; |
| 177 | } |
| 178 | |
| 179 | return 0; |
| 180 | } |
| 181 | |
Aaron Durbin | 588ad7b | 2015-09-29 17:56:59 -0500 | [diff] [blame] | 182 | static int hash_body(struct vb2_context *ctx, struct region_device *fw_main) |
| 183 | { |
| 184 | uint64_t load_ts; |
| 185 | uint32_t expected_size; |
| 186 | uint8_t block[TODO_BLOCK_SIZE]; |
Aaron Durbin | 87c9fae | 2016-01-22 15:26:04 -0600 | [diff] [blame] | 187 | uint8_t hash_digest[VBOOT_MAX_HASH_SIZE]; |
| 188 | const size_t hash_digest_sz = sizeof(hash_digest); |
Aaron Durbin | 588ad7b | 2015-09-29 17:56:59 -0500 | [diff] [blame] | 189 | size_t block_size = sizeof(block); |
| 190 | size_t offset; |
| 191 | int rv; |
| 192 | |
Aaron Durbin | 87c9fae | 2016-01-22 15:26:04 -0600 | [diff] [blame] | 193 | /* Clear the full digest so that any hash digests less than the |
| 194 | * max have trailing zeros. */ |
| 195 | memset(hash_digest, 0, hash_digest_sz); |
| 196 | |
Aaron Durbin | 588ad7b | 2015-09-29 17:56:59 -0500 | [diff] [blame] | 197 | /* |
| 198 | * Since loading the firmware and calculating its hash is intertwined, |
| 199 | * we use this little trick to measure them separately and pretend it |
| 200 | * was first loaded and then hashed in one piece with the timestamps. |
| 201 | * (This split won't make sense with memory-mapped media like on x86.) |
| 202 | */ |
| 203 | load_ts = timestamp_get(); |
| 204 | timestamp_add(TS_START_HASH_BODY, load_ts); |
| 205 | |
| 206 | expected_size = region_device_sz(fw_main); |
| 207 | offset = 0; |
| 208 | |
| 209 | /* Start the body hash */ |
| 210 | rv = vb2api_init_hash(ctx, VB2_HASH_TAG_FW_BODY, &expected_size); |
| 211 | if (rv) |
| 212 | return rv; |
| 213 | |
Aaron Durbin | 4121f9e | 2016-01-27 14:23:17 -0600 | [diff] [blame] | 214 | /* |
| 215 | * Honor vboot's RW slot size. The expected size is pulled out of |
| 216 | * the preamble and obtained through vb2api_init_hash() above. By |
| 217 | * creating sub region the RW slot portion of the boot media is |
| 218 | * limited. |
| 219 | */ |
| 220 | if (rdev_chain(fw_main, fw_main, 0, expected_size)) { |
| 221 | printk(BIOS_ERR, "Unable to restrict CBFS size.\n"); |
| 222 | return VB2_ERROR_UNKNOWN; |
| 223 | } |
| 224 | |
Aaron Durbin | 588ad7b | 2015-09-29 17:56:59 -0500 | [diff] [blame] | 225 | /* Extend over the body */ |
| 226 | while (expected_size) { |
| 227 | uint64_t temp_ts; |
| 228 | if (block_size > expected_size) |
| 229 | block_size = expected_size; |
| 230 | |
| 231 | temp_ts = timestamp_get(); |
| 232 | if (rdev_readat(fw_main, block, offset, block_size) < 0) |
| 233 | return VB2_ERROR_UNKNOWN; |
| 234 | load_ts += timestamp_get() - temp_ts; |
| 235 | |
| 236 | rv = vb2api_extend_hash(ctx, block, block_size); |
| 237 | if (rv) |
| 238 | return rv; |
| 239 | |
| 240 | expected_size -= block_size; |
| 241 | offset += block_size; |
| 242 | } |
| 243 | |
| 244 | timestamp_add(TS_DONE_LOADING, load_ts); |
| 245 | timestamp_add_now(TS_DONE_HASHING); |
| 246 | |
| 247 | /* Check the result (with RSA signature verification) */ |
Aaron Durbin | 87c9fae | 2016-01-22 15:26:04 -0600 | [diff] [blame] | 248 | rv = vb2api_check_hash_get_digest(ctx, hash_digest, hash_digest_sz); |
Aaron Durbin | 588ad7b | 2015-09-29 17:56:59 -0500 | [diff] [blame] | 249 | if (rv) |
| 250 | return rv; |
| 251 | |
| 252 | timestamp_add_now(TS_END_HASH_BODY); |
| 253 | |
Aaron Durbin | 87c9fae | 2016-01-22 15:26:04 -0600 | [diff] [blame] | 254 | if (handle_digest_result(hash_digest, hash_digest_sz)) |
| 255 | return VB2_ERROR_UNKNOWN; |
| 256 | |
Aaron Durbin | 588ad7b | 2015-09-29 17:56:59 -0500 | [diff] [blame] | 257 | return VB2_SUCCESS; |
| 258 | } |
| 259 | |
| 260 | static int locate_firmware(struct vb2_context *ctx, |
| 261 | struct region_device *fw_main) |
| 262 | { |
| 263 | const char *name; |
| 264 | |
| 265 | if (is_slot_a(ctx)) |
| 266 | name = "FW_MAIN_A"; |
| 267 | else |
| 268 | name = "FW_MAIN_B"; |
| 269 | |
| 270 | return vboot_named_region_device(name, fw_main); |
| 271 | } |
| 272 | |
| 273 | /** |
| 274 | * Save non-volatile and/or secure data if needed. |
| 275 | */ |
| 276 | static void save_if_needed(struct vb2_context *ctx) |
| 277 | { |
| 278 | if (ctx->flags & VB2_CONTEXT_NVDATA_CHANGED) { |
| 279 | printk(BIOS_INFO, "Saving nvdata\n"); |
| 280 | save_vbnv(ctx->nvdata); |
| 281 | ctx->flags &= ~VB2_CONTEXT_NVDATA_CHANGED; |
| 282 | } |
| 283 | if (ctx->flags & VB2_CONTEXT_SECDATA_CHANGED) { |
| 284 | printk(BIOS_INFO, "Saving secdata\n"); |
| 285 | antirollback_write_space_firmware(ctx); |
| 286 | ctx->flags &= ~VB2_CONTEXT_SECDATA_CHANGED; |
| 287 | } |
| 288 | } |
| 289 | |
| 290 | static uint32_t extend_pcrs(struct vb2_context *ctx) |
| 291 | { |
| 292 | return tpm_extend_pcr(ctx, 0, BOOT_MODE_PCR) || |
| 293 | tpm_extend_pcr(ctx, 1, HWID_DIGEST_PCR); |
| 294 | } |
| 295 | |
Aaron Durbin | 588ad7b | 2015-09-29 17:56:59 -0500 | [diff] [blame] | 296 | /** |
| 297 | * Verify and select the firmware in the RW image |
| 298 | * |
| 299 | * TODO: Avoid loading a stage twice (once in hash_body & again in load_stage). |
| 300 | * when per-stage verification is ready. |
| 301 | */ |
| 302 | void verstage_main(void) |
| 303 | { |
| 304 | struct vb2_context ctx; |
| 305 | struct region_device fw_main; |
Aaron Durbin | 588ad7b | 2015-09-29 17:56:59 -0500 | [diff] [blame] | 306 | int rv; |
Aaron Durbin | b5a20b2 | 2015-10-06 17:29:03 -0500 | [diff] [blame] | 307 | |
Aaron Durbin | 588ad7b | 2015-09-29 17:56:59 -0500 | [diff] [blame] | 308 | timestamp_add_now(TS_START_VBOOT); |
| 309 | |
| 310 | /* Set up context and work buffer */ |
Aaron Durbin | b5a20b2 | 2015-10-06 17:29:03 -0500 | [diff] [blame] | 311 | vb2_init_work_context(&ctx); |
Aaron Durbin | 588ad7b | 2015-09-29 17:56:59 -0500 | [diff] [blame] | 312 | |
Furquan Shaikh | be87f73 | 2016-06-29 11:26:27 -0700 | [diff] [blame] | 313 | /* Read nvdata from a non-volatile storage. */ |
| 314 | read_vbnv(ctx.nvdata); |
Aaron Durbin | 588ad7b | 2015-09-29 17:56:59 -0500 | [diff] [blame] | 315 | |
Duncan Laurie | 1cdacca | 2016-02-19 20:26:07 -0800 | [diff] [blame] | 316 | /* Set S3 resume flag if vboot should behave differently when selecting |
| 317 | * which slot to boot. This is only relevant to vboot if the platform |
| 318 | * does verification of memory init and thus must ensure it resumes with |
| 319 | * the same slot that it booted from. */ |
| 320 | if (IS_ENABLED(CONFIG_RESUME_PATH_SAME_AS_BOOT) && |
| 321 | IS_ENABLED(CONFIG_VBOOT_STARTS_IN_BOOTBLOCK) && |
| 322 | vboot_platform_is_resuming()) |
| 323 | ctx.flags |= VB2_CONTEXT_S3_RESUME; |
| 324 | |
Duncan Laurie | a613a31 | 2016-03-14 09:32:08 -0700 | [diff] [blame] | 325 | /* Read secdata from TPM. Initialize TPM if secdata not found. We don't |
| 326 | * check the return value here because vb2api_fw_phase1 will catch |
| 327 | * invalid secdata and tell us what to do (=reboot). */ |
| 328 | timestamp_add_now(TS_START_TPMINIT); |
| 329 | antirollback_read_space_firmware(&ctx); |
| 330 | timestamp_add_now(TS_END_TPMINIT); |
| 331 | |
Aaron Durbin | 588ad7b | 2015-09-29 17:56:59 -0500 | [diff] [blame] | 332 | if (!IS_ENABLED(CONFIG_VIRTUAL_DEV_SWITCH) && |
| 333 | get_developer_mode_switch()) |
| 334 | ctx.flags |= VB2_CONTEXT_FORCE_DEVELOPER_MODE; |
| 335 | |
| 336 | if (get_recovery_mode_switch()) { |
Aaron Durbin | 588ad7b | 2015-09-29 17:56:59 -0500 | [diff] [blame] | 337 | ctx.flags |= VB2_CONTEXT_FORCE_RECOVERY_MODE; |
| 338 | if (IS_ENABLED(CONFIG_VBOOT_DISABLE_DEV_ON_RECOVERY)) |
| 339 | ctx.flags |= VB2_DISABLE_DEVELOPER_MODE; |
| 340 | } |
| 341 | |
| 342 | if (IS_ENABLED(CONFIG_WIPEOUT_SUPPORTED) && get_wipeout_mode_switch()) |
| 343 | ctx.flags |= VB2_CONTEXT_FORCE_WIPEOUT_MODE; |
| 344 | |
| 345 | if (IS_ENABLED(CONFIG_LID_SWITCH) && !get_lid_switch()) |
| 346 | ctx.flags |= VB2_CONTEXT_NOFAIL_BOOT; |
| 347 | |
| 348 | /* Do early init (set up secdata and NVRAM, load GBB) */ |
| 349 | printk(BIOS_INFO, "Phase 1\n"); |
| 350 | rv = vb2api_fw_phase1(&ctx); |
| 351 | |
| 352 | if (rv) { |
| 353 | /* |
| 354 | * If vb2api_fw_phase1 fails, check for return value. |
| 355 | * If it is set to VB2_ERROR_API_PHASE1_RECOVERY, then continue |
| 356 | * into recovery mode. |
| 357 | * For any other error code, save context if needed and reboot. |
| 358 | */ |
| 359 | if (rv == VB2_ERROR_API_PHASE1_RECOVERY) { |
| 360 | printk(BIOS_INFO, "Recovery requested (%x)\n", rv); |
| 361 | save_if_needed(&ctx); |
| 362 | extend_pcrs(&ctx); /* ignore failures */ |
| 363 | timestamp_add_now(TS_END_VBOOT); |
| 364 | return; |
| 365 | } |
| 366 | |
| 367 | printk(BIOS_INFO, "Reboot reqested (%x)\n", rv); |
| 368 | save_if_needed(&ctx); |
| 369 | vboot_reboot(); |
| 370 | } |
| 371 | |
| 372 | /* Determine which firmware slot to boot (based on NVRAM) */ |
| 373 | printk(BIOS_INFO, "Phase 2\n"); |
| 374 | rv = vb2api_fw_phase2(&ctx); |
| 375 | if (rv) { |
| 376 | printk(BIOS_INFO, "Reboot requested (%x)\n", rv); |
| 377 | save_if_needed(&ctx); |
| 378 | vboot_reboot(); |
| 379 | } |
| 380 | |
| 381 | /* Try that slot (verify its keyblock and preamble) */ |
| 382 | printk(BIOS_INFO, "Phase 3\n"); |
| 383 | timestamp_add_now(TS_START_VERIFY_SLOT); |
| 384 | rv = vb2api_fw_phase3(&ctx); |
| 385 | timestamp_add_now(TS_END_VERIFY_SLOT); |
| 386 | if (rv) { |
| 387 | printk(BIOS_INFO, "Reboot requested (%x)\n", rv); |
| 388 | save_if_needed(&ctx); |
| 389 | vboot_reboot(); |
| 390 | } |
| 391 | |
| 392 | printk(BIOS_INFO, "Phase 4\n"); |
| 393 | rv = locate_firmware(&ctx, &fw_main); |
| 394 | if (rv) |
| 395 | die("Failed to read FMAP to locate firmware"); |
| 396 | |
| 397 | rv = hash_body(&ctx, &fw_main); |
| 398 | save_if_needed(&ctx); |
| 399 | if (rv) { |
| 400 | printk(BIOS_INFO, "Reboot requested (%x)\n", rv); |
| 401 | vboot_reboot(); |
| 402 | } |
| 403 | |
| 404 | rv = extend_pcrs(&ctx); |
| 405 | if (rv) { |
| 406 | printk(BIOS_WARNING, "Failed to extend TPM PCRs (%#x)\n", rv); |
| 407 | vb2api_fail(&ctx, VB2_RECOVERY_RO_TPM_U_ERROR, rv); |
| 408 | save_if_needed(&ctx); |
| 409 | vboot_reboot(); |
| 410 | } |
| 411 | |
| 412 | /* Lock TPM */ |
| 413 | rv = antirollback_lock_space_firmware(); |
| 414 | if (rv) { |
| 415 | printk(BIOS_INFO, "Failed to lock TPM (%x)\n", rv); |
| 416 | vb2api_fail(&ctx, VB2_RECOVERY_RO_TPM_L_ERROR, 0); |
| 417 | save_if_needed(&ctx); |
| 418 | vboot_reboot(); |
| 419 | } |
| 420 | |
Furquan Shaikh | b038f41 | 2016-11-07 23:47:11 -0800 | [diff] [blame] | 421 | /* Lock rec hash space if available. */ |
| 422 | if (IS_ENABLED(CONFIG_VBOOT_HAS_REC_HASH_SPACE)) { |
| 423 | rv = antirollback_lock_space_rec_hash(); |
| 424 | if (rv) { |
| 425 | printk(BIOS_INFO, "Failed to lock rec hash space(%x)\n", |
| 426 | rv); |
| 427 | vb2api_fail(&ctx, VB2_RECOVERY_RO_TPM_REC_HASH_L_ERROR, |
| 428 | 0); |
| 429 | save_if_needed(&ctx); |
| 430 | vboot_reboot(); |
| 431 | } |
| 432 | } |
| 433 | |
Aaron Durbin | 588ad7b | 2015-09-29 17:56:59 -0500 | [diff] [blame] | 434 | printk(BIOS_INFO, "Slot %c is selected\n", is_slot_a(&ctx) ? 'A' : 'B'); |
Aaron Durbin | 6d720f3 | 2015-12-08 17:00:23 -0600 | [diff] [blame] | 435 | vb2_set_selected_region(region_device_region(&fw_main)); |
Aaron Durbin | 588ad7b | 2015-09-29 17:56:59 -0500 | [diff] [blame] | 436 | timestamp_add_now(TS_END_VBOOT); |
| 437 | } |