From owner-freebsd-stable Tue Feb 13 21:33:05 1996 Return-Path: owner-stable Received: (from root@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id VAA09776 for stable-outgoing; Tue, 13 Feb 1996 21:33:05 -0800 (PST) Received: from localhost.cdrom.com (localhost.cdrom.com [127.0.0.1]) by freefall.freebsd.org (8.7.3/8.7.3) with SMTP id VAA09769 Tue, 13 Feb 1996 21:33:02 -0800 (PST) Message-Id: <199602140533.VAA09769@freefall.freebsd.org> X-Authentication-Warning: freefall.freebsd.org: Host localhost.cdrom.com [127.0.0.1] didn't use HELO protocol To: se@zpr.uni-koeln.de (Stefan Esser) cc: Richard J Kuhns , freebsd-stable@freebsd.org Subject: Re: One problem && one question In-reply-to: Your message of "Tue, 13 Feb 1996 17:30:13 +0100." <199602131630.AA09319@Sysiphos> Date: Tue, 13 Feb 1996 21:33:01 -0800 From: "Justin T. Gibbs" Sender: owner-stable@freebsd.org Precedence: bulk >} 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 -- Justin T. Gibbs =========================================== FreeBSD: Turning PCs into workstations ===========================================