Subject: Re: alpha pci pio problems
To: None <thorpej@zembu.com>
From: Simon Burge <simonb@netbsd.org>
List: port-alpha
Date: 06/26/2000 05:55:01
Jason R Thorpe wrote:
> 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.
Didn't think of checking that. I'll check it out.
> > 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.
Will do later today after I CVS update - my source tree is a couple of
days old.
Ta,
Simon.