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

Function xlate_writeat

src/commonlib/region.c:406–425  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

404}
405
406static ssize_t xlate_writeat(const struct region_device *rd, const void *b,
407 size_t offset, size_t size)
408{
409 struct region req = {
410 .offset = offset,
411 .size = size,
412 };
413 const struct xlate_window *xlwindow;
414 const struct xlate_region_device *xldev;
415
416 xldev = container_of(rd, typeof(*xldev), rdev);
417
418 xlwindow = xlate_find_window(xldev, &req);
419 if (!xlwindow)
420 return -1;
421
422 offset -= region_offset(&xlwindow->sub_region);
423
424 return rdev_writeat(xlwindow->access_dev, b, offset, size);
425}
426
427static ssize_t xlate_eraseat(const struct region_device *rd,
428 size_t offset, size_t size)

Callers

nothing calls this directly

Calls 3

xlate_find_windowFunction · 0.85
region_offsetFunction · 0.85
rdev_writeatFunction · 0.85

Tested by

no test coverage detected