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 | |
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')
-rw-r--r-- | sys/i386/include/clock.h | 10 | ||||
-rw-r--r-- | sys/i386/include/console.h | 27 | ||||
-rw-r--r-- | sys/i386/include/cpufunc.h | 49 | ||||
-rw-r--r-- | sys/i386/include/devconf.h | 23 | ||||
-rw-r--r-- | sys/i386/include/random.h | 7 | ||||
-rw-r--r-- | sys/i386/include/soundcard.h | 3 | ||||
-rw-r--r-- | sys/i386/isa/isa.h | 6 | ||||
-rw-r--r-- | sys/i386/isa/isa_device.h | 6 |
8 files changed, 124 insertions, 7 deletions
diff --git a/sys/i386/include/clock.h b/sys/i386/include/clock.h index 1467e4e..830ae13 100644 --- a/sys/i386/include/clock.h +++ b/sys/i386/include/clock.h @@ -3,7 +3,7 @@ * Garrett Wollman, September 1994. * This file is in the public domain. * - * $Id: clock.h,v 1.12 1996/04/22 19:40:27 nate Exp $ + * $Id: clock.h,v 1.13 1996/05/01 08:38:50 bde Exp $ */ #ifndef _MACHINE_CLOCK_H_ @@ -93,7 +93,15 @@ int acquire_timer0 __P((int rate, int acquire_timer2 __P((int mode)); int release_timer0 __P((void)); int release_timer2 __P((void)); +#ifndef PC98 int rtcin __P((int val)); +#else +int acquire_timer1 __P((int mode)); +int release_timer1 __P((void)); +void rtc_serialcombit __P((int i)); +void rtc_serialcom __P((int i)); +void rtc_outb __P((int val)); +#endif int sysbeep __P((int pitch, int period)); #endif /* KERNEL && !LOCORE */ diff --git a/sys/i386/include/console.h b/sys/i386/include/console.h index 1bc590c..48c522e 100644 --- a/sys/i386/include/console.h +++ b/sys/i386/include/console.h @@ -25,7 +25,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: console.h,v 1.19 1995/05/30 08:00:28 rgrimes Exp $ + * $Id: console.h,v 1.20 1996/01/30 22:54:15 mpp Exp $ */ #ifndef _CONSOLE_H_ @@ -78,6 +78,10 @@ #define CONS_GETINFO _IOWR('c', 73, vid_info_t) #define CONS_GETVERS _IOR('c', 74, int) +#ifdef PC98 +#define ADJUST_CLOCK _IO('t',100) /* for 98note resume */ +#endif /* for PC98 */ + #define VT_OPENQRY _IOR('v', 1, int) #define VT_SETMODE _IOW('v', 2, vtmode_t) #define VT_GETMODE _IOR('v', 3, vtmode_t) @@ -118,6 +122,9 @@ struct mouse_info { #define KD_CGA 3 /* color graphics adapter */ #define KD_EGA 4 /* enhanced graphics adapter */ #define KD_VGA 5 /* video graphics adapter */ +#ifdef PC98 +#define KD_PC98 6 +#endif #define KD_TEXT 0 /* set text mode restore fonts */ #define KD_TEXT0 0 /* ditto */ @@ -242,6 +249,13 @@ typedef struct ssaver ssaver_t; #define MKEY 0x400 /* meta key marker (prepend ESC)*/ #define BKEY 0x800 /* backtab (ESC [ Z) */ +#ifdef PC98 +#define KB_DATA 0x41 /* kbd data port */ +#define KB_STAT 0x43 /* kbd status port */ +#define KB_BUF_FULL 0x02 /* kbd has char pending */ +#define KB_READY 0x02 /* kbd ready for command */ +#define KB_WRITE 0x43 /* kbd write command */ +#else #define KB_DATA 0x60 /* kbd data port */ #define KB_STAT 0x64 /* kbd status port */ #define KB_BUF_FULL 0x01 /* kbd has char pending */ @@ -255,8 +269,13 @@ typedef struct ssaver ssaver_t; #define KB_ACK 0xFA /* kbd acknowledge answer */ #define KB_RESEND 0xFE /* kbd resend cmd answer */ #define KB_RESET 0xFF /* kbd reset */ +#endif /* video mode definitions */ +#ifdef PC98 +#define M_PC98_80x25 98 /* PC98 80x25 */ +#define M_PC98_80x30 99 /* PC98 80x30 */ +#else #define M_B40x25 0 /* black & white 40 columns */ #define M_C40x25 1 /* color 40 columns */ #define M_B80x25 2 /* black & white 80 columns */ @@ -298,7 +317,12 @@ typedef struct ssaver ssaver_t; #define M_HGC_P0 0xe0 /* hercules graphics - page 0 @ B0000 */ #define M_HGC_P1 0xe1 /* hercules graphics - page 1 @ B8000 */ #define M_MCA_MODE 0xff /* monochrome adapter mode */ +#endif +#ifdef PC98 +#define SW_PC98_80x25 _IO('S', M_PC98_80x25) +#define SW_PC98_80x30 _IO('S', M_PC98_80x30) +#else #define SW_B40x25 _IO('S', M_B40x25) #define SW_C40x25 _IO('S', M_C40x25) #define SW_B80x25 _IO('S', M_B80x25) @@ -335,5 +359,6 @@ typedef struct ssaver ssaver_t; #define SW_CG640x480 _IO('S', M_VGA12) #define SW_VGA13 _IO('S', M_VGA13) #define SW_VGA_CG320 _IO('S', M_VGA13) +#endif #endif 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) { diff --git a/sys/i386/include/devconf.h b/sys/i386/include/devconf.h index d4a30c9..14390b1 100644 --- a/sys/i386/include/devconf.h +++ b/sys/i386/include/devconf.h @@ -22,7 +22,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: devconf.h,v 1.11 1995/11/14 20:52:14 phk Exp $ + * $Id: devconf.h,v 1.12 1995/11/20 12:41:31 phk Exp $ */ /* * devconf.h - machine-dependent device configuration table @@ -35,9 +35,25 @@ #define PARENTNAMELEN 32 +#ifdef PC98 +enum machdep_devtype { MDDT_CPU, MDDT_PC98, MDDT_PCI, MDDT_SCSI, + MDDT_DISK, MDDT_BUS, NDEVTYPES }; +#else enum machdep_devtype { MDDT_CPU, MDDT_ISA, MDDT_EISA, MDDT_PCI, MDDT_SCSI, MDDT_DISK, MDDT_BUS, NDEVTYPES }; +#endif +#ifdef PC98 +#define DEVTYPENAMES { \ + "cpu", \ + "pc98", \ + "pci", \ + "scsi", \ + "disk", \ + "bus", \ + 0 \ + } +#else #define DEVTYPENAMES { \ "cpu", \ "isa", \ @@ -48,6 +64,7 @@ enum machdep_devtype { MDDT_CPU, MDDT_ISA, MDDT_EISA, MDDT_PCI, MDDT_SCSI, "bus", \ 0 \ } +#endif struct machdep_devconf { enum machdep_devtype mddc_devtype; @@ -63,8 +80,12 @@ struct machdep_devconf { #define dc_devtype dc_md.mddc_devtype #define dc_flags dc_md.mddc_flags +#ifdef PC98 +#define kdc_pc98 kdc_parentdata +#else #define kdc_isa kdc_parentdata #define kdc_eisa kdc_parentdata +#endif #define kdc_scsi kdc_parentdata #define CPU_EXTERNALLEN (0) diff --git a/sys/i386/include/random.h b/sys/i386/include/random.h index 97f6c65..73957b9 100644 --- a/sys/i386/include/random.h +++ b/sys/i386/include/random.h @@ -1,7 +1,7 @@ /* * random.h -- A strong random number generator * - * $Id: random.h,v 1.3 1995/12/29 08:04:13 markm Exp $ + * $Id: random.h,v 1.4 1996/01/30 22:54:53 mpp Exp $ * * Version 0.95, last modified 18-Oct-95 * @@ -51,9 +51,14 @@ #define _MACHINE_RANDOM_H_ 1 #if defined(KERNEL) +#ifdef PC98 +#include <pc98/pc98/icu.h> +#include <pc98/pc98/pc98_device.h> +#else #include <i386/isa/icu.h> #include <i386/isa/isa_device.h> #endif +#endif #include <sys/ioctl.h> #define MEM_SETIRQ _IOW('r', 1, u_int16_t) /* set interrupt */ diff --git a/sys/i386/include/soundcard.h b/sys/i386/include/soundcard.h index 725a023..3dcdaa1 100644 --- a/sys/i386/include/soundcard.h +++ b/sys/i386/include/soundcard.h @@ -64,6 +64,9 @@ #define SNDCARD_TRXPRO 16 #define SNDCARD_TRXPRO_SB 17 #define SNDCARD_TRXPRO_MPU 18 +#ifdef PC98 +#define SNDCARD_PCM86 19 +#endif /*********************************** * IOCTL Commands for /dev/sequencer diff --git a/sys/i386/isa/isa.h b/sys/i386/isa/isa.h index fccfdad..11beca4 100644 --- a/sys/i386/isa/isa.h +++ b/sys/i386/isa/isa.h @@ -34,9 +34,13 @@ * SUCH DAMAGE. * * from: @(#)isa.h 5.7 (Berkeley) 5/9/91 - * $Id: isa.h,v 1.17 1995/11/18 09:29:39 bde Exp $ + * $Id: isa.h,v 1.18 1996/01/30 22:55:57 mpp Exp $ */ +#ifdef PC98 +#error isa.h is included from PC-9801 source +#endif + #ifndef _I386_ISA_ISA_H_ #define _I386_ISA_ISA_H_ diff --git a/sys/i386/isa/isa_device.h b/sys/i386/isa/isa_device.h index 3347934..996a08a 100644 --- a/sys/i386/isa/isa_device.h +++ b/sys/i386/isa/isa_device.h @@ -31,9 +31,13 @@ * SUCH DAMAGE. * * from: @(#)isa_device.h 7.1 (Berkeley) 5/9/91 - * $Id: isa_device.h,v 1.28 1996/01/30 22:56:02 mpp Exp $ + * $Id: isa_device.h,v 1.29 1996/04/08 19:38:57 smpatel Exp $ */ +#ifdef PC98 +#error isa_device.h is included from PC-9801 source +#endif + #ifndef _I386_ISA_ISA_DEVICE_H_ #define _I386_ISA_ISA_DEVICE_H_ |