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

Function regions_collide

util/ifdtool/ifdtool.c:2023–2030  ·  view source on GitHub ↗

* Determine if two memory regions overlap. * * @param r1, r2 Memory regions to compare. * @return 0 if the two regions are separate * @return 1 if the two regions overlap */

Source from the content-addressed store, hash-verified

2021 * @return 1 if the two regions overlap
2022 */
2023static int regions_collide(const struct region *r1, const struct region *r2)
2024{
2025 if ((r1->size == 0) || (r2->size == 0))
2026 return 0;
2027
2028 /* r1 should be either completely below or completely above r2 */
2029 return !(r1->limit < r2->base || r1->base > r2->limit);
2030}
2031
2032static void new_layout(const char *filename, char *image, int size,
2033 const char *layout_fname)

Callers 1

new_layoutFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected