Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/evbarm/fdt the extent code cannot use the full rang...



details:   https://anonhg.NetBSD.org/src/rev/32af33065b4b
branches:  trunk
changeset: 354942:32af33065b4b
user:      chs <chs%NetBSD.org@localhost>
date:      Wed Jul 05 19:30:51 2017 +0000

description:
the extent code cannot use the full range of u_long,
so ignore the last page before 4GB too.  ok jmcneill@

diffstat:

 sys/arch/evbarm/fdt/fdt_machdep.c |  8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diffs (29 lines):

diff -r f5d4fc7f6ef3 -r 32af33065b4b sys/arch/evbarm/fdt/fdt_machdep.c
--- a/sys/arch/evbarm/fdt/fdt_machdep.c Wed Jul 05 17:54:46 2017 +0000
+++ b/sys/arch/evbarm/fdt/fdt_machdep.c Wed Jul 05 19:30:51 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: fdt_machdep.c,v 1.8 2017/07/05 01:08:45 jmcneill Exp $ */
+/* $NetBSD: fdt_machdep.c,v 1.9 2017/07/05 19:30:51 chs Exp $ */
 
 /*-
  * Copyright (c) 2015-2017 Jared McNeill <jmcneill%invisible.ca@localhost>
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: fdt_machdep.c,v 1.8 2017/07/05 01:08:45 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: fdt_machdep.c,v 1.9 2017/07/05 19:30:51 chs Exp $");
 
 #include "opt_machdep.h"
 #include "opt_ddb.h"
@@ -410,8 +410,8 @@
 
 #if !defined(_LP64)
        /* Cannot map memory above 4GB */
-       if (memory_addr + memory_size > 0x100000000)
-               memory_size = 0x100000000 - memory_addr;
+       if (memory_addr + memory_size >= 0x100000000)
+               memory_size = 0x100000000 - memory_addr - PAGE_SIZE;
 #endif
 
        ram_size = (bus_size_t)memory_size;



Home | Main Index | Thread Index | Old Index