Lines Matching defs:cc
22 static struct vb2_context cc;
52 memset(&cc, 0, sizeof(cc));
53 cc.workbuf = workbuf;
54 cc.workbuf_size = sizeof(workbuf);
56 vb2_init_context(&cc);
57 sd = vb2_get_sd(&cc);
59 vb2_nv_init(&cc);
61 vb2_secdata_create(&cc);
62 vb2_secdata_init(&cc);
102 cc.secdata[0] ^= 0x42;
103 TEST_EQ(vb2api_secdata_check(&cc), VB2_ERROR_SECDATA_CRC,
105 TEST_SUCC(vb2api_secdata_create(&cc), "secdata create");
106 TEST_SUCC(vb2api_secdata_check(&cc), "secdata check 2");
110 vb2api_fail(&cc, 12, 34);
111 TEST_EQ(vb2_nv_get(&cc, VB2_NV_RECOVERY_REQUEST),
113 TEST_EQ(vb2_nv_get(&cc, VB2_NV_RECOVERY_SUBCODE),
120 TEST_SUCC(vb2api_fw_phase1(&cc), "phase1 good");
122 TEST_EQ(cc.flags & VB2_CONTEXT_RECOVERY_MODE, 0, " recovery flag");
123 TEST_EQ(cc.flags & VB2_CONTEXT_CLEAR_RAM, 0, " clear ram flag");
127 TEST_EQ(vb2api_fw_phase1(&cc), VB2_ERROR_API_PHASE1_RECOVERY,
131 TEST_NEQ(cc.flags & VB2_CONTEXT_RECOVERY_MODE, 0, " recovery flag");
132 TEST_NEQ(cc.flags & VB2_CONTEXT_CLEAR_RAM, 0, " clear ram flag");
137 TEST_EQ(vb2api_fw_phase1(&cc), VB2_ERROR_API_PHASE1_RECOVERY,
141 TEST_NEQ(cc.flags & VB2_CONTEXT_RECOVERY_MODE, 0, " recovery flag");
142 TEST_NEQ(cc.flags & VB2_CONTEXT_CLEAR_RAM, 0, " clear ram flag");
145 cc.secdata[0] ^= 0x42;
146 TEST_EQ(vb2api_fw_phase1(&cc), VB2_ERROR_API_PHASE1_RECOVERY,
150 TEST_NEQ(cc.flags & VB2_CONTEXT_RECOVERY_MODE, 0, " recovery flag");
151 TEST_NEQ(cc.flags & VB2_CONTEXT_CLEAR_RAM, 0, " clear ram flag");
157 TEST_SUCC(vb2api_fw_phase2(&cc), "phase2 good");
158 TEST_EQ(cc.flags & VB2_CONTEXT_CLEAR_RAM, 0, " clear ram flag");
161 cc.flags |= VB2_CONTEXT_DEVELOPER_MODE;
162 TEST_SUCC(vb2api_fw_phase2(&cc), "phase1 dev");
163 TEST_NEQ(cc.flags & VB2_CONTEXT_CLEAR_RAM, 0, " clear ram flag");
167 TEST_EQ(vb2api_fw_phase2(&cc), VB2_ERROR_MOCK, "phase2 tpm clear");
168 TEST_EQ(vb2_nv_get(&cc, VB2_NV_RECOVERY_REQUEST),
173 TEST_EQ(vb2api_fw_phase2(&cc), VB2_ERROR_MOCK, "phase2 slot");
174 TEST_EQ(vb2_nv_get(&cc, VB2_NV_RECOVERY_REQUEST),
190 &cc, BOOT_MODE_PCR, digest, &digest_size),
199 &cc, HWID_DIGEST_PCR, digest, &digest_size),
207 TEST_EQ(vb2api_get_pcr_digest(&cc, BOOT_MODE_PCR, digest, &digest_size),
212 &cc, HWID_DIGEST_PCR + 1, digest, &digest_size),