Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/powerpc need mm_md_direct_mapped_phys support.



details:   https://anonhg.NetBSD.org/src/rev/7e666113075b
branches:  trunk
changeset: 765980:7e666113075b
user:      matt <matt%NetBSD.org@localhost>
date:      Sun Jun 12 06:10:41 2011 +0000

description:
need mm_md_direct_mapped_phys support.

diffstat:

 sys/arch/powerpc/include/types.h           |   4 +++-
 sys/arch/powerpc/powerpc/powerpc_machdep.c |  15 +++++++++++++--
 2 files changed, 16 insertions(+), 3 deletions(-)

diffs (52 lines):

diff -r 307aac1c6cfc -r 7e666113075b sys/arch/powerpc/include/types.h
--- a/sys/arch/powerpc/include/types.h  Sun Jun 12 05:44:36 2011 +0000
+++ b/sys/arch/powerpc/include/types.h  Sun Jun 12 06:10:41 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: types.h,v 1.41 2011/06/05 16:52:25 matt Exp $  */
+/*     $NetBSD: types.h,v 1.42 2011/06/12 06:10:41 matt Exp $  */
 
 /*-
  * Copyright (C) 1995 Wolfgang Solfrank.
@@ -89,4 +89,6 @@
 #define        PCU_UNIT_COUNT  2
 #endif
 
+#define        __HAVE_MM_MD_DIRECT_MAPPED_PHYS
+
 #endif /* _MACHTYPES_H_ */
diff -r 307aac1c6cfc -r 7e666113075b sys/arch/powerpc/powerpc/powerpc_machdep.c
--- a/sys/arch/powerpc/powerpc/powerpc_machdep.c        Sun Jun 12 05:44:36 2011 +0000
+++ b/sys/arch/powerpc/powerpc/powerpc_machdep.c        Sun Jun 12 06:10:41 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: powerpc_machdep.c,v 1.51 2011/06/12 03:35:45 rmind Exp $       */
+/*     $NetBSD: powerpc_machdep.c,v 1.52 2011/06/12 06:10:42 matt Exp $        */
 
 /*
  * Copyright (C) 1995, 1996 Wolfgang Solfrank.
@@ -32,7 +32,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: powerpc_machdep.c,v 1.51 2011/06/12 03:35:45 rmind Exp $");
+__KERNEL_RCSID(0, "$NetBSD: powerpc_machdep.c,v 1.52 2011/06/12 06:10:42 matt Exp $");
 
 #include "opt_altivec.h"
 #include "opt_modular.h"
@@ -433,6 +433,17 @@
 }
 #endif /* MODULAR */
 
+bool
+mm_md_direct_mapped_phys(paddr_t pa, vaddr_t *vap)
+{
+       if (atop(pa) < physmem) {
+               *vap = pa;
+               return true;
+       }
+
+       return false;
+}
+
 int
 mm_md_physacc(paddr_t pa, vm_prot_t prot)
 {



Home | Main Index | Thread Index | Old Index