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

Function rdev_readat

src/commonlib/region.c:78–93  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

76}
77
78ssize_t rdev_readat(const struct region_device *rd, void *b, size_t offset,
79 size_t size)
80{
81 const struct region_device *rdev;
82 struct region req = {
83 .offset = offset,
84 .size = size,
85 };
86
87 if (!normalize_and_ok(&rd->region, &req))
88 return -1;
89
90 rdev = rdev_root(rd);
91
92 return rdev->ops->readat(rdev, b, req.offset, req.size);
93}
94
95ssize_t rdev_writeat(const struct region_device *rd, const void *b,
96 size_t offset, size_t size)

Callers 15

simple_spi_testFunction · 0.85
init_vbnvFunction · 0.85
vb2ex_read_resourceFunction · 0.85
hash_bodyFunction · 0.85
tpm_measure_regionFunction · 0.85
cbfs_load_and_decompressFunction · 0.85
cbfs_prog_stage_loadFunction · 0.85
setup_preram_cacheFunction · 0.85
fmap_read_areaFunction · 0.85
fmap_add_cbmem_cacheFunction · 0.85
read_mbFunction · 0.85

Calls 2

normalize_and_okFunction · 0.85
rdev_rootFunction · 0.85

Tested by 9

test_rdev_successFunction · 0.68
test_rdev_failureFunction · 0.68
test_rdev_wrapFunction · 0.68
test_rdev_chainFunction · 0.68
test_rdev_double_chainFunction · 0.68
test_mem_rdevFunction · 0.68