summaryrefslogtreecommitdiffstats
path: root/sys/pc98/cbus
diff options
context:
space:
mode:
authorasami <asami@FreeBSD.org>1996-10-23 07:25:35 +0000
committerasami <asami@FreeBSD.org>1996-10-23 07:25:35 +0000
commitda2957207b1d3dec86dcf8334bc11b75a9113b84 (patch)
tree59a2eda3deec512d26d8ccb3951fd2db2f76dab6 /sys/pc98/cbus
parent326b6b4bd810b639513bd0adabaeed761886bd77 (diff)
downloadFreeBSD-src-da2957207b1d3dec86dcf8334bc11b75a9113b84.zip
FreeBSD-src-da2957207b1d3dec86dcf8334bc11b75a9113b84.tar.gz
Another round of merge.
(1) Bug fix (pass boot drive): pc98/boot/biosboot/boot2.S (2) Delete code for unsupported high-resolution modes and move old Epson notebook code to epsonio.h: pc98/boot/biosboot/io.c pc98/i386/vm_machdep.c pc98/pc98/fd.c pc98/pc98/pc98.c pc98/pc98/pc98.h pc98/pc98/epsonio.h (new) (3) Change aic driver so that PCMCIA cards (I/O port same as PC/AT) and PC-9801-100 cards can be selected with a flag in kernel config file: pc98/pc98/aic6360.c pc98/pc98/aic_98.h (new) (4) Fix wcd entry (it was broken). Delete mcd, it doesn't work on 98. Change aic entry according to above: pc98/conf/GENERIC98 (5) Move pc98_machdep.c to top of files in pc98/pc98: pc98/conf/files.pc98 (6) Delete empty lines: pc98/i386/locore.s (7) Fix (it didn't work if I586 was specified): pc98/pc98/clock.c (8) Staticize: pc98/pc98/pc98_machdep.c (9) Enable workaround for Cyrix bug for 5x86 also: pc98/i386/machdep.c pc98/i386/trap.c All the above deletes this file too: pc98/i386/pmap.c (phew!) Submitted by: The FreeBSD(98) Development Team
Diffstat (limited to 'sys/pc98/cbus')
-rw-r--r--sys/pc98/cbus/cbus.h49
-rw-r--r--sys/pc98/cbus/clock.c56
-rw-r--r--sys/pc98/cbus/fdc.c3
-rw-r--r--sys/pc98/cbus/pcrtc.c56
4 files changed, 59 insertions, 105 deletions
diff --git a/sys/pc98/cbus/cbus.h b/sys/pc98/cbus/cbus.h
index 5d79e74..84c77b4 100644
--- a/sys/pc98/cbus/cbus.h
+++ b/sys/pc98/cbus/cbus.h
@@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* from: @(#)isa.h 5.7 (Berkeley) 5/9/91
- * $Id: pc98.h,v 1.4 1996/09/12 11:09:54 asami Exp $
+ * $Id: pc98.h,v 1.5 1996/10/09 21:46:34 asami Exp $
*/
#ifndef _PC98_PC98_PC98_H_
@@ -193,7 +193,6 @@
#define M_H98 0x0020
#define M_NOTE 0x0040
#define M_NORMAL 0x1000
-#define M_HIGHRESO 0x2000
#define M_8M 0x8000
#if defined(KERNEL) && !defined(LOCORE)
@@ -214,52 +213,6 @@ extern unsigned char pc98_system_parameter[]; /* in locore.c */
# define PC98_TYPE_CHECK(x) ((pc98_machine_type & (x)) == (x))
-#include <machine/spl.h>
-
-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 /* KERNEL */
/*
diff --git a/sys/pc98/cbus/clock.c b/sys/pc98/cbus/clock.c
index d9b34d1..d96f6619 100644
--- a/sys/pc98/cbus/clock.c
+++ b/sys/pc98/cbus/clock.c
@@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* from: @(#)clock.c 7.2 (Berkeley) 5/12/91
- * $Id: clock.c,v 1.6 1996/10/09 19:47:43 bde Exp $
+ * $Id: clock.c,v 1.7 1996/10/09 21:46:11 asami Exp $
*/
/*
@@ -46,7 +46,7 @@
/*
* modified for PC98
- * $Id: clock.c,v 1.6 1996/10/09 19:47:43 bde Exp $
+ * $Id: clock.c,v 1.7 1996/10/09 21:46:11 asami Exp $
*/
/*
@@ -1127,6 +1127,32 @@ cpu_initclocks()
writertc(RTC_STATUSA, rtc_statusa);
writertc(RTC_STATUSB, RTCSB_24HR);
+ /* Don't bother enabling the statistics clock. */
+ if (statclock_disable)
+ return;
+ diag = rtcin(RTC_DIAG);
+ if (diag != 0)
+ printf("RTC BIOS diagnostic error %b\n", diag, RTCDG_BITS);
+ register_intr(/* irq */ 8, /* XXX id */ 1, /* flags */ 0,
+ /* XXX */ (inthand2_t *)rtcintr, &stat_imask,
+ /* unit */ 0);
+ INTREN(IRQ8);
+ writertc(RTC_STATUSB, rtc_statusb);
+#endif
+}
+
+void
+setstatclockrate(int newhz)
+{
+#ifndef PC98
+ if (newhz == RTC_PROFRATE)
+ rtc_statusa = RTCSA_DIVIDER | RTCSA_PROF;
+ else
+ rtc_statusa = RTCSA_DIVIDER | RTCSA_NOPROF;
+ writertc(RTC_STATUSA, rtc_statusa);
+#endif
+}
+
static int
sysctl_machdep_i8254_freq SYSCTL_HANDLER_ARGS
{
@@ -1193,29 +1219,3 @@ sysctl_machdep_i586_freq SYSCTL_HANDLER_ARGS
SYSCTL_PROC(_machdep, OID_AUTO, i586_freq, CTLTYPE_INT | CTLFLAG_RW,
0, sizeof(u_int), sysctl_machdep_i586_freq, "I", "");
#endif /* defined(I586_CPU) || defined(I686_CPU) */
-
- /* Don't bother enabling the statistics clock. */
- if (statclock_disable)
- return;
- diag = rtcin(RTC_DIAG);
- if (diag != 0)
- printf("RTC BIOS diagnostic error %b\n", diag, RTCDG_BITS);
- register_intr(/* irq */ 8, /* XXX id */ 1, /* flags */ 0,
- /* XXX */ (inthand2_t *)rtcintr, &stat_imask,
- /* unit */ 0);
- INTREN(IRQ8);
- writertc(RTC_STATUSB, rtc_statusb);
-#endif
-}
-
-void
-setstatclockrate(int newhz)
-{
-#ifndef PC98
- if (newhz == RTC_PROFRATE)
- rtc_statusa = RTCSA_DIVIDER | RTCSA_PROF;
- else
- rtc_statusa = RTCSA_DIVIDER | RTCSA_NOPROF;
- writertc(RTC_STATUSA, rtc_statusa);
-#endif
-}
diff --git a/sys/pc98/cbus/fdc.c b/sys/pc98/cbus/fdc.c
index e8ad1b2..be8751c 100644
--- a/sys/pc98/cbus/fdc.c
+++ b/sys/pc98/cbus/fdc.c
@@ -43,7 +43,7 @@
* SUCH DAMAGE.
*
* from: @(#)fd.c 7.4 (Berkeley) 5/25/91
- * $Id: fd.c,v 1.5 1996/09/03 10:23:25 asami Exp $
+ * $Id: fd.c,v 1.6 1996/09/10 09:37:50 asami Exp $
*
*/
@@ -72,6 +72,7 @@
#include <sys/dkstat.h>
#ifdef PC98
#include <pc98/pc98/pc98.h>
+#include <pc98/pc98/epsonio.h>
#include <i386/isa/isa_device.h>
#include <pc98/pc98/fdreg.h>
#include <pc98/pc98/fdc.h>
diff --git a/sys/pc98/cbus/pcrtc.c b/sys/pc98/cbus/pcrtc.c
index d9b34d1..d96f6619 100644
--- a/sys/pc98/cbus/pcrtc.c
+++ b/sys/pc98/cbus/pcrtc.c
@@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* from: @(#)clock.c 7.2 (Berkeley) 5/12/91
- * $Id: clock.c,v 1.6 1996/10/09 19:47:43 bde Exp $
+ * $Id: clock.c,v 1.7 1996/10/09 21:46:11 asami Exp $
*/
/*
@@ -46,7 +46,7 @@
/*
* modified for PC98
- * $Id: clock.c,v 1.6 1996/10/09 19:47:43 bde Exp $
+ * $Id: clock.c,v 1.7 1996/10/09 21:46:11 asami Exp $
*/
/*
@@ -1127,6 +1127,32 @@ cpu_initclocks()
writertc(RTC_STATUSA, rtc_statusa);
writertc(RTC_STATUSB, RTCSB_24HR);
+ /* Don't bother enabling the statistics clock. */
+ if (statclock_disable)
+ return;
+ diag = rtcin(RTC_DIAG);
+ if (diag != 0)
+ printf("RTC BIOS diagnostic error %b\n", diag, RTCDG_BITS);
+ register_intr(/* irq */ 8, /* XXX id */ 1, /* flags */ 0,
+ /* XXX */ (inthand2_t *)rtcintr, &stat_imask,
+ /* unit */ 0);
+ INTREN(IRQ8);
+ writertc(RTC_STATUSB, rtc_statusb);
+#endif
+}
+
+void
+setstatclockrate(int newhz)
+{
+#ifndef PC98
+ if (newhz == RTC_PROFRATE)
+ rtc_statusa = RTCSA_DIVIDER | RTCSA_PROF;
+ else
+ rtc_statusa = RTCSA_DIVIDER | RTCSA_NOPROF;
+ writertc(RTC_STATUSA, rtc_statusa);
+#endif
+}
+
static int
sysctl_machdep_i8254_freq SYSCTL_HANDLER_ARGS
{
@@ -1193,29 +1219,3 @@ sysctl_machdep_i586_freq SYSCTL_HANDLER_ARGS
SYSCTL_PROC(_machdep, OID_AUTO, i586_freq, CTLTYPE_INT | CTLFLAG_RW,
0, sizeof(u_int), sysctl_machdep_i586_freq, "I", "");
#endif /* defined(I586_CPU) || defined(I686_CPU) */
-
- /* Don't bother enabling the statistics clock. */
- if (statclock_disable)
- return;
- diag = rtcin(RTC_DIAG);
- if (diag != 0)
- printf("RTC BIOS diagnostic error %b\n", diag, RTCDG_BITS);
- register_intr(/* irq */ 8, /* XXX id */ 1, /* flags */ 0,
- /* XXX */ (inthand2_t *)rtcintr, &stat_imask,
- /* unit */ 0);
- INTREN(IRQ8);
- writertc(RTC_STATUSB, rtc_statusb);
-#endif
-}
-
-void
-setstatclockrate(int newhz)
-{
-#ifndef PC98
- if (newhz == RTC_PROFRATE)
- rtc_statusa = RTCSA_DIVIDER | RTCSA_PROF;
- else
- rtc_statusa = RTCSA_DIVIDER | RTCSA_NOPROF;
- writertc(RTC_STATUSA, rtc_statusa);
-#endif
-}
OpenPOWER on IntegriCloud