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

Function rdev_chain

src/commonlib/region.c:137–156  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

135}
136
137int rdev_chain(struct region_device *child, const struct region_device *parent,
138 size_t offset, size_t size)
139{
140 struct region req = {
141 .offset = offset,
142 .size = size,
143 };
144
145 if (!normalize_and_ok(&parent->region, &req))
146 return -1;
147
148 /* Keep track of root region device. Note the offsets are relative
149 * to the root device. */
150 child->root = rdev_root(parent);
151 child->ops = NULL;
152 child->region.offset = req.offset;
153 child->region.size = req.size;
154
155 return 0;
156}
157
158static void mem_region_device_init(struct mem_region_device *mdev,
159 const struct region_device_ops *ops, void *base, size_t size)

Callers 15

vboot_locate_firmwareFunction · 0.85
_cbfs_boot_lookupFunction · 0.85
boot_device_subregionFunction · 0.85
find_fmap_directoryFunction · 0.85
fill_data_boundariesFunction · 0.85
region_file_initFunction · 0.85
region_file_dataFunction · 0.85
allocate_metadataFunction · 0.85
init_vpd_rdevFunction · 0.85
elog_find_flashFunction · 0.85
lookup_storeFunction · 0.85

Calls 2

normalize_and_okFunction · 0.85
rdev_rootFunction · 0.85

Tested by 4

fmap_locate_area_as_rdevFunction · 0.68
test_rdev_wrapFunction · 0.68
test_rdev_chainFunction · 0.68
test_rdev_double_chainFunction · 0.68