From: Jesse Barnes <jbarnes@engr.sgi.com>
To: linux-ia64@vger.kernel.org
Subject: [PATCH] map display option ROMs
Date: Wed, 12 May 2004 21:43:06 +0000 [thread overview]
Message-ID: <200405121443.06388.jbarnes@engr.sgi.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 331 bytes --]
By default, the sn2 PCI init code doesn't map option ROM address ranges since
PIO address space is limited. However, we do need to map display option ROMs
in the event that userland applications want to read and emulate them.
Here's a patch to do that. It applies on top of the last cleanup patch I
sent you.
Thanks,
Jesse
[-- Attachment #2: sn-map-vga-rom.patch --]
[-- Type: text/plain, Size: 1611 bytes --]
===== arch/ia64/sn/io/machvec/pci_bus_cvlink.c 1.38 vs edited =====
--- 1.38/arch/ia64/sn/io/machvec/pci_bus_cvlink.c Wed Apr 28 09:20:53 2004
+++ edited/arch/ia64/sn/io/machvec/pci_bus_cvlink.c Wed May 12 11:53:18 2004
@@ -328,6 +328,34 @@
cmd |= PCI_COMMAND_MEMORY;
}
+ /*
+ * Assign addresses to the ROMs, but don't enable them yet
+ * Also note that we only map display card ROMs due to PIO mapping
+ * space scarcity.
+ */
+ if ((dev->class >> 16) == PCI_BASE_CLASS_DISPLAY) {
+ unsigned long addr;
+ size = dev->resource[PCI_ROM_RESOURCE].end -
+ dev->resource[PCI_ROM_RESOURCE].start;
+
+ if (size) {
+ addr = (unsigned long) pciio_pio_addr(vhdl, 0,
+ PCIIO_SPACE_ROM,
+ 0, size, 0, PIOMAP_FIXED);
+ if (!addr) {
+ dev->resource[PCI_ROM_RESOURCE].start = 0;
+ dev->resource[PCI_ROM_RESOURCE].end = 0;
+ printk("sn_pci_fixup(): ROM pio map failure "
+ "for %s\n", dev->slot_name);
+ }
+ addr |= __IA64_UNCACHED_OFFSET;
+ dev->resource[PCI_ROM_RESOURCE].start = addr;
+ dev->resource[PCI_ROM_RESOURCE].end = addr + size;
+ if (dev->resource[PCI_ROM_RESOURCE].flags & IORESOURCE_MEM)
+ cmd |= PCI_COMMAND_MEMORY;
+ }
+ }
+
/*
* Update the Command Word on the Card.
*/
reply other threads:[~2004-05-12 21:43 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=200405121443.06388.jbarnes@engr.sgi.com \
--to=jbarnes@engr.sgi.com \
--cc=linux-ia64@vger.kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox