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

Function xlate_readat

src/commonlib/region.c:385–404  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

383}
384
385static ssize_t xlate_readat(const struct region_device *rd, void *b,
386 size_t offset, size_t size)
387{
388 struct region req = {
389 .offset = offset,
390 .size = size,
391 };
392 const struct xlate_window *xlwindow;
393 const struct xlate_region_device *xldev;
394
395 xldev = container_of(rd, typeof(*xldev), rdev);
396
397 xlwindow = xlate_find_window(xldev, &req);
398 if (!xlwindow)
399 return -1;
400
401 offset -= region_offset(&xlwindow->sub_region);
402
403 return rdev_readat(xlwindow->access_dev, b, offset, size);
404}
405
406static ssize_t xlate_writeat(const struct region_device *rd, const void *b,
407 size_t offset, size_t size)

Callers

nothing calls this directly

Calls 3

xlate_find_windowFunction · 0.85
region_offsetFunction · 0.85
rdev_readatFunction · 0.85

Tested by

no test coverage detected