Module Name: src Committed By: jmcneill Date: Tue Nov 13 10:30:35 UTC 2018
Modified Files: src/sys/arch/aarch64/aarch64: aarch64_machdep.c Log Message: Physical end should be the end of the last range, not the first. To generate a diff of this commit: cvs rdiff -u -r1.20 -r1.21 src/sys/arch/aarch64/aarch64/aarch64_machdep.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/arch/aarch64/aarch64/aarch64_machdep.c diff -u src/sys/arch/aarch64/aarch64/aarch64_machdep.c:1.20 src/sys/arch/aarch64/aarch64/aarch64_machdep.c:1.21 --- src/sys/arch/aarch64/aarch64/aarch64_machdep.c:1.20 Sat Nov 10 18:29:08 2018 +++ src/sys/arch/aarch64/aarch64/aarch64_machdep.c Tue Nov 13 10:30:35 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: aarch64_machdep.c,v 1.20 2018/11/10 18:29:08 ryo Exp $ */ +/* $NetBSD: aarch64_machdep.c,v 1.21 2018/11/13 10:30:35 jmcneill Exp $ */ /*- * Copyright (c) 2014 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(1, "$NetBSD: aarch64_machdep.c,v 1.20 2018/11/10 18:29:08 ryo Exp $"); +__KERNEL_RCSID(1, "$NetBSD: aarch64_machdep.c,v 1.21 2018/11/13 10:30:35 jmcneill Exp $"); #include "opt_arm_debug.h" #include "opt_ddb.h" @@ -247,7 +247,8 @@ initarm_common(vaddr_t kvm_base, vsize_t /* XXX: arm/arm32/bus_dma.c refers physical_{start,end} */ physical_start = bootconfig.dram[0].address; - physical_end = physical_start + ptoa(bootconfig.dram[0].pages); + physical_end = bootconfig.dram[bootconfig.dramblocks - 1].address + + ptoa(bootconfig.dram[bootconfig.dramblocks - 1].pages); /* * msgbuf is allocated from the bottom of any one of memory blocks