Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 28 Sep 1999 21:02:38 -0400 (EDT)
From:      "Matthew N. Dodd" <winter@jurai.net>
To:        Bruce Evans <bde@zeta.org.au>
Cc:        Warner Losh <imp@village.org>, Takahashi Yoshihiro <nyan@FreeBSD.org>, 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 
Message-ID:  <Pine.BSF.4.10.9909282058160.1659-100000@sasami.jurai.net>
In-Reply-To: <Pine.BSF.4.10.9909290511240.7835-100000@alphplex.bde.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.10.9909282058160.1659-100000>