Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/sparc64/dev Added iommu_extract() for debug purposes.
details: https://anonhg.NetBSD.org/src/rev/e89d0a5a1e93
branches: trunk
changeset: 514976:e89d0a5a1e93
user: eeh <eeh%NetBSD.org@localhost>
date: Sat Sep 15 06:55:50 2001 +0000
description:
Added iommu_extract() for debug purposes.
Anyone caught using it for anything other than debug will be shot.
diffstat:
sys/arch/sparc64/dev/iommu.c | 21 ++++++++++++++++++++-
sys/arch/sparc64/dev/iommuvar.h | 3 ++-
2 files changed, 22 insertions(+), 2 deletions(-)
diffs (52 lines):
diff -r 46583def4f14 -r e89d0a5a1e93 sys/arch/sparc64/dev/iommu.c
--- a/sys/arch/sparc64/dev/iommu.c Sat Sep 15 04:50:59 2001 +0000
+++ b/sys/arch/sparc64/dev/iommu.c Sat Sep 15 06:55:50 2001 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: iommu.c,v 1.38 2001/09/10 21:19:26 chris Exp $ */
+/* $NetBSD: iommu.c,v 1.39 2001/09/15 06:55:50 eeh Exp $ */
/*
* Copyright (c) 1999, 2000 Matthew R. Green
@@ -321,6 +321,25 @@
(u_long)tte));
}
+
+/*
+ * Find the value of a DVMA address (debug routine).
+ */
+paddr_t
+iommu_extract(is, dva)
+ struct iommu_state *is;
+ vaddr_t dva;
+{
+ int64_t tte = 0;
+
+ if (dva >= is->is_dvmabase)
+ tte = is->is_tsb[IOTSBSLOT(dva,is->is_tsbsize)];
+
+ if ((tte&IOTTE_V) == 0)
+ return ((paddr_t)-1L);
+ return (tte&IOTTE_PAMASK);
+}
+
/*
* iommu_remove: removes mappings created by iommu_enter
*
diff -r 46583def4f14 -r e89d0a5a1e93 sys/arch/sparc64/dev/iommuvar.h
--- a/sys/arch/sparc64/dev/iommuvar.h Sat Sep 15 04:50:59 2001 +0000
+++ b/sys/arch/sparc64/dev/iommuvar.h Sat Sep 15 06:55:50 2001 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: iommuvar.h,v 1.7 2001/07/20 00:07:13 eeh Exp $ */
+/* $NetBSD: iommuvar.h,v 1.8 2001/09/15 06:55:50 eeh Exp $ */
/*
* Copyright (c) 1999 Matthew R. Green
@@ -57,6 +57,7 @@
void iommu_reset __P((struct iommu_state *));
void iommu_enter __P((struct iommu_state *, vaddr_t, int64_t, int));
void iommu_remove __P((struct iommu_state *, vaddr_t, size_t));
+paddr_t iommu_extract __P((struct iommu_state *, vaddr_t));
int iommu_dvmamap_load __P((bus_dma_tag_t, struct iommu_state *,
bus_dmamap_t, void *, bus_size_t, struct proc *, int));
Home |
Main Index |
Thread Index |
Old Index