From owner-cvs-src@FreeBSD.ORG Thu Sep 11 13:28:36 2003 Return-Path: Delivered-To: cvs-src@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B68A616A4BF; Thu, 11 Sep 2003 13:28:36 -0700 (PDT) Received: from mailman.zeta.org.au (mailman.zeta.org.au [203.26.10.16]) by mx1.FreeBSD.org (Postfix) with ESMTP id CE02743FBD; Thu, 11 Sep 2003 13:28:34 -0700 (PDT) (envelope-from bde@zeta.org.au) Received: from gamplex.bde.org (katana.zip.com.au [61.8.7.246]) by mailman.zeta.org.au (8.9.3p2/8.8.7) with ESMTP id GAA24245; Fri, 12 Sep 2003 06:28:23 +1000 Date: Fri, 12 Sep 2003 06:28:22 +1000 (EST) From: Bruce Evans X-X-Sender: bde@gamplex.bde.org To: "M. Warner Losh" In-Reply-To: <20030911.104147.54186211.imp@bsdimp.com> Message-ID: <20030912061218.Q1530@gamplex.bde.org> References: <200309110414.h8B4ERi2062520@repoman.freebsd.org> <20030911.104147.54186211.imp@bsdimp.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: cvs-src@FreeBSD.org cc: marcel@FreeBSD.org cc: nyan@jp.FreeBSD.org cc: cvs-all@FreeBSD.org cc: src-committers@FreeBSD.org Subject: Re: cvs commit: src/sys/dev/uart uart_cpu_pc98.c X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Sep 2003 20:28:36 -0000 On Thu, 11 Sep 2003, M. Warner Losh wrote: > In message: <20030911.204333.41730710.nyan@jp.FreeBSD.org> > Takahashi Yoshihiro writes: > : In article <200309110414.h8B4ERi2062520@repoman.freebsd.org> > : Warner Losh writes: > : > : > imp 2003/09/10 21:14:27 PDT > : > > : > FreeBSD src repository > : > > : > Modified files: > : > sys/dev/uart uart_cpu_pc98.c > : > Log: > : > Fix compile on pc98. Maybe this is correct. > : > : It should not call i386_bus_space_handle_alloc() directly in device > : driver. I think that we need to implement bus_space_map() function. sio also needs the map function. From pc98/sio.c % com->data_port = iobase + iat[com_data]; % com->int_id_port = iobase + iat[com_iir]; % ... This needs the map function so that the map is not hard-coded. After all i/o addresses (only 8 for 8250-16950) are mapped like this, all offsets can be 0 (and direct). > The functions in uart_cpu_* are used for the console port support > before the device system is up and running. It is currently abusing > bus space handles a little bit here. Since we're only planning on Hmm. I only have 2 sio ports that can use a special mapping (multiplication of the offset by 4 for the memory-mapped case), and currently just hard-codes this in a way that doesn't work for consoles. But the ports also support pio and that could be used for consoles. > supporting console ports on the first two serial ports, the number of > different devices we need to support is sufficiently small that I > thought this abuse was OK. Restricting the number doesn't help much since all cases may be present on different machines with just 1 port. Bruce