Subject: Re: alpha pci pio problems
To: Simon Burge <simonb@netbsd.org>
From: Jason R Thorpe <thorpej@zembu.com>
List: port-alpha
Date: 06/25/2000 11:08:09
On Wed, Jun 21, 2000 at 03:47:25PM +1000, Simon Burge wrote:
> I've got a program that's basically:
>
> u_int32_t vgaIObase;
>
> alpha_pci_io_enable(1);
> vgaIOBase = (inb(0x3cc) & 0x01) ? 0x3D0 : 0x3B0;
>
> and it does roughly:
>
> mmap(size = 0x40000000, addr = 0x8580000000) = 0x1603ec000
> alpha_pci_io_swiz: abw->abw_addr = 0x1603ec000
> alpha_pci_io_swiz: port = 0x1603f3980
> alpha_pci_io_swiz_inb: return (*port && 0xff);
>
> and at the last line the machine hangs hard and needs a reset.
hm. That's ... odd. The swizzle code in libalpha certainly appears to
have done the correct thing. I guess the only issue is if mmap mapped
the correct pages underneath that user VA.
>
> If I add a kernel printf to show the K0SEG version (0x8580007980) I at
> least get a number back (0x3000067) but I've yet to figure out if the
> number is actually correct, although it being odd means that SuperProbe
> would think that the display is color and not mono which is right.
>
> >From what I understand, while I'm just probing the I/O space I don't
> need to map anything in with alpha_pci_mem_map() yet, right?
No, that's correct.
Anyway, please get your mmap changes committed to the trunk, and I'll
see what I can do to help you debug this.
--
-- Jason R. Thorpe <thorpej@zembu.com>