From 3a79cdc73aaaafe455f0b87d4e422d4ecc8e0b34 Mon Sep 17 00:00:00 2001 From: Ian Lepore Date: Tue, 30 Sep 2014 21:28:05 +0000 Subject: [PATCH] When building the lists of available memory, actually honor the exclusion flags, like the comment says it does. Pointy hat: ian Submitted by: Svatopluk Kraus --- sys/arm/arm/physmem.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/sys/arm/arm/physmem.c b/sys/arm/arm/physmem.c index d42cac481ac..8618e46e27a 100644 --- a/sys/arm/arm/physmem.c +++ b/sys/arm/arm/physmem.c @@ -168,6 +168,12 @@ regions_to_avail(vm_paddr_t *avail, uint32_t exflags) end = hwp->size + start; realmem += arm32_btop(end - start); for (exi = 0, exp = exregions; exi < excnt; ++exi, ++exp) { + /* + * If the excluded region does not match given flags, + * continue checking with the next excluded region. + */ + if ((exp->flags & exflags) == 0) + continue; xstart = exp->addr; xend = exp->size + xstart; /*