Subject: Re: XFree86 4.2 diffs for using the display device for pci ops
To: Simon Burge <>
From: Nathan J. Williams <>
List: tech-x11
Date: 06/21/2002 21:49:35
Simon Burge <> writes:

> They _should_ work on any port that uses wscons (except Alpha - see
> above).  I'd be curious of any reports of sucess or failure on any
> variety of machines.

Doesn't work on my iBook. I've found a couple of problems.

First, it didn't compile; the inb and outb code for powerpc in
common/compiler.h needs a variable called ioBase, which your patch
makes conditional on OpenBSD. I rearranged that to always declare the
variable and that made it link. I don't think the inb/outb code is
being used, since we're doing the direct-PCI stuff, but I wasn't up to
figuring out how to remove it entirely.

Next, the macppc port uses ofb as the back end to wsdisplay, not vga,
and the ofb driver didn't have code to do the PCI configuration ioctl
passthrough. I fixed that; now I'm getting: 

(==) Using config file: "/etc/XF86Config"
(EE) R128(0): Cannot read V_BIOS (5)

Fatal server error:
xf86MapVidMem: could not mmap /dev/mem [s=80000,a=90000000] (Invalid argument)

which I think means something is wrong with mmap'ing the device. ofb.c
ahs mmap code, but it's using the openfirmware register regions,
rather then the PCI BARs directly. Finding out if those match up will
be the next task.

        - Nathan