Lines Matching full:shared
28 static VbSharedDataHeader* shared = (VbSharedDataHeader*)shared_data; variable
81 VbSharedDataInit(shared, sizeof(shared_data)); in ResetMocks()
82 shared->fw_version_tpm = 0x00020004; in ResetMocks()
228 TEST_EQ(shared->flags & VBSD_LF_DEV_SWITCH_ON, 0, in LoadFirmwareTest()
229 "Dev flag in shared.flags dev=0"); in LoadFirmwareTest()
230 TEST_EQ(shared->check_fw_a_result, VBSD_LF_CHECK_DEV_MISMATCH, in LoadFirmwareTest()
232 TEST_EQ(shared->check_fw_b_result, VBSD_LF_CHECK_REC_MISMATCH, in LoadFirmwareTest()
236 shared->flags |= VBSD_BOOT_DEV_SWITCH_ON; in LoadFirmwareTest()
244 TEST_NEQ(shared->flags & VBSD_LF_DEV_SWITCH_ON, 0, in LoadFirmwareTest()
245 "Dev flag in shared.flags dev=1"); in LoadFirmwareTest()
246 TEST_EQ(shared->check_fw_a_result, VBSD_LF_CHECK_DEV_MISMATCH, in LoadFirmwareTest()
248 TEST_EQ(shared->check_fw_b_result, VBSD_LF_CHECK_REC_MISMATCH, in LoadFirmwareTest()
259 TEST_EQ(shared->check_fw_a_result, VBSD_LF_CHECK_VERIFY_KEYBLOCK, in LoadFirmwareTest()
261 TEST_EQ(shared->check_fw_b_result, VBSD_LF_CHECK_KEY_ROLLBACK, in LoadFirmwareTest()
263 TEST_EQ(shared->fw_version_lowest, 0, "Lowest valid version"); in LoadFirmwareTest()
264 TEST_EQ(shared->fw_version_tpm, 0x20004, "TPM version"); in LoadFirmwareTest()
274 TEST_EQ(shared->check_fw_a_result, VBSD_LF_CHECK_KEY_ROLLBACK, in LoadFirmwareTest()
276 TEST_EQ(shared->check_fw_b_result, VBSD_LF_CHECK_DATA_KEY_PARSE, in LoadFirmwareTest()
284 TEST_EQ(shared->check_fw_a_result, VBSD_LF_CHECK_VALID, in LoadFirmwareTest()
295 TEST_EQ(shared->check_fw_a_result, VBSD_LF_CHECK_VERIFY_PREAMBLE, in LoadFirmwareTest()
306 TEST_EQ(shared->check_fw_a_result, VBSD_LF_CHECK_FW_ROLLBACK, in LoadFirmwareTest()
308 TEST_EQ(shared->check_fw_b_result, VBSD_LF_CHECK_FW_ROLLBACK, in LoadFirmwareTest()
317 TEST_EQ(shared->check_fw_a_result, VBSD_LF_CHECK_VALID, in LoadFirmwareTest()
319 TEST_EQ(shared->check_fw_b_result, VBSD_LF_CHECK_HEADER_VALID, in LoadFirmwareTest()
330 TEST_EQ(shared->check_fw_a_result, VBSD_LF_CHECK_NO_RO_NORMAL, in LoadFirmwareTest()
338 shared->flags |= VBSD_BOOT_RO_NORMAL_SUPPORT; in LoadFirmwareTest()
341 TEST_EQ(shared->check_fw_a_result, VBSD_LF_CHECK_VALID, "RO normal A valid"); in LoadFirmwareTest()
342 TEST_EQ(shared->firmware_index, 0, "Boot A shared index"); in LoadFirmwareTest()
343 TEST_EQ(shared->fw_keyblock_flags, vblock[0].key_block_flags, in LoadFirmwareTest()
345 TEST_EQ(shared->kernel_subkey.algorithm, 7, "Copy kernel subkey"); in LoadFirmwareTest()
352 shared->flags |= VBSD_BOOT_RO_NORMAL_SUPPORT; in LoadFirmwareTest()
354 TEST_EQ(shared->check_fw_a_result, VBSD_LF_CHECK_VALID, "RO normal A valid"); in LoadFirmwareTest()
355 TEST_EQ(shared->check_fw_b_result, 0, "RO normal B not checked "); in LoadFirmwareTest()
356 TEST_EQ(shared->firmware_index, 0, "Boot A"); in LoadFirmwareTest()
357 TEST_EQ(shared->flags & VBSD_FWB_TRIED, 0, "Didn't try firmware B"); in LoadFirmwareTest()
358 TEST_EQ(shared->kernel_subkey.algorithm, 7, "Copy kernel subkey"); in LoadFirmwareTest()
363 shared->flags |= VBSD_BOOT_RO_NORMAL_SUPPORT; in LoadFirmwareTest()
366 TEST_EQ(shared->check_fw_a_result, 0, "RO normal A not checked "); in LoadFirmwareTest()
367 TEST_EQ(shared->check_fw_b_result, VBSD_LF_CHECK_VALID, "RO normal B valid"); in LoadFirmwareTest()
368 TEST_EQ(shared->firmware_index, 1, "Boot B"); in LoadFirmwareTest()
369 TEST_NEQ(shared->flags & VBSD_FWB_TRIED, 0, "Tried firmware B"); in LoadFirmwareTest()
370 TEST_EQ(shared->kernel_subkey.algorithm, 8, "Copy kernel subkey"); in LoadFirmwareTest()
381 shared->flags |= VBSD_BOOT_RO_NORMAL_SUPPORT; in LoadFirmwareTest()
383 TEST_EQ(shared->check_fw_a_result, VBSD_LF_CHECK_VALID, "RO normal A valid"); in LoadFirmwareTest()
384 TEST_EQ(shared->check_fw_b_result, VBSD_LF_CHECK_HEADER_VALID, in LoadFirmwareTest()
386 TEST_EQ(shared->firmware_index, 0, "Boot A"); in LoadFirmwareTest()
387 TEST_EQ(shared->fw_keyblock_flags, vblock[0].key_block_flags, "Key block A"); in LoadFirmwareTest()
388 TEST_EQ(shared->kernel_subkey.algorithm, 7, "Copy kernel subkey"); in LoadFirmwareTest()
389 TEST_EQ(shared->fw_version_lowest, 0x20005, "Lowest valid version"); in LoadFirmwareTest()
390 TEST_EQ(shared->fw_version_tpm, 0x20005, "TPM version advanced"); in LoadFirmwareTest()
396 TEST_EQ(shared->check_fw_a_result, VBSD_LF_CHECK_VALID, in LoadFirmwareTest()
398 TEST_EQ(shared->firmware_index, 0, "Boot A shared index"); in LoadFirmwareTest()
411 TEST_EQ(shared->check_fw_a_result, VBSD_LF_CHECK_GET_FW_BODY, in LoadFirmwareTest()
422 TEST_EQ(shared->check_fw_a_result, VBSD_LF_CHECK_HASH_WRONG_SIZE, in LoadFirmwareTest()
433 TEST_EQ(shared->check_fw_a_result, VBSD_LF_CHECK_VERIFY_BODY, in LoadFirmwareTest()
444 TEST_EQ(shared->check_fw_a_result, VBSD_LF_CHECK_VALID, in LoadFirmwareTest()