summaryrefslogtreecommitdiff
path: root/src/commonlib/include
diff options
context:
space:
mode:
authorAaron Durbin <adurbin@chromium.org>2017-12-14 15:22:04 -0700
committerAaron Durbin <adurbin@chromium.org>2017-12-15 23:35:05 +0000
commit02103e34d76c12b46b57143cd11d96758219423d (patch)
treedb253313a59f1d81ad1691f9eca1340682944abd /src/commonlib/include
parent9ab8ae6a55681874ec194bc144077ded5363a317 (diff)
downloadcoreboot-02103e34d76c12b46b57143cd11d96758219423d.tar.xz
commonlib/region: expose subregion helper function
Export region_is_subregion() for determinig if a region is a child of a parent region. BUG=b:69614064 Change-Id: I6363fe4fdb33342f9d025a726ec7e17e87adf7e0 Signed-off-by: Aaron Durbn <adurbin@chromium.org> Reviewed-on: https://review.coreboot.org/22878 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Furquan Shaikh <furquan@google.com>
Diffstat (limited to 'src/commonlib/include')
-rw-r--r--src/commonlib/include/commonlib/region.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/commonlib/include/commonlib/region.h b/src/commonlib/include/commonlib/region.h
index 3f7d3bd52f..45484dddd6 100644
--- a/src/commonlib/include/commonlib/region.h
+++ b/src/commonlib/include/commonlib/region.h
@@ -112,6 +112,9 @@ void region_device_init(struct region_device *rdev,
const struct region_device_ops *ops, size_t offset,
size_t size);
+/* Return 1 if child is subregion of parent, else 0. */
+int region_is_subregion(const struct region *p, const struct region *c);
+
static inline size_t region_offset(const struct region *r)
{
return r->offset;