diff options
author | asami <asami@FreeBSD.org> | 1996-06-14 11:02:28 +0000 |
---|---|---|
committer | asami <asami@FreeBSD.org> | 1996-06-14 11:02:28 +0000 |
commit | 36a1932601c730683d263ee933dd90cd6dae96bf (patch) | |
tree | d76ce0bf0a31500c82596831333ff034e969773b /sys/i386/include/cpufunc.h | |
parent | 5fa995752f02a42fcb2b0ca54149fef141f98060 (diff) | |
download | FreeBSD-src-36a1932601c730683d263ee933dd90cd6dae96bf.zip FreeBSD-src-36a1932601c730683d263ee933dd90cd6dae96bf.tar.gz |
The Great PC98 Merge.
All new code is "#ifdef PC98"ed so this should make no difference to
PC/AT (and its clones) users.
Ok'd by: core
Submitted by: FreeBSD(98) development team
Diffstat (limited to 'sys/i386/include/cpufunc.h')
-rw-r--r-- | sys/i386/include/cpufunc.h | 49 |
1 files changed, 48 insertions, 1 deletions
diff --git a/sys/i386/include/cpufunc.h b/sys/i386/include/cpufunc.h index 1f18615..510cacd 100644 --- a/sys/i386/include/cpufunc.h +++ b/sys/i386/include/cpufunc.h @@ -30,7 +30,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: cpufunc.h,v 1.48 1996/03/31 04:05:21 bde Exp $ + * $Id: cpufunc.h,v 1.49 1996/04/07 18:30:56 bde Exp $ */ /* @@ -253,6 +253,53 @@ outw(u_int port, u_short data) __asm __volatile("outw %0,%%dx" : : "a" (data), "d" (port)); } +#ifdef PC98 +static inline u_char +epson_inb(u_int port) +{ + u_char data; + + outb(0x43f, 0x42); + data = inb(port); + outb(0x43f, 0x40); + return (data); +} + +static inline void +epson_outb(u_int port, u_char data) +{ + outb(0x43f, 0x42); + outb(port,data); + outb(0x43f, 0x40); +} + +static inline void +epson_insw(u_int port, void *addr, size_t cnt) +{ + int s; + + s = splbio(); + outb(0x43f, 0x42); + disable_intr(); + insw((u_int)port, (void *)addr, (size_t)cnt); + outb(0x43f, 0x40); + splx(s); +} + +static inline void +epson_outsw(u_int port, void *addr, size_t cnt) +{ + int s; + + s = splbio(); + outb(0x43f, 0x42); + disable_intr(); + outsw((u_int)port, (void *)addr, (size_t)cnt); + outb(0x43f, 0x40); + splx(s); +} +#endif /* PC98 */ + static __inline void pmap_update(void) { |