Re: pre 2.1: Neat Oops with ncrBsd

Gerard Roudier (
Tue, 24 Sep 1996 23:11:22 +0000 (GMT)

On Tue, 24 Sep 1996, Linus Torvalds wrote:

> On Mon, 23 Sep 1996, Philippe Strauss wrote:
> > ncr53c810-0: using memory mapped IO at virtual address 0xc2821f00
> > Unable to handle kernel paging request at virtual address 82821f04

> > [ lines removed ]

> > Code: c01a0cbd <ncr_attach+209/524> movb 0xc0000004(%eax),%al

The 1rst memory mapped IO done by the driver is at offset 4 of the IO
window of the chip. The code uses "readb()" with the vremmaped virtual
address + 4. Is that ok?
Probably not ...

Something has added 0xc0000000 to the offset.

Oxc2821f00 + 0xc0000004 = (1)82821f04. This seems to be not ok.

> On Tue, 24 Sep 1996, Gerard Roudier wrote:
> >
> > Hi! (should be aiiie!!)
> >
> > Force "normal io" with "make config".
> > vremap() never works with Alpha and IMHO was very sensitive under i386.
> > Seems we just lose somewhere the higher address byte.
> Before doing that, please try the patch I had in my pre-2.1.0 announcement,
> the one that changes one line in mm/vmalloc.c (remap_area_pte): change
> set_pte(pte, mk_pte(offset, PAGE_KERNEL));
> into
> set_pte(pte, mk_pte(offset+PAGE_OFFSET, PAGE_KERNEL));
> (it's line 187). Does that make a difference for you?
> NOTE! If it still doesn't work, then the problem is most likely in the NCR
> driver using physical addresses when it should use virtual or vice versa.
> That's not necessarily easy to find unless you know the driver, which is why
> I'm not going to even try.

I just have downloaded the 2.1 and will try to (finally) understand what
address must be used with readX()/writeX().
Physical, virtual or a mix of both ?.

I never have been able to understand why mmio does not work on ALPHA.
Seems that the remapped address was not what readX/writeX
was expecting on ALPHA, but i386 was quite happy with that address.

> (but the mm/vmalloc.c change looks valid regardless)
> Linus