From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Jon Smirl <jonsmirl@gmail.com>
Cc: xorg@freedesktop.org, Egbert Eich <eich@freedesktop.org>,
Jon Smirl <jonsmirl@yahoo.com>,
Linux Kernel list <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] VGA arbitration: draft of kernel side
Date: Wed, 09 Mar 2005 16:37:13 +1100 [thread overview]
Message-ID: <1110346634.32556.54.camel@gaston> (raw)
In-Reply-To: <9e4733910503082035318e9d23@mail.gmail.com>
On Tue, 2005-03-08 at 23:35 -0500, Jon Smirl wrote:
> This is from /linux-2.5/Documentation/filesystems/sysfs-pci.txt. It
> describes how ia64 is achieving legacy IO. The VGA control code
> probably needs to be coordinated with this.
This is a different thing, and I will implement it on ppc one of these
days. This is for issuing the IO cycles on the bus. It has nothing
to do with the actual arbitration work.
> --------------------------------------------------------------------------
>
> Accessing legacy resources through sysfs
>
> Legacy I/O port and ISA memory resources are also provided in sysfs if the
> underlying platform supports them. They're located in the PCI class heirarchy,
> e.g.
>
> /sys/class/pci_bus/0000:17/
> |-- bridge -> ../../../devices/pci0000:17
> |-- cpuaffinity
> |-- legacy_io
> `-- legacy_mem
>
> The legacy_io file is a read/write file that can be used by applications to
> do legacy port I/O. The application should open the file, seek to the desired
> port (e.g. 0x3e8) and do a read or a write of 1, 2 or 4 bytes. The legacy_mem
> file should be mmapped with an offset corresponding to the memory offset
> desired, e.g. 0xa0000 for the VGA frame buffer. The application can then
> simply dereference the returned pointer (after checking for errors of course)
> to access legacy memory space.
>
> Supporting PCI access on new platforms
>
> In order to support PCI resource mapping as described above, Linux platform
> code must define HAVE_PCI_MMAP and provide a pci_mmap_page_range function.
> Platforms are free to only support subsets of the mmap functionality, but
> useful return codes should be provided.
>
> Legacy resources are protected by the HAVE_PCI_LEGACY define. Platforms
> wishing to support legacy functionality should define it and provide
> pci_legacy_read, pci_legacy_write and pci_mmap_legacy_page_range functions.
>
>
--
Benjamin Herrenschmidt <benh@kernel.crashing.org>
next prev parent reply other threads:[~2005-03-09 5:41 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-03-08 7:11 [PATCH] VGA arbitration: draft of kernel side Benjamin Herrenschmidt
2005-03-08 21:29 ` Kronos
2005-03-08 22:46 ` Benjamin Herrenschmidt
2005-03-09 10:22 ` Pekka Enberg
2005-03-09 20:06 ` Kronos
2005-03-08 22:01 ` Benjamin Herrenschmidt
2005-03-08 23:47 ` Jon Smirl
2005-03-09 0:02 ` Benjamin Herrenschmidt
2005-03-09 3:17 ` Jon Smirl
2005-03-09 3:53 ` Benjamin Herrenschmidt
2005-03-09 4:35 ` Jon Smirl
2005-03-09 5:37 ` Benjamin Herrenschmidt [this message]
2005-03-09 5:58 ` Jon Smirl
2005-03-09 6:00 ` Benjamin Herrenschmidt
2005-03-09 8:04 ` Benjamin Herrenschmidt
2005-03-09 16:57 ` Jesse Barnes
2005-03-09 10:45 ` Pekka Enberg
2005-03-09 22:02 ` Benjamin Herrenschmidt
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=1110346634.32556.54.camel@gaston \
--to=benh@kernel.crashing.org \
--cc=eich@freedesktop.org \
--cc=jonsmirl@gmail.com \
--cc=jonsmirl@yahoo.com \
--cc=linux-kernel@vger.kernel.org \
--cc=xorg@freedesktop.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