Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 3 Jun 2012 22:40:32 +0000 (UTC)
From:      Marcel Moolenaar <marcel@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-projects@freebsd.org
Subject:   svn commit: r236531 - projects/altix2/sys/kern
Message-ID:  <201206032240.q53MeWPb089072@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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;
+};



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201206032240.q53MeWPb089072>