Module Name: src Committed By: jakllsch Date: Sun Aug 20 21:00:01 UTC 2017
Modified Files: src/sys/arch/evbarm/fdt: fdt_machdep.c Log Message: Ignore 0-sized memory regions in the FDT. To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.12 src/sys/arch/evbarm/fdt/fdt_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/evbarm/fdt/fdt_machdep.c diff -u src/sys/arch/evbarm/fdt/fdt_machdep.c:1.11 src/sys/arch/evbarm/fdt/fdt_machdep.c:1.12 --- src/sys/arch/evbarm/fdt/fdt_machdep.c:1.11 Fri Jul 21 01:00:08 2017 +++ src/sys/arch/evbarm/fdt/fdt_machdep.c Sun Aug 20 21:00:01 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: fdt_machdep.c,v 1.11 2017/07/21 01:00:08 jmcneill Exp $ */ +/* $NetBSD: fdt_machdep.c,v 1.12 2017/08/20 21:00:01 jakllsch Exp $ */ /*- * Copyright (c) 2015-2017 Jared McNeill <jmcne...@invisible.ca> @@ -27,7 +27,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: fdt_machdep.c,v 1.11 2017/07/21 01:00:08 jmcneill Exp $"); +__KERNEL_RCSID(0, "$NetBSD: fdt_machdep.c,v 1.12 2017/08/20 21:00:01 jakllsch Exp $"); #include "opt_machdep.h" #include "opt_ddb.h" @@ -235,7 +235,7 @@ fdt_build_bootconfig(uint64_t mem_addr, for (index = 0; fdtbus_get_reg64(memory, index, &addr, &size) == 0; index++) { - if (addr >= max_addr) + if (addr >= max_addr || size == 0) continue; if (addr + size > max_addr) size = max_addr - addr;