Subject: Re: alpha pci pio problems
To: None <thorpej@zembu.com>
From: Simon Burge <simonb@netbsd.org>
List: port-alpha
Date: 06/26/2000 18:14:33
Simon Burge wrote:
> 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.
I'm not a native ddb driver, but looked sorta ok to me. Ten finger
copy:
ddb> ps/a
...
ddb> show map/f 0xfffffc0005cfcdf0
...
- 0xfffffc0004d67208: 0x1603ec000->0x1e05ec000: obj = 0xfffffe000005d700/0x8580000000
submap=F, cow=F, nc=F, prot(max)=3/7, inh=0, wc=0, adv=1
ddb> show obj/f 0xfffffe000005d700
OBJECT 0xfffffe000005d700: locked=0, pgops=0xfffffe0000576860, npages=0, refs=1
PAGES <pg,offset>
ddb>
(Can you get ddb to save the outputs of commands in the message buffer?)
The 0x8580000000 is the address being mmap'd by alpha_bus_mapwindow().
Simon.