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

Function incoherent_rdev_init

src/commonlib/region.c:519–538  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

517};
518
519const struct region_device *incoherent_rdev_init(struct incoherent_rdev *irdev,
520 const struct region *r,
521 const struct region_device *read,
522 const struct region_device *write)
523{
524 const size_t size = region_sz(r);
525
526 if (size != region_device_sz(read) || size != region_device_sz(write))
527 return NULL;
528
529 /* The region is represented as offset 0 to size. That way, the generic
530 * rdev operations can be called on the read or write implementation
531 * without any unnecessary translation because the offsets all start
532 * at 0. */
533 region_device_init(&irdev->rdev, &incoherent_rdev_ops, 0, size);
534 irdev->read = read;
535 irdev->write = write;
536
537 return &irdev->rdev;
538}

Callers 3

lookup_storeFunction · 0.85
update_mrc_cache_by_typeFunction · 0.85

Calls 3

region_szFunction · 0.85
region_device_szFunction · 0.85
region_device_initFunction · 0.85

Tested by

no test coverage detected