From: Ashok Raj <ashok.raj@intel.com>
To: linux-kernel@vger.kernel.org
Cc: akpm@osdl.org, ak@suse.de, gregkh@suse.de, muli@il.ibm.com,
asit.k.mallick@intel.com, suresh.b.siddha@intel.com,
anil.s.keshavamurthy@intel.com, arjan@linux.intel.com,
ashok.raj@intel.com, shaohua.li@intel.com
Subject: [Intel IOMMU][patch 7/8] Support for legacy ISA devices
Date: Mon, 23 Apr 2007 23:03:06 -0700 [thread overview]
Message-ID: <20070424061038.252959000@intel.com> (raw)
In-Reply-To: 20070424060259.426374000@intel.com
[-- Attachment #1: fd0-workaround.patch --]
[-- Type: text/plain, Size: 3132 bytes --]
Floppy disk drivers dont work well with DMA remapping. Its possible to
extend the current use for x86_64, but the gain is very little. If someone
feels compelled to clean this up, its up for grabs. Since these use 16M, we
just provide a unity map for the ISA bridge device.
Signed-off-by: Ashok Raj <ashok.raj@intel.com>
Signed-off-by: Shaohua Li <shaohua.li@intel.com>
------------------------------------
Index: linux-2.6.21-rc5/Documentation/kernel-parameters.txt
===================================================================
--- linux-2.6.21-rc5.orig/Documentation/kernel-parameters.txt 2007-04-17 05:41:56.000000000 -0700
+++ linux-2.6.21-rc5/Documentation/kernel-parameters.txt 2007-04-17 05:41:59.000000000 -0700
@@ -730,6 +730,11 @@
the IOMMU driver to set a unity map for all OS
visible memory. Hence the driver can continue to use
physical addresses for DMA.
+ noisamap
+ This option is required to setup identify map for
+ first 16M. The floppy disk could be modified to use
+ the DMA api's but thats a lot of pain for very small
+ gain. This option is turned on by default.
io7= [HW] IO7 for Marvel based alpha systems
See comment before marvel_specify_io7 in
arch/alpha/kernel/core_marvel.c.
Index: linux-2.6.21-rc5/drivers/pci/intel-iommu.c
===================================================================
--- linux-2.6.21-rc5.orig/drivers/pci/intel-iommu.c 2007-04-17 05:41:53.000000000 -0700
+++ linux-2.6.21-rc5/drivers/pci/intel-iommu.c 2007-04-17 05:41:59.000000000 -0700
@@ -37,6 +37,8 @@
#include "pci.h"
#define IS_GFX_DEVICE(pdev) ((pdev->class >> 16) == PCI_BASE_CLASS_DISPLAY)
+#define IS_ISA_DEVICE(pdev) ((pdev->class >> 8) == PCI_CLASS_BRIDGE_ISA)
+
#define IOAPIC_RANGE_START (0xfee00000)
#define IOAPIC_RANGE_END (0xfeefffff)
#define IOAPIC_RANGE_SIZE (IOAPIC_RANGE_END - IOAPIC_RANGE_START + 1)
@@ -87,6 +89,7 @@
static int dmar_disabled, dmar_force_rw;
static int dmar_map_gfx = 1, dmar_no_gfx_identity_map = 1;
+static int dmar_fix_isa = 1;
static char *get_fault_reason(u8 fault_reason)
{
@@ -113,6 +116,9 @@
} else if (!strncmp(str, "gfx_workaround", 14)) {
dmar_no_gfx_identity_map = 0;
printk(KERN_INFO"Intel-IOMMU: do 1-1 mapping whole physical memory for GFX device\n");
+ } else if (!strncmp(str, "noisamap", 8)) {
+ dmar_fix_isa = 0;
+ printk (KERN_INFO"Intel-IOMMU: Turning off 16M unity map for LPC\n");
}
str += strcspn(str, ",");
@@ -1582,6 +1588,25 @@
}
}
+static void iommu_prepare_isa(void)
+{
+ struct pci_dev *pdev = NULL;
+ int ret;
+
+ if (!dmar_fix_isa)
+ return;
+
+ pdev = pci_get_class (PCI_CLASS_BRIDGE_ISA << 8, NULL);
+ if (!pdev)
+ return;
+
+ printk (KERN_INFO "IOMMU: Prepare 0-16M unity mapping for LPC\n");
+ ret = iommu_prepare_identity_map(pdev, 0, 16*1024*1024);
+
+ if (ret)
+ printk ("IOMMU: Failed to create 0-64M identity map, Floppy might not work\n");
+
+}
int __init init_dmars(void)
{
struct dmar_drhd_unit *drhd;
@@ -1638,6 +1663,7 @@
end_for_each_rmrr_device(rmrr, pdev)
iommu_prepare_gfx_mapping();
+ iommu_prepare_isa();
/*
* for each drhd
--
next prev parent reply other threads:[~2007-04-24 15:08 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-04-24 6:02 [Intel IOMMU][patch 0/8] Intel IOMMU Support Ashok Raj
2007-04-24 6:03 ` [Intel IOMMU][patch 1/8] ACPI support for Intel Virtualization Technology for Directed I/O Ashok Raj
2007-04-24 18:50 ` Andi Kleen
2007-04-24 20:17 ` Ashok Raj
2007-04-24 6:03 ` [Intel IOMMU][patch 2/8] Some generic search functions required to lookup device relationships Ashok Raj
2007-04-24 6:03 ` [Intel IOMMU][patch 3/8] Generic hardware support for Intel IOMMU Ashok Raj
2007-04-24 19:27 ` Andi Kleen
2007-04-24 20:59 ` Ashok Raj
2007-04-25 1:17 ` Shaohua Li
2007-04-25 6:53 ` Andi Kleen
2007-04-24 6:03 ` [Intel IOMMU][patch 4/8] Supporting Zero Length Reads in " Ashok Raj
2007-04-24 19:28 ` Andi Kleen
2007-04-24 20:42 ` Ashok Raj
2007-04-24 21:00 ` David Miller
2007-04-24 6:03 ` [Intel IOMMU][patch 5/8] Graphics driver workarounds to provide unity map Ashok Raj
2007-04-24 6:03 ` [Intel IOMMU][patch 6/8] Doc updates for Intel Virtualization Technology for Directed I/O Ashok Raj
2007-04-24 6:03 ` Ashok Raj [this message]
2007-04-24 19:31 ` [Intel IOMMU][patch 7/8] Support for legacy ISA devices Andi Kleen
2007-04-24 20:33 ` Arjan van de Ven
2007-04-24 20:39 ` Ashok Raj
2007-04-24 6:03 ` [Intel IOMMU][patch 8/8] Preserve some Virtual Address when devices cannot address entire range Ashok Raj
2007-04-24 19:33 ` Andi Kleen
2007-04-24 20:33 ` Ashok Raj
2007-04-24 21:12 ` Andi Kleen
2007-04-24 21:23 ` David Miller
2007-04-24 21:32 ` Roland Dreier
2007-04-24 21:47 ` David Miller
2007-04-24 21:38 ` Ashok Raj
2007-04-24 21:50 ` David Miller
2007-04-24 22:03 ` Andi Kleen
2007-04-24 22:26 ` Ashok Raj
2007-04-25 1:12 ` H. Peter Anvin
2007-04-25 6:55 ` Andi Kleen
2007-04-24 23:22 ` Alan Cox
-- strict thread matches above, loose matches on Subject: below --
2007-04-23 16:38 [Intel IOMMU][patch 0/8] Intel IOMMU Support Ashok Raj
2007-04-23 16:38 ` [Intel IOMMU][patch 7/8] Support for legacy ISA devices Ashok Raj
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20070424061038.252959000@intel.com \
--to=ashok.raj@intel.com \
--cc=ak@suse.de \
--cc=akpm@osdl.org \
--cc=anil.s.keshavamurthy@intel.com \
--cc=arjan@linux.intel.com \
--cc=asit.k.mallick@intel.com \
--cc=gregkh@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=muli@il.ibm.com \
--cc=shaohua.li@intel.com \
--cc=suresh.b.siddha@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.