Module Name:    src
Committed By:   snj
Date:           Fri Aug 25 05:39:53 UTC 2017

Modified Files:
        src/sys/arch/evbarm/fdt [netbsd-8]: fdt_machdep.c

Log Message:
Pull up following revision(s) (requested by jakllsch in ticket #220):
        sys/arch/evbarm/fdt/fdt_machdep.c: revision 1.12
Ignore 0-sized memory regions in the FDT.


To generate a diff of this commit:
cvs rdiff -u -r1.4.2.4 -r1.4.2.5 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.4.2.4 src/sys/arch/evbarm/fdt/fdt_machdep.c:1.4.2.5
--- src/sys/arch/evbarm/fdt/fdt_machdep.c:1.4.2.4	Tue Jul 25 02:09:32 2017
+++ src/sys/arch/evbarm/fdt/fdt_machdep.c	Fri Aug 25 05:39:52 2017
@@ -1,4 +1,4 @@
-/* $NetBSD: fdt_machdep.c,v 1.4.2.4 2017/07/25 02:09:32 snj Exp $ */
+/* $NetBSD: fdt_machdep.c,v 1.4.2.5 2017/08/25 05:39:52 snj Exp $ */
 
 /*-
  * Copyright (c) 2015-2017 Jared McNeill <[email protected]>
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: fdt_machdep.c,v 1.4.2.4 2017/07/25 02:09:32 snj Exp $");
+__KERNEL_RCSID(0, "$NetBSD: fdt_machdep.c,v 1.4.2.5 2017/08/25 05:39:52 snj 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;

Reply via email to