Date: Mon, 27 Sep 1999 00:28:40 -0600 From: Warner Losh <imp@village.org> To: "Matthew N. Dodd" <winter@jurai.net> Cc: KATO Takenori <kato@FreeBSD.org>, cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/conf files src/sys/i386/conf files.i386 Message-ID: <199909270628.AAA08033@harmony.village.org> In-Reply-To: Your message of "Sun, 26 Sep 1999 23:37:45 EDT." <Pine.BSF.4.10.9909262335030.1659-100000@sasami.jurai.net> References: <Pine.BSF.4.10.9909262335030.1659-100000@sasami.jurai.net>
next in thread | previous in thread | raw e-mail | index | archive | help
In message <Pine.BSF.4.10.9909262335030.1659-100000@sasami.jurai.net> "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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199909270628.AAA08033>