Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-6]: src/sys/arch/i386/i386 Pull up following revision(s) (request...
details: https://anonhg.NetBSD.org/src/rev/d948c3ed42c7
branches: netbsd-6
changeset: 773891:d948c3ed42c7
user: riz <riz%NetBSD.org@localhost>
date: Wed Mar 07 23:31:41 2012 +0000
description:
Pull up following revision(s) (requested by bouyer in ticket #93):
sys/arch/i386/i386/machdep.c: revision 1.725
cast xen_start_info.nr_pages to paddr_t, so that ctob() won't truncate
the addresses to 32bits. Fix avail memory when allocating more than 4GB
to a XEN3PAE domU.
diffstat:
sys/arch/i386/i386/machdep.c | 15 ++++++++-------
1 files changed, 8 insertions(+), 7 deletions(-)
diffs (44 lines):
diff -r 486d7d1f760d -r d948c3ed42c7 sys/arch/i386/i386/machdep.c
--- a/sys/arch/i386/i386/machdep.c Wed Mar 07 23:27:19 2012 +0000
+++ b/sys/arch/i386/i386/machdep.c Wed Mar 07 23:31:41 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: machdep.c,v 1.717.2.4 2012/03/05 20:18:02 sborrill Exp $ */
+/* $NetBSD: machdep.c,v 1.717.2.5 2012/03/07 23:31:41 riz Exp $ */
/*-
* Copyright (c) 1996, 1997, 1998, 2000, 2004, 2006, 2008, 2009
@@ -67,7 +67,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.717.2.4 2012/03/05 20:18:02 sborrill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.717.2.5 2012/03/07 23:31:41 riz Exp $");
#include "opt_beep.h"
#include "opt_compat_ibcs2.h"
@@ -1404,9 +1404,9 @@
/* Make sure the end of the space used by the kernel is rounded. */
first_avail = round_page(first_avail);
avail_start = first_avail;
- avail_end = ctob(xen_start_info.nr_pages) + XPMAP_OFFSET;
+ avail_end = ctob((paddr_t)xen_start_info.nr_pages) + XPMAP_OFFSET;
pmap_pa_start = (KERNTEXTOFF - KERNBASE);
- pmap_pa_end = pmap_pa_start + ctob(xen_start_info.nr_pages);
+ pmap_pa_end = pmap_pa_start + ctob((paddr_t)xen_start_info.nr_pages);
mem_clusters[0].start = avail_start;
mem_clusters[0].size = avail_end - avail_start;
mem_cluster_cnt++;
@@ -1458,9 +1458,10 @@
initx86_load_memmap(first_avail);
#else /* !XEN */
- XENPRINTK(("load the memory cluster %p(%d) - %p(%ld)\n",
- (void *)(long)avail_start, (int)atop(avail_start),
- (void *)(long)avail_end, (int)atop(avail_end)));
+ XENPRINTK(("load the memory cluster 0x%" PRIx64 " (%" PRId64 ") - "
+ "0x%" PRIx64 " (%" PRId64 ")\n",
+ (uint64_t)avail_start, (uint64_t)atop(avail_start),
+ (uint64_t)avail_end, (uint64_t)atop(avail_end)));
uvm_page_physload(atop(avail_start), atop(avail_end),
atop(avail_start), atop(avail_end),
VM_FREELIST_DEFAULT);
Home |
Main Index |
Thread Index |
Old Index