Home
last modified time | relevance | path

Searched refs:gbb (Results 1 – 25 of 40) sorted by relevance

12

/external/vboot_reference/futility/
Dmisc.c58 GoogleBinaryBlockHeader *gbb = (GoogleBinaryBlockHeader *)buf; in recognize_gbb() local
60 if (memcmp(gbb->signature, GBB_SIGNATURE, GBB_SIGNATURE_SIZE)) in recognize_gbb()
62 if (gbb->major_version > GBB_MAJOR_VER) in recognize_gbb()
71 int futil_valid_gbb_header(GoogleBinaryBlockHeader *gbb, uint32_t len, in futil_valid_gbb_header() argument
77 if (memcmp(gbb->signature, GBB_SIGNATURE, GBB_SIGNATURE_SIZE)) in futil_valid_gbb_header()
79 if (gbb->major_version != GBB_MAJOR_VER) in futil_valid_gbb_header()
84 uint32_t maxlen = gbb->header_size; in futil_valid_gbb_header()
86 gbb->hwid_offset + gbb->hwid_size); in futil_valid_gbb_header()
88 gbb->rootkey_offset + gbb->rootkey_size); in futil_valid_gbb_header()
90 gbb->bmpfv_offset + gbb->bmpfv_size); in futil_valid_gbb_header()
[all …]
Dcmd_gbb_utility.c135 GoogleBinaryBlockHeader *gbb; in create_gbb() local
171 gbb = (GoogleBinaryBlockHeader *) buf; in create_gbb()
172 memcpy(gbb->signature, GBB_SIGNATURE, GBB_SIGNATURE_SIZE); in create_gbb()
173 gbb->major_version = GBB_MAJOR_VER; in create_gbb()
174 gbb->minor_version = GBB_MINOR_VER; in create_gbb()
175 gbb->header_size = GBB_HEADER_SIZE; in create_gbb()
176 gbb->flags = 0; in create_gbb()
179 gbb->hwid_offset = i; in create_gbb()
180 gbb->hwid_size = val[0]; in create_gbb()
183 gbb->rootkey_offset = i; in create_gbb()
[all …]
Dcmd_show.c130 GoogleBinaryBlockHeader *gbb = (GoogleBinaryBlockHeader *)buf; in futil_cb_show_gbb() local
144 if (!futil_valid_gbb_header(gbb, len, &maxlen)) in futil_cb_show_gbb()
150 gbb->major_version, gbb->minor_version); in futil_cb_show_gbb()
151 printf(" Flags: 0x%08x\n", gbb->flags); in futil_cb_show_gbb()
154 gbb->hwid_offset, gbb->hwid_size); in futil_cb_show_gbb()
156 gbb->bmpfv_offset, gbb->bmpfv_size); in futil_cb_show_gbb()
158 gbb->rootkey_offset, gbb->rootkey_size); in futil_cb_show_gbb()
160 gbb->recovery_key_offset, gbb->recovery_key_size); in futil_cb_show_gbb()
171 printf(" HWID: %s\n", buf + gbb->hwid_offset); in futil_cb_show_gbb()
172 print_hwid_digest(gbb, " digest: ", "\n"); in futil_cb_show_gbb()
[all …]
Dfutility.h95 int futil_looks_like_gbb(GoogleBinaryBlockHeader *gbb, uint32_t len);
101 int futil_valid_gbb_header(GoogleBinaryBlockHeader *gbb, uint32_t len,
105 void update_hwid_digest(GoogleBinaryBlockHeader *gbb);
109 int print_hwid_digest(GoogleBinaryBlockHeader *gbb,
/external/vboot_reference/tests/
Dvboot_display_tests.c29 static GoogleBinaryBlockHeader *gbb = (GoogleBinaryBlockHeader *)gbb_data; variable
39 gbb->major_version = GBB_MAJOR_VER; in ResetMocks()
40 gbb->minor_version = GBB_MINOR_VER; in ResetMocks()
41 gbb->flags = 0; in ResetMocks()
44 gbb->hwid_offset = gbb_used; in ResetMocks()
45 strcpy(gbb_data + gbb->hwid_offset, "Test HWID"); in ResetMocks()
46 gbb->hwid_size = strlen(gbb_data + gbb->hwid_offset) + 1; in ResetMocks()
47 gbb_used = (gbb_used + gbb->hwid_size + 7) & ~7; in ResetMocks()
49 gbb->bmpfv_offset = gbb_used; in ResetMocks()
50 bhdr = (BmpBlockHeader *)(gbb_data + gbb->bmpfv_offset); in ResetMocks()
[all …]
Dvboot_region_tests.c42 GoogleBinaryBlockHeader *gbb; in ResetMocks() local
59 gbb = (GoogleBinaryBlockHeader *)gbb_data; in ResetMocks()
60 gbb->major_version = GBB_MAJOR_VER; in ResetMocks()
61 gbb->minor_version = GBB_MINOR_VER; in ResetMocks()
62 gbb->flags = 0; in ResetMocks()
65 gbb->hwid_offset = gbb_used; in ResetMocks()
66 strcpy(gbb_data + gbb->hwid_offset, "Test HWID"); in ResetMocks()
67 gbb->hwid_size = strlen(gbb_data + gbb->hwid_offset) + 1; in ResetMocks()
68 gbb_used = (gbb_used + gbb->hwid_size + 7) & ~7; in ResetMocks()
70 gbb->bmpfv_offset = gbb_used; in ResetMocks()
[all …]
Dvboot_audio_tests.c33 static GoogleBinaryBlockHeader gbb; variable
64 cparams.gbb_data = &gbb; in ResetMocks()
65 cparams.gbb = &gbb; in ResetMocks()
66 Memset(&gbb, 0, sizeof(gbb)); in ResetMocks()
67 gbb.major_version = GBB_MAJOR_VER; in ResetMocks()
68 gbb.minor_version = GBB_MINOR_VER; in ResetMocks()
69 gbb.flags = 0; in ResetMocks()
124 gbb.flags = 0x00000001; in VbAudioTest()
141 gbb.flags = 0x00000001; in VbAudioTest()
Dvboot_api_devmode_tests.c138 static GoogleBinaryBlockHeader gbb; variable
155 cparams.gbb_data = &gbb; in ResetMocks()
156 cparams.gbb = &gbb; in ResetMocks()
168 Memset(&gbb, 0, sizeof(gbb)); in ResetMocks()
169 gbb.major_version = GBB_MAJOR_VER; in ResetMocks()
170 gbb.minor_version = GBB_MINOR_VER; in ResetMocks()
171 gbb.flags = 0; in ResetMocks()
309 gbb.flags = test[i].gbb_flags; in VbBootDeveloperSoundTest()
Dvb2_misc_tests.c125 struct vb2_gbb_header gbb = { in gbb_tests() local
145 mock_resource_ptr = &gbb; in gbb_tests()
146 mock_resource_size = sizeof(gbb); in gbb_tests()
148 TEST_SUCC(memcmp(&gbb, &gbbdest, sizeof(gbb)), "read gbb contents"); in gbb_tests()
155 gbb.signature[0]++; in gbb_tests()
158 gbb.signature[0]--; in gbb_tests()
160 gbb.major_version = VB2_GBB_MAJOR_VER + 1; in gbb_tests()
163 gbb.major_version = VB2_GBB_MAJOR_VER; in gbb_tests()
165 gbb.minor_version = VB2_GBB_MINOR_VER + 1; in gbb_tests()
168 gbb.minor_version = 1; in gbb_tests()
[all …]
Dvboot_api_kernel4_tests.c29 static GoogleBinaryBlockHeader gbb; variable
43 cparams.gbb_data = &gbb; in ResetMocks()
44 cparams.gbb_size = sizeof(gbb); in ResetMocks()
48 Memset(&gbb, 0, sizeof(gbb)); in ResetMocks()
49 gbb.major_version = GBB_MAJOR_VER; in ResetMocks()
50 gbb.minor_version = GBB_MINOR_VER; in ResetMocks()
51 gbb.flags = 0; in ResetMocks()
161 gbb.flags |= GBB_FLAG_DISABLE_EC_SOFTWARE_SYNC; in VbSlkTest()
Dvboot_api_firmware_tests.c27 static GoogleBinaryBlockHeader gbb; variable
54 Memset(&gbb, 0, sizeof(gbb)); in ResetMocks()
55 cparams.gbb_data = &gbb; in ResetMocks()
56 cparams.gbb_size = sizeof(gbb); in ResetMocks()
57 cparams.gbb = &gbb; in ResetMocks()
114 GoogleBinaryBlockHeader *gbb) { in SetTPMBootModeState() argument
Dvboot_api_kernel2_tests.c27 static GoogleBinaryBlockHeader gbb; variable
56 cparams.gbb_data = &gbb; in ResetMocks()
57 cparams.gbb = &gbb; in ResetMocks()
59 Memset(&gbb, 0, sizeof(gbb)); in ResetMocks()
60 gbb.major_version = GBB_MAJOR_VER; in ResetMocks()
61 gbb.minor_version = GBB_MINOR_VER; in ResetMocks()
62 gbb.flags = 0; in ResetMocks()
291 gbb.flags |= GBB_FLAG_DEFAULT_DEV_BOOT_LEGACY; in VbBootDevTest()
355 gbb.flags |= GBB_FLAG_ENTER_TRIGGERS_TONORM; in VbBootDevTest()
364 gbb.flags |= GBB_FLAG_FORCE_DEV_SWITCH_ON; in VbBootDevTest()
[all …]
Dvboot_api_kernel3_tests.c27 static GoogleBinaryBlockHeader gbb; variable
56 cparams.gbb_data = &gbb; in ResetMocks()
58 Memset(&gbb, 0, sizeof(gbb)); in ResetMocks()
59 gbb.major_version = GBB_MAJOR_VER; in ResetMocks()
60 gbb.minor_version = GBB_MINOR_VER; in ResetMocks()
61 gbb.flags = 0; in ResetMocks()
Dvboot_firmware_tests.c30 static GoogleBinaryBlockHeader* gbb = (GoogleBinaryBlockHeader*)gbb_data; variable
50 cparams.gbb = gbb; in ResetMocks()
85 gbb->rootkey_offset = sizeof(GoogleBinaryBlockHeader); in ResetMocks()
86 root_key = (VbPublicKey *)(gbb_data + gbb->rootkey_offset); in ResetMocks()
91 gbb->major_version = GBB_MAJOR_VER; in ResetMocks()
92 gbb->minor_version = GBB_MINOR_VER; in ResetMocks()
93 gbb->flags = 0; in ResetMocks()
282 gbb->flags = GBB_FLAG_DISABLE_FW_ROLLBACK_CHECK; in LoadFirmwareTest()
315 gbb->flags = GBB_FLAG_DISABLE_FW_ROLLBACK_CHECK; in LoadFirmwareTest()
Dvb2_firmware_tests.sh35 ${FUTILITY} gbb_utility -c 128,2400,0,0 gbb.test
36 ${FUTILITY} gbb_utility gbb.test -s --hwid='Test GBB' \
56 ${BUILD_RUN}/tests/vb20_verify_fw gbb.test vblock.test body.test
Dvboot_api_init_tests.c29 static GoogleBinaryBlockHeader gbb; variable
45 cparams.gbb_data = &gbb; in ResetMocks()
46 cparams.gbb_size = sizeof(gbb); in ResetMocks()
48 Memset(&gbb, 0, sizeof(gbb)); in ResetMocks()
49 gbb.major_version = GBB_MAJOR_VER; in ResetMocks()
50 gbb.minor_version = GBB_MINOR_VER; in ResetMocks()
51 gbb.flags = 0; in ResetMocks()
289 gbb.flags = GBB_FLAG_FORCE_DEV_SWITCH_ON; in VbInitTest()
325 gbb.flags = GBB_FLAG_LOAD_OPTION_ROMS; in VbInitTest()
346 gbb.flags = GBB_FLAG_ENABLE_ALTERNATE_OS; in VbInitTest()
[all …]
Dvboot_kernel_tests.c56 static GoogleBinaryBlockHeader *gbb = (GoogleBinaryBlockHeader*)gbb_data; variable
132 memset(gbb, 0, sizeof(*gbb)); in ResetMocks()
133 gbb->major_version = GBB_MAJOR_VER; in ResetMocks()
134 gbb->minor_version = GBB_MINOR_VER; in ResetMocks()
135 gbb->flags = 0; in ResetMocks()
138 cparams.gbb = gbb; in ResetMocks()
139 cparams.gbb_data = gbb; in ResetMocks()
153 lkp.gbb_data = gbb; in ResetMocks()
/external/vboot_reference/firmware/lib/
Dregion-kernel.c34 GoogleBinaryBlockHeader *gbb = cparams->gbb; in VbGbbReadBmpHeader() local
36 if (0 == gbb->bmpfv_size) in VbGbbReadBmpHeader()
40 ret = VbRegionReadGbb(cparams, gbb->bmpfv_offset, in VbGbbReadBmpHeader()
68 GoogleBinaryBlockHeader *gbb; in VbRegionReadHWID() local
78 gbb = cparams->gbb; in VbRegionReadHWID()
80 if (0 == gbb->hwid_size) { in VbRegionReadHWID()
85 if (gbb->hwid_size > max_size) { in VbRegionReadHWID()
89 ret = VbRegionReadGbb(cparams, gbb->hwid_offset, gbb->hwid_size, hwid); in VbRegionReadHWID()
103 GoogleBinaryBlockHeader *gbb; in VbGbbReadImage() local
115 gbb = cparams->gbb; in VbGbbReadImage()
[all …]
Dvboot_api_firmware.c31 cparams->gbb = NULL; in VbSelectFirmware()
49 cparams->gbb = VbExMalloc(sizeof(*cparams->gbb)); in VbSelectFirmware()
50 retval = VbGbbReadHeader_static(cparams, cparams->gbb); in VbSelectFirmware()
53 VbExFree(cparams->gbb); in VbSelectFirmware()
54 cparams->gbb = NULL; in VbSelectFirmware()
60 cparams->gbb = VbExMalloc(sizeof(*cparams->gbb)); in VbSelectFirmware()
61 retval = VbGbbReadHeader_static(cparams, cparams->gbb); in VbSelectFirmware()
113 cparams->gbb); in VbSelectFirmware()
129 if (cparams->gbb) { in VbSelectFirmware()
130 VbExFree(cparams->gbb); in VbSelectFirmware()
[all …]
Dvboot_api_kernel.c167 if (VbWantShutdown(cparams->gbb->flags)) in VbUserConfirms()
229 GoogleBinaryBlockHeader *gbb = cparams->gbb; in VbBootDeveloper() local
242 if (gbb->flags & GBB_FLAG_FORCE_DEV_BOOT_USB) in VbBootDeveloper()
244 if (gbb->flags & GBB_FLAG_FORCE_DEV_BOOT_LEGACY) in VbBootDeveloper()
257 if (VbWantShutdown(gbb->flags)) { in VbBootDeveloper()
270 if (!(gbb->flags & GBB_FLAG_ENTER_TRIGGERS_TONORM)) in VbBootDeveloper()
280 if (gbb->flags & GBB_FLAG_FORCE_DEV_SWITCH_ON) { in VbBootDeveloper()
428 if ((gbb->flags & GBB_FLAG_DEFAULT_DEV_BOOT_LEGACY) && in VbBootDeveloper()
511 if (VbWantShutdown(cparams->gbb->flags)) in VbBootRecovery()
608 if (VbWantShutdown(cparams->gbb->flags)) in VbBootRecovery()
[all …]
Dtpm_bootmode.c139 GoogleBinaryBlockHeader *gbb) in SetTPMBootModeState() argument
160 if (gbb && gbb->minor_version >= 2) { in SetTPMBootModeState()
161 result1 = TlclExtend(HWID_DIGEST_PCR, gbb->hwid_digest, in SetTPMBootModeState()
Dvboot_api_init.c24 GoogleBinaryBlockHeader gbb; in VbInit() local
46 retval = VbGbbReadHeader_static(cparams, &gbb); in VbInit()
51 gbb.flags)); in VbInit()
181 if (gbb.flags & GBB_FLAG_FORCE_DEV_SWITCH_ON) in VbInit()
271 if (gbb.flags & GBB_FLAG_LOAD_OPTION_ROMS) in VbInit()
275 if (is_dev && (gbb.flags & GBB_FLAG_ENABLE_ALTERNATE_OS)) in VbInit()
Dvboot_audio.c211 GoogleBinaryBlockHeader *gbb = cparams->gbb; in VbAudioOpen() local
241 if (gbb->major_version == GBB_MAJOR_VER && gbb->minor_version >= 1 in VbAudioOpen()
242 && (gbb->flags & GBB_FLAG_DEV_SCREEN_SHORT_DELAY)) { in VbAudioOpen()
/external/vboot_reference/utility/
Dload_kernel_test.c86 GoogleBinaryBlockHeader* gbb; in main() local
161 gbb = (GoogleBinaryBlockHeader*)lkp.gbb_data; in main()
162 cparams.gbb = gbb; in main()
163 Memset(gbb, 0, lkp.gbb_size); in main()
164 Memcpy(gbb->signature, GBB_SIGNATURE, GBB_SIGNATURE_SIZE); in main()
165 gbb->major_version = GBB_MAJOR_VER; in main()
166 gbb->minor_version = GBB_MINOR_VER; in main()
167 gbb->header_size = sizeof(GoogleBinaryBlockHeader); in main()
170 gbb->rootkey_offset = gbb->header_size; in main()
171 gbb->rootkey_size = key_size; in main()
[all …]
/external/vboot_reference/firmware/2lib/
D2misc.c34 int vb2_read_gbb_header(struct vb2_context *ctx, struct vb2_gbb_header *gbb) in vb2_read_gbb_header() argument
39 rv = vb2ex_read_resource(ctx, VB2_RES_GBB, 0, gbb, sizeof(*gbb)); in vb2_read_gbb_header()
44 rv = vb2_validate_gbb_signature(gbb->signature); in vb2_read_gbb_header()
49 if (gbb->major_version != VB2_GBB_MAJOR_VER) in vb2_read_gbb_header()
53 if (gbb->minor_version == 0) in vb2_read_gbb_header()
60 if (gbb->header_size < sizeof(*gbb)) in vb2_read_gbb_header()
180 struct vb2_gbb_header *gbb; in vb2_fw_parse_gbb() local
187 gbb = vb2_workbuf_alloc(&wb, sizeof(*gbb)); in vb2_fw_parse_gbb()
188 if (!gbb) in vb2_fw_parse_gbb()
191 rv = vb2_read_gbb_header(ctx, gbb); in vb2_fw_parse_gbb()
[all …]

12