summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys/arch/sparc/include/param.h26
1 files changed, 25 insertions, 1 deletions
diff --git a/sys/arch/sparc/include/param.h b/sys/arch/sparc/include/param.h
index a1c2959d7dd..55c3f1f61b9 100644
--- a/sys/arch/sparc/include/param.h
+++ b/sys/arch/sparc/include/param.h
@@ -1,4 +1,4 @@
-/* $NetBSD: param.h,v 1.14 1995/06/26 06:56:14 cgd Exp $ */
+/* $NetBSD: param.h,v 1.15 1995/06/26 22:36:32 pk Exp $ */
/*
* Copyright (c) 1992, 1993
@@ -157,6 +157,30 @@ extern int nbpg, pgofset, pgshift;
*/
#define bdbtofsb(bn) ((bn) / (BLKDEV_IOSIZE / DEV_BSIZE))
+/*
+ * dvmamap manages a range of DVMA addresses intended to create double
+ * mappings of physical memory. In a way, `dvmamap' is a submap of the
+ * VM map `phys_map'. The difference is the use of the `resource map'
+ * routines to manage page allocation, allowing DVMA addresses to be
+ * allocated and freed from within interrupt routines.
+ *
+ * Note that `phys_map' can still be used to allocate memory-backed pages
+ * in DVMA space.
+ */
+#ifdef _KERNEL
+#ifndef LOCORE
+extern vm_offset_t dvmabase;
+extern struct map *dvmamap;
+#endif
+#endif
+/*
+ * The dvma resource map is defined in page units, which are numbered 1 to N.
+ * Use these macros to convert to/from virtual addresses.
+ */
+#define rctov(n) (ctob(((n)-1))+dvmabase)
+#define vtorc(v) ((btoc((v)-dvmabase))+1)
+
+
#ifdef _KERNEL
#ifndef LOCORE
#define DELAY(n) delay(n)