Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 13 Feb 1996 21:33:01 -0800
From:      "Justin T. Gibbs" <gibbs@freefall.freebsd.org>
To:        se@zpr.uni-koeln.de (Stefan Esser)
Cc:        Richard J Kuhns <rjk@sparcmill.grauel.com>, freebsd-stable@freebsd.org
Subject:   Re: One problem && one question 
Message-ID:  <199602140533.VAA09769@freefall.freebsd.org>
In-Reply-To: Your message of "Tue, 13 Feb 1996 17:30:13 %2B0100." <199602131630.AA09319@Sysiphos> 

next in thread | previous in thread | raw e-mail | index | archive | help

>}                 switch (data&7) {
>} 
>}                 case 1:
>}                 case 5:
>}                         printf ("       map(%x): io(%lx)\n",
>}                                 reg, data & ~3);
>}                         break;
>} 
>} I guess that everything must be quad-word aligned so that is why you
>} & ~3?  Is this in the spec even for I/O ports?
>
>In PCI there are a number of map types, and those are
>encoded in those (assumed to be '0') bits. I.e. the type
>1 encoding has a '01' in the two low order bits, which
>have to be masked out ...

Actually, your case statement ensures that the second bit is
already 0.  Perhaps ~PCI_MAP_IO would make the code clearer?

>The problem with the wrong size being reported is caused
>by the fact, that the bt946c has only a 16 bit port base
>register. And for this reason, it returns 0x0000fffd if 
>a 0xffffffff had been written ...
>
>The 'd' is a 'c' (i.e. -4) plus the mapping type 1 code.
>Since the PCI spec defines type 1 as a 32bit I/O port
>mapping (IIRC) the 946 really should return 0xfffffffd.
>It has no right to ignore the upper 16bits.
>
>But since ISA only supports 16 bits of port address
>anyway, it doesn't appear to make much of a difference
>to make the code always ignore those upper half for 
>port mappings ...

Its not bits of port address, but bits of port address size right?  I think
that the Adaptec cards map their I/O space much higer than that.
Regardless, I'd hate to see us do the "wrong" thing in our PCI code just
because of one broken card.  We should special case the Buslogic as a
'rogue' PCI card and deal with it that way since the PCI ID makes it easy
to do this.

>Regards, STefan
>-- 
> Stefan Esser, Zentrum fuer Paralleles Rechnen		Tel:	+49 221 4706021
> Universitaet zu Koeln, Weyertal 80, 50931 Koeln	FAX:	+49 221 4705160
> =============================================================================
>=
> http://www.zpr.uni-koeln.de/~se			  <se@ZPR.Uni-Koeln.DE>

--
Justin T. Gibbs
===========================================
  FreeBSD: Turning PCs into workstations
===========================================



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199602140533.VAA09769>