[PATCH 10/10] commands: iomem: point out [R]eserved regions
Ahmad Fatoum
a.fatoum at pengutronix.de
Mon Aug 15 08:32:09 PDT 2022
Now that we define IORESOURCE_BUSY as meaning that a region possibly
contains secure firmware, it's useful to have this information in the
iomem output as well, so add it.
Signed-off-by: Ahmad Fatoum <a.fatoum at pengutronix.de>
---
commands/iomemport.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/commands/iomemport.c b/commands/iomemport.c
index d0cfc413c262..f2baa0e29397 100644
--- a/commands/iomemport.c
+++ b/commands/iomemport.c
@@ -16,11 +16,14 @@ static void __print_resources(struct resource *res, int indent)
for (i = 0; i < indent; i++)
printf(" ");
- printf("%pa - %pa (size %pa) %s\n",
- &res->start, &res->end, &size, res->name);
+ printf("%pa - %pa (size %pa) %s%s\n",
+ &res->start, &res->end, &size,
+ res->flags & IORESOURCE_BUSY ? "[R] " : "",
+ res->name);
- list_for_each_entry(r, &res->children, sibling)
+ list_for_each_entry(r, &res->children, sibling) {
__print_resources(r, indent + 1);
+ }
}
static void print_resources(struct resource *res)
--
2.30.2
More information about the barebox
mailing list