MCPcopy Create free account
hub / github.com/coreboot/coreboot / mock_rdev

Function mock_rdev

tests/drivers/efivars.c:92–102  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

90static const char *name = "coreboot";
91
92static void mock_rdev(bool init)
93{
94 if (init) {
95 /* Emulate NOR flash by setting all bits to 1 */
96 memset(flash_buffer, 0xff, sizeof(flash_buffer));
97 /* Place _FVH and VIH headers, as well as test data */
98 memcpy(flash_buffer, FVH, sizeof(FVH));
99 }
100
101 rdev_chain_mem_rw(&flash_rdev_rw, flash_buffer, sizeof(flash_buffer));
102}
103
104static const EFI_GUID EficorebootNvDataGuid = {
105 0xceae4c1d, 0x335b, 0x4685, { 0xa4, 0xa0, 0xfc, 0x4a, 0x94, 0xee, 0xa0, 0x85 } };

Callers 3

efi_test_headerFunction · 0.85
efi_test_new_writeFunction · 0.85

Calls 3

rdev_chain_mem_rwFunction · 0.85
memsetFunction · 0.50
memcpyFunction · 0.50

Tested by

no test coverage detected