Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/arm/arm32 add mm_md_direct_mapped_phys



details:   https://anonhg.NetBSD.org/src/rev/7d8047da51fe
branches:  trunk
changeset: 783194:7d8047da51fe
user:      matt <matt%NetBSD.org@localhost>
date:      Mon Dec 10 08:19:10 2012 +0000

description:
add mm_md_direct_mapped_phys

diffstat:

 sys/arch/arm/arm32/arm32_machdep.c |  17 +++++++++++++++--
 1 files changed, 15 insertions(+), 2 deletions(-)

diffs (35 lines):

diff -r f86c821ea3ed -r 7d8047da51fe sys/arch/arm/arm32/arm32_machdep.c
--- a/sys/arch/arm/arm32/arm32_machdep.c        Mon Dec 10 06:54:23 2012 +0000
+++ b/sys/arch/arm/arm32/arm32_machdep.c        Mon Dec 10 08:19:10 2012 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: arm32_machdep.c,v 1.86 2012/12/10 01:37:30 matt Exp $  */
+/*     $NetBSD: arm32_machdep.c,v 1.87 2012/12/10 08:19:10 matt Exp $  */
 
 /*
  * Copyright (c) 1994-1998 Mark Brinicombe.
@@ -42,7 +42,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: arm32_machdep.c,v 1.86 2012/12/10 01:37:30 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: arm32_machdep.c,v 1.87 2012/12/10 08:19:10 matt Exp $");
 
 #include "opt_modular.h"
 #include "opt_md.h"
@@ -561,3 +561,16 @@
        printf("\n");
 }
 #endif /* MULTIPROCESSOR */
+
+#ifdef __HAVE_MM_MD_DIRECT_MAPPED_PHYS
+bool
+mm_md_direct_mapped_phys(paddr_t pa, vaddr_t *vap)
+{
+       if (physical_start <= pa && pa < physical_end) {
+               *vap = KERNEL_BASE + (pa - physical_start);
+               return true;
+       }
+
+       return false;
+}
+#endif



Home | Main Index | Thread Index | Old Index