Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/sun2/include Now use the proper DVMA map size depen...



details:   https://anonhg.NetBSD.org/src/rev/f15436ed152c
branches:  trunk
changeset: 508125:f15436ed152c
user:      fredette <fredette%NetBSD.org@localhost>
date:      Fri Apr 06 13:03:14 2001 +0000

description:
Now use the proper DVMA map size depending on what
machine type we're on.
Removed all prototypes, since we're going bus_dma.

diffstat:

 sys/arch/sun2/include/dvma.h |  27 ++++++++-------------------
 1 files changed, 8 insertions(+), 19 deletions(-)

diffs (52 lines):

diff -r 7846226f5667 -r f15436ed152c sys/arch/sun2/include/dvma.h
--- a/sys/arch/sun2/include/dvma.h      Fri Apr 06 11:13:45 2001 +0000
+++ b/sys/arch/sun2/include/dvma.h      Fri Apr 06 13:03:14 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: dvma.h,v 1.1 2001/03/29 04:41:13 fredette Exp $        */
+/*     $NetBSD: dvma.h,v 1.2 2001/04/06 13:03:14 fredette Exp $        */
 
 /*-
  * Copyright (c) 1996 The NetBSD Foundation, Inc.
@@ -47,6 +47,8 @@
  * DVMA space.  
  */
 
+#include <machine/idprom.h>
+
 /*
  * Note that while the DVMA harware makes the last 1MB visible
  * for secondary masters, the PROM "owns" the last page of it.
@@ -54,11 +56,11 @@
  * Also note that OBIO devices can actually see all of
  * of kernel virtual space.
  */
-/* XXX fredette - the MAP_SIZE value is for the 2/120; the
-   2/50 can have a MAP_SIZE of 0x000F8000: */
-#define DVMA_MAP_BASE  0x00F00000
-#define DVMA_MAP_SIZE  0x00040000
-#define DVMA_MAP_AVAIL (DVMA_MAP_SIZE-NBPG)
+#define DVMA_MAP_BASE          0x00F00000
+#define DVMA_MAP_SIZE_120      0x00040000
+#define DVMA_MAP_SIZE_50       0x000F8000
+#define DVMA_MAP_SIZE          (cpu_machine_id == SUN2_MACH_120 ? DVMA_MAP_SIZE_120 : DVMA_MAP_SIZE_50)
+#define DVMA_MAP_AVAIL         (DVMA_MAP_SIZE-NBPG)
 
 /*
  * To convert an address in DVMA space to a slave address,
@@ -74,16 +76,3 @@
 #define DVMA_VME_SLAVE_BASE    0x00F00000
 #define DVMA_VME_SLAVE_MASK    0x000Fffff      /*  1MB */
 
-void dvma_init __P((void));
-
-/* Allocate/free actual pages of DVMA space. */
-void * dvma_malloc __P((size_t bytes));
-void dvma_free(void *addr, size_t bytes);
-
-/* Remap/unmap kernel memory in DVMA space. */
-void * dvma_mapin __P((void *kva, int len, int canwait));
-void dvma_mapout __P((void *dvma_addr, int len));
-
-/* Convert a kernel DVMA pointer to a slave address. */
-u_long dvma_kvtopa __P((void *kva, int bus));
-



Home | Main Index | Thread Index | Old Index