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

Function xlate_mmap

src/commonlib/region.c:351–370  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

349}
350
351static void *xlate_mmap(const struct region_device *rd, size_t offset,
352 size_t size)
353{
354 const struct xlate_region_device *xldev;
355 struct region req = {
356 .offset = offset,
357 .size = size,
358 };
359 const struct xlate_window *xlwindow;
360
361 xldev = container_of(rd, typeof(*xldev), rdev);
362
363 xlwindow = xlate_find_window(xldev, &req);
364 if (!xlwindow)
365 return NULL;
366
367 offset -= region_offset(&xlwindow->sub_region);
368
369 return rdev_mmap(xlwindow->access_dev, offset, size);
370}
371
372static int xlate_munmap(const struct region_device *rd __always_unused,
373 void *mapping __always_unused)

Callers

nothing calls this directly

Calls 3

xlate_find_windowFunction · 0.85
region_offsetFunction · 0.85
rdev_mmapFunction · 0.85

Tested by

no test coverage detected