From owner-cvs-all Sun Sep 26 23:28:30 1999 Delivered-To: cvs-all@freebsd.org Received: from rover.village.org (rover.village.org [204.144.255.49]) by hub.freebsd.org (Postfix) with ESMTP id 49B58150F4; Sun, 26 Sep 1999 23:28:25 -0700 (PDT) (envelope-from imp@harmony.village.org) Received: from harmony.village.org (harmony.village.org [10.0.0.6]) by rover.village.org (8.9.3/8.9.3) with ESMTP id AAA23660; Mon, 27 Sep 1999 00:27:59 -0600 (MDT) (envelope-from imp@harmony.village.org) Received: from harmony.village.org (localhost.village.org [127.0.0.1]) by harmony.village.org (8.9.3/8.8.3) with ESMTP id AAA08033; Mon, 27 Sep 1999 00:28:40 -0600 (MDT) Message-Id: <199909270628.AAA08033@harmony.village.org> To: "Matthew N. Dodd" Subject: Re: cvs commit: src/sys/conf files src/sys/i386/conf files.i386 Cc: KATO Takenori , cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org In-reply-to: Your message of "Sun, 26 Sep 1999 23:37:45 EDT." References: Date: Mon, 27 Sep 1999 00:28:40 -0600 From: Warner Losh Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk In message "Matthew N. Dodd" writes: : How opposed are the PC98 people to merging sys/pc98/pc98/if_ed.c into : sys/dev/ed/if_ed.c? My quick peek at the code indicates all PC98 bits are : wrapped with #ifdef PC98/#endif and the driver is otherwise the same as an : older version of sys/dev/ed/if_ed.c. I think the plan is to split out the : ISA specific bits at some point in the future and the task of merging : would be a great deal easier if it was done before the split and not : after. I'd also like to get some feedback on a related issue. I'd like to know what people think of adding a third space to the I386 port. The third I/O space would be I386_BUS_SPACE_IO_INDIRECT. The code for it would look like the following. In a nutshel, its bsh is a pointer to an array of I/O ports, and the offset is an index into that array. So you'd effectively replace bsh+offset with bsh[offset]. The driver would be responsible for managing the bsh array for the _INDIRECT case. I think something like this would go a long ways towards merging the last, few pc98 specific drivers. The code for bus_space_write_1, fully optimized as it is now, would look like: ... #define I386_BUS_SPACE_IO_INDIRECT 2 ... static __inline void bus_space_write_1(bus_space_tag_t tag, bus_space_handle_t bsh, bus_size_t offset, u_int8_t value) { #if defined(_I386_BUS_PIO_H_) #if defined(_I386_BUS_MEMIO_H_) || defined(_I386_BUS_PIOI_H_) if (tag == I386_BUS_SPACE_IO) #endif outb(bsh + offset, value); #endif #if defined(_I386_BUS_MEMIO_H_) #if defined(_I386_BUS_PIO_H_) || defined(_I386_BUS_PIOI_H_) else if (tag == I386_BUS_SPACE_MEM) #endif *(volatile u_int8_t *)(bsh + offset) = value; #endif #if defined(_I386_BUS_PIOI_H_) #if defined(_I386_BUS_PIO_H_) || defined(_I386_BUS_MEMIO_H_) else if (tag == I386_BUS_SPACE_IO_INDIRECT) #endif outb(bsh[offset], value); #endif } I'd be happy to implement the bus.h parts of this, if it would be useful for the pc98 folks. Warner To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message