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

Function rdev_eraseat

src/commonlib/region.c:115–135  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

113}
114
115ssize_t rdev_eraseat(const struct region_device *rd, size_t offset,
116 size_t size)
117{
118 const struct region_device *rdev;
119 struct region req = {
120 .offset = offset,
121 .size = size,
122 };
123
124 if (!normalize_and_ok(&rd->region, &req))
125 return -1;
126
127 rdev = rdev_root(rd);
128
129 /* If the eraseat ptr is NULL we assume that the erase
130 * function was completed successfully. */
131 if (rdev->ops->eraseat == NULL)
132 return size;
133
134 return rdev->ops->eraseat(rdev, req.offset, req.size);
135}
136
137int rdev_chain(struct region_device *child, const struct region_device *parent,
138 size_t offset, size_t size)

Callers 15

erase_nvramFunction · 0.85
update_spd_cacheFunction · 0.85
fmap_overwrite_areaFunction · 0.85
handle_need_to_emptyFunction · 0.85
elog_nv_eraseFunction · 0.85
erase_regionFunction · 0.85
smmstore_clear_regionFunction · 0.85
smmstore_rawclear_regionFunction · 0.85
xlate_eraseatFunction · 0.85
incoherent_eraseatFunction · 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