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

Function rdev_mmap

src/commonlib/region.c:47–64  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

45}
46
47void *rdev_mmap(const struct region_device *rd, size_t offset, size_t size)
48{
49 const struct region_device *rdev;
50 struct region req = {
51 .offset = offset,
52 .size = size,
53 };
54
55 if (!normalize_and_ok(&rd->region, &req))
56 return NULL;
57
58 rdev = rdev_root(rd);
59
60 if (rdev->ops->mmap == NULL)
61 return NULL;
62
63 return rdev->ops->mmap(rdev, req.offset, req.size);
64}
65
66int rdev_munmap(const struct region_device *rd, void *mapping)
67{

Callers 15

find_fmap_directoryFunction · 0.85
fmap_locate_areaFunction · 0.85
fmap_find_region_nameFunction · 0.85
elog_get_event_bufferFunction · 0.85
elog_is_buffer_clearFunction · 0.85
elog_is_header_validFunction · 0.85
elog_nv_writeFunction · 0.85
mmap_com_bufFunction · 0.85
locate_vbt_vbiosFunction · 0.85
xlate_mmapFunction · 0.85

Calls 2

normalize_and_okFunction · 0.85
rdev_rootFunction · 0.85

Tested by 6

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