Module Name: src
Committed By: matt
Date: Thu Jan 14 00:50:01 UTC 2010
Modified Files:
src/sys/arch/hpcmips/hpcmips [matt-nb5-mips64]: bus_dma.c machdep.c
src/sys/arch/hpcmips/vr [matt-nb5-mips64]: vrdcu.c
Log Message:
more avail_end/avail_start changes
To generate a diff of this commit:
cvs rdiff -u -r1.32.16.1 -r1.32.16.2 src/sys/arch/hpcmips/hpcmips/bus_dma.c
cvs rdiff -u -r1.96.10.2 -r1.96.10.3 src/sys/arch/hpcmips/hpcmips/machdep.c
cvs rdiff -u -r1.5 -r1.5.96.1 src/sys/arch/hpcmips/vr/vrdcu.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/hpcmips/hpcmips/bus_dma.c
diff -u src/sys/arch/hpcmips/hpcmips/bus_dma.c:1.32.16.1 src/sys/arch/hpcmips/hpcmips/bus_dma.c:1.32.16.2
--- src/sys/arch/hpcmips/hpcmips/bus_dma.c:1.32.16.1 Wed Aug 26 03:46:39 2009
+++ src/sys/arch/hpcmips/hpcmips/bus_dma.c Thu Jan 14 00:50:01 2010
@@ -1,4 +1,4 @@
-/* $NetBSD: bus_dma.c,v 1.32.16.1 2009/08/26 03:46:39 matt Exp $ */
+/* $NetBSD: bus_dma.c,v 1.32.16.2 2010/01/14 00:50:01 matt Exp $ */
/*-
* Copyright (c) 1997, 1998 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: bus_dma.c,v 1.32.16.1 2009/08/26 03:46:39 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: bus_dma.c,v 1.32.16.2 2010/01/14 00:50:01 matt Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -514,13 +514,12 @@
bus_size_t boundary, bus_dma_segment_t *segs, int nsegs, int *rsegs,
int flags)
{
- extern paddr_t avail_start, avail_end; /* XXX */
psize_t high;
- high = avail_end - PAGE_SIZE;
+ high = mips_avail_end - PAGE_SIZE;
return (_hpcmips_bd_mem_alloc_range(t, size, alignment, boundary,
- segs, nsegs, rsegs, flags, avail_start, high));
+ segs, nsegs, rsegs, flags, mips_avail_start, high));
}
/*
@@ -538,10 +537,9 @@
struct pglist mlist;
int curseg, error;
#ifdef DIAGNOSTIC
- extern paddr_t avail_start, avail_end; /* XXX */
- high = high<(avail_end - PAGE_SIZE)? high: (avail_end - PAGE_SIZE);
- low = low>avail_start? low: avail_start;
+ high = high<(mips_avail_end - PAGE_SIZE)? high: (mips_avail_end - PAGE_SIZE);
+ low = low>mips_avail_start? low: mips_avail_start;
#endif
/* Always round the size. */
size = round_page(size);
Index: src/sys/arch/hpcmips/hpcmips/machdep.c
diff -u src/sys/arch/hpcmips/hpcmips/machdep.c:1.96.10.2 src/sys/arch/hpcmips/hpcmips/machdep.c:1.96.10.3
--- src/sys/arch/hpcmips/hpcmips/machdep.c:1.96.10.2 Mon Sep 7 23:46:46 2009
+++ src/sys/arch/hpcmips/hpcmips/machdep.c Thu Jan 14 00:50:01 2010
@@ -1,4 +1,4 @@
-/* $NetBSD: machdep.c,v 1.96.10.2 2009/09/07 23:46:46 matt Exp $ */
+/* $NetBSD: machdep.c,v 1.96.10.3 2010/01/14 00:50:01 matt Exp $ */
/*-
* Copyright (c) 1999 Shin Takemura, All rights reserved.
@@ -108,7 +108,7 @@
*/
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.96.10.2 2009/09/07 23:46:46 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.96.10.3 2010/01/14 00:50:01 matt Exp $");
#include "opt_vr41xx.h"
#include "opt_tx39xx.h"
@@ -258,7 +258,6 @@
#ifdef KLOADER
struct kloader_bootinfo kbi;
#endif
- extern struct user *proc0paddr;
extern char edata[], end[];
#if NKSYMS || defined(DDB) || defined(LKM)
extern void *esym;
@@ -454,14 +453,7 @@
/*
* Alloc u pages for lwp0 stealing KSEG0 memory.
*/
- lwp0.l_addr = proc0paddr = (struct user *)kernend;
- lwp0.l_md.md_regs =
- (struct frame *)((char *)kernend + UPAGES * PAGE_SIZE) - 1;
- memset(kernend, 0, UPAGES * PAGE_SIZE);
- lwp0.l_addr->u_pcb.pcb_context.val[11] =
- MIPS_INT_MASK | MIPS_SR_INT_IE; /* SR */
-
- kernend = (char *)kernend + UPAGES * PAGE_SIZE;
+ mips_init_lwp0_uarea();
/* Initialize console and KGDB serial port. */
(*platform.cons_init)();
@@ -508,22 +500,8 @@
physmem += atop(mem_clusters[i].size);
}
- /* Cluster 0 is always the kernel, which doesn't get loaded. */
- for (i = 1; i < mem_cluster_cnt; i++) {
- paddr_t start;
- psize_t size;
-
- start = (paddr_t)mem_clusters[i].start;
- size = (psize_t)mem_clusters[i].size;
-
- printf("loading %#"PRIxPADDR",%#"PRIxPSIZE"\n", start, size);
-
- memset((void *)MIPS_PHYS_TO_KSEG1(start), 0, size);
-
- uvm_page_physload(atop(start), atop(start + size),
- atop(start), atop(start + size),
- VM_FREELIST_DEFAULT);
- }
+ mips_page_physload(MIPS_KSEG0_START, (vaddr_t)kernend,
+ mem_clusters, mem_cluster_cnt, NULL, 0);
/*
* Initialize error message buffer (at end of core).
Index: src/sys/arch/hpcmips/vr/vrdcu.c
diff -u src/sys/arch/hpcmips/vr/vrdcu.c:1.5 src/sys/arch/hpcmips/vr/vrdcu.c:1.5.96.1
--- src/sys/arch/hpcmips/vr/vrdcu.c:1.5 Sun Dec 11 12:17:34 2005
+++ src/sys/arch/hpcmips/vr/vrdcu.c Thu Jan 14 00:50:01 2010
@@ -24,7 +24,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: vrdcu.c,v 1.5 2005/12/11 12:17:34 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vrdcu.c,v 1.5.96.1 2010/01/14 00:50:01 matt Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -219,17 +219,16 @@
bus_size_t boundary, bus_dma_segment_t *segs,
int nsegs, int *rsegs, int flags)
{
- extern paddr_t avail_start, avail_end; /* XXX */
paddr_t high;
DPRINTFN(1, ("_vrdcu_dmamem_alloc\n"));
- high = (avail_end < VRDMAAU_BOUNCE_THRESHOLD ?
- avail_end : VRDMAAU_BOUNCE_THRESHOLD) - PAGE_SIZE;
+ high = (mips_avail_end < VRDMAAU_BOUNCE_THRESHOLD ?
+ mips_avail_end : VRDMAAU_BOUNCE_THRESHOLD) - PAGE_SIZE;
alignment = alignment > VRDMAAU_ALIGNMENT ?
alignment : VRDMAAU_ALIGNMENT;
return _hpcmips_bd_mem_alloc_range(t, size, alignment, boundary,
segs, nsegs, rsegs, flags,
- avail_start, high);
+ mips_avail_start, high);
}