Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/usermode/usermode pmap_memory isn't a static array ...
details: https://anonhg.NetBSD.org/src/rev/acd1cd3f4df7
branches: trunk
changeset: 768207:acd1cd3f4df7
user: jmcneill <jmcneill%NetBSD.org@localhost>
date: Thu Aug 11 22:26:18 2011 +0000
description:
pmap_memory isn't a static array anymore so sizeof doesn't work on it
diffstat:
sys/arch/usermode/usermode/pmap.c | 9 +++++----
1 files changed, 5 insertions(+), 4 deletions(-)
diffs (41 lines):
diff -r 000d2fd400a9 -r acd1cd3f4df7 sys/arch/usermode/usermode/pmap.c
--- a/sys/arch/usermode/usermode/pmap.c Thu Aug 11 21:23:09 2011 +0000
+++ b/sys/arch/usermode/usermode/pmap.c Thu Aug 11 22:26:18 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pmap.c,v 1.6 2011/08/10 01:32:44 jmcneill Exp $ */
+/* $NetBSD: pmap.c,v 1.7 2011/08/11 22:26:18 jmcneill Exp $ */
/*-
* Copyright (c) 2007 Jared D. McNeill <jmcneill%invisible.ca@localhost>
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.6 2011/08/10 01:32:44 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.7 2011/08/11 22:26:18 jmcneill Exp $");
#include <sys/types.h>
#include <sys/param.h>
@@ -45,6 +45,7 @@
struct pmap * const kernel_pmap_ptr = &pmap_kernel_store;
static uint8_t *pmap_memory;
+static vsize_t pmap_memory_size = 1024 * MEMSIZE;
static vaddr_t virtual_avail, virtual_end;
static vaddr_t pmap_maxkvaddr;
@@ -53,12 +54,12 @@
void
pmap_bootstrap(void)
{
- pmap_memory = calloc(1, 1024 * MEMSIZE);
+ pmap_memory = calloc(1, pmap_memory_size);
if (pmap_memory == NULL)
panic("pmap_bootstrap: no memory");
virtual_avail = (vaddr_t)pmap_memory;
- virtual_end = virtual_avail + sizeof(pmap_memory);
+ virtual_end = virtual_avail + pmap_memory_size;
uvm_page_physload(atop(virtual_avail),
atop(virtual_end),
Home |
Main Index |
Thread Index |
Old Index