svn commit: r236531 - projects/altix2/sys/kern

Marcel Moolenaar marcel at FreeBSD.org
Sun Jun 3 22:40:32 UTC 2012


Author: marcel
Date: Sun Jun  3 22:40:32 2012
New Revision: 236531
URL: http://svn.freebsd.org/changeset/base/236531

Log:
  First quick sketch of the busdma I/O MMU interface.

Added:
  projects/altix2/sys/kern/busdma_if.m   (contents, props changed)

Added: projects/altix2/sys/kern/busdma_if.m
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ projects/altix2/sys/kern/busdma_if.m	Sun Jun  3 22:40:32 2012	(r236531)
@@ -0,0 +1,58 @@
+#-
+# Copyright (c) 2012 Marcel Moolenaar
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 1. Redistributions of source code must retain the above copyright
+#    notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+#    notice, this list of conditions and the following disclaimer in the
+#    documentation and/or other materials provided with the distribution.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+# ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+# SUCH DAMAGE.
+#
+# $FreeBSD$
+#
+
+#include <sys/bus.h>
+#include <sys/busdma.h>
+
+INTERFACE busdma;
+
+busdma_mmu_t {
+	void *		cookie;
+	vm_paddr_t	minaddr;
+	vm_paddr_t	maxaddr;
+	vm_size_t	maxsz;
+	vm_paddr_t	align;
+	vm_paddr_t	bndry;
+}
+
+METHOD int iommu_alloc {
+	device_t	dev;
+	busdma_md_t	md;
+	busdma_mmu_t	*mmu;
+};
+
+METHOD int iommu_map {
+	device_t	dev;
+	busdma_md_t	md;
+	busdma_mmu_t	*mmu;
+};
+
+METHOD int iommu_unmap {
+	device_t	dev;
+	busdma_md_t	md;
+};


More information about the svn-src-projects mailing list