From 3a3dfb281537a228c3a13f1466e3dd0b0d9b5610 Mon Sep 17 00:00:00 2001 From: Mark Johnston Date: Tue, 5 Mar 2019 23:58:16 +0000 Subject: [PATCH] Initialize dump_avail[] on riscv. Submitted by: Mitchell Horne Differential Revision: https://reviews.freebsd.org/D19170 --- sys/riscv/riscv/pmap.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sys/riscv/riscv/pmap.c b/sys/riscv/riscv/pmap.c index a4e5bb29da7f..38315490784b 100644 --- a/sys/riscv/riscv/pmap.c +++ b/sys/riscv/riscv/pmap.c @@ -628,7 +628,7 @@ pmap_bootstrap(vm_offset_t l1pt, vm_paddr_t kernstart, vm_size_t kernlen) pa = pmap_early_vtophys(l1pt, freemempos); - /* Initialize phys_avail. */ + /* Initialize phys_avail and dump_avail. */ for (avail_slot = map_slot = physmem = 0; map_slot < physmap_idx * 2; map_slot += 2) { start = physmap[map_slot]; @@ -636,6 +636,9 @@ pmap_bootstrap(vm_offset_t l1pt, vm_paddr_t kernstart, vm_size_t kernlen) if (start == end) continue; + dump_avail[map_slot] = start; + dump_avail[map_slot + 1] = end; + if (start >= kernstart && end <= pa) continue;