From owner-cvs-all Tue Sep 28 18: 2:57 1999 Delivered-To: cvs-all@freebsd.org Received: from sasami.jurai.net (sasami.jurai.net [63.67.141.99]) by hub.freebsd.org (Postfix) with ESMTP id 0E6BD15824; Tue, 28 Sep 1999 18:02:52 -0700 (PDT) (envelope-from winter@jurai.net) Received: from localhost (winter@localhost) by sasami.jurai.net (8.8.8/8.8.7) with ESMTP id VAA26083; Tue, 28 Sep 1999 21:02:39 -0400 (EDT) Date: Tue, 28 Sep 1999 21:02:38 -0400 (EDT) From: "Matthew N. Dodd" To: Bruce Evans Cc: Warner Losh , Takahashi Yoshihiro , kato@FreeBSD.org, cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org, FreeBSD98-hackers@jp.freebsd.org Subject: Re: cvs commit: src/sys/conf files src/sys/i386/conf files.i386 In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk On Wed, 29 Sep 1999, Bruce Evans wrote: > Not true. Memory accesses can often be done using base + index addressing, > while i386 PIO addressing requires and extra add and is made worse be gcc > doing suboptional register allocation. E.g., for *(base + offset) in i386's: > > movl base,%ebx > movb offset(%ebx),%al > > and for inb(base + offset): > > movl base,%edx > addl $offset,%edx > inb %dx,%al If I understand you correctly you argue that both types of PIO access (normal and noncontig PC98) should use the method suggested for the PC98 case, namely that the eventual macro expend to: inb(regs[offset]) / outb(regs[offset], val) In the PC98 case we have to supply the length of the bus_space and a map describing the PIO offsets so we can compute each value of the array (regs[]). For the normal PIO bus_space we just fill out the array from base + 0 to base + len. This would make the bus_space_{read,write} calles the same for the PC98 case and the normal PIO case and would, I believe, require no other driver/consumer changes save in the PC98 case which would require the setup to supply the offset map. Right? -- | Matthew N. Dodd | '78 Datsun 280Z | '75 Volvo 164E | FreeBSD/NetBSD | | winter@jurai.net | 2 x '84 Volvo 245DL | ix86,sparc,pmax | | http://www.jurai.net/~winter | This Space For Rent | ISO8802.5 4ever | To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message