[haiku-development] Re: S3 Video Driver

  • From: "François Revol" <revol@xxxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Thu, 06 Mar 2008 00:43:57 +0100 CET

> Axel Dörfler wrote:
> > You would need to use the ISA bus module, and then add ioctl's to
> > your
> > driver that lets the accelerant use the {write|read}_io_{8|16|32}
> > functions much like SAVAGE_{GET|SET}_PCI.
> > In the accelerant, you could then have a handy function that hides
> > the
> > ioctl() from you again.
> >
> >
> I've noticed that both the pci_module_info and the isa_module_info
> struct's have {write|read}_io_{8|16|32} functions.  Do these
> functions
> have the same functionality with regard to accessing PIO ports or is
> using the ISA module preferred?  Currently the S3 driver uses the PCI
> module for accessing a few PIO ports to enable MMIO for the Virge
> chips
> and seems to work fine.

On PC they should be identical as the ISA io space is mapped tothe PCI
io space (or maybe the opposite, whichever).
Though it might not be the case on every architecture.

For ex, on the m68k port I intend to fake an ISA bus for onboard
devices, that maps the IO part of the memory space.
But on some Falcon clones (Hades IIRC) there are PCI busses which are
mapped to a specific address space (with a custom bit in page
descriptor), that is out of the regular 4GB. So those would be
different. Of course I could fake a 1st PCI bus too, and I'll probably
never use an S3 card in an Hades, but still...

If your device is PCI, just use the PCI hooks, that's why they are here
for.

François.

Other related posts: