diff --git a/sys/arm64/arm64/pmap.c b/sys/arm64/arm64/pmap.c --- a/sys/arm64/arm64/pmap.c +++ b/sys/arm64/arm64/pmap.c @@ -1437,7 +1437,6 @@ * Rebuild physmap one more time, we may have excluded more regions from * allocation since pmap_bootstrap(). */ - bzero(physmap, sizeof(physmap)); physmap_idx = physmem_avail(physmap, nitems(physmap)); physmap_idx /= 2; diff --git a/sys/kern/subr_physmem.c b/sys/kern/subr_physmem.c --- a/sys/kern/subr_physmem.c +++ b/sys/kern/subr_physmem.c @@ -189,6 +189,8 @@ const struct region *exp, *hwp; uint64_t availsz; + bzero(avail, maxavail * sizeof(vm_paddr_t)); + totalmem = 0; availmem = 0; availsz = 0; @@ -587,7 +589,6 @@ rid = 0; /* Get the avail list. */ - bzero(avail_list, sizeof(avail_list)); regions_to_avail(avail_list, EXFLAG_NOALLOC | EXFLAG_NODUMP, PHYS_AVAIL_COUNT, 0, NULL, NULL);