summaryrefslogtreecommitdiffstats
path: root/sys/amd64
diff options
context:
space:
mode:
authorasami <asami@FreeBSD.org>1996-06-14 11:02:28 +0000
committerasami <asami@FreeBSD.org>1996-06-14 11:02:28 +0000
commit36a1932601c730683d263ee933dd90cd6dae96bf (patch)
treed76ce0bf0a31500c82596831333ff034e969773b /sys/amd64
parent5fa995752f02a42fcb2b0ca54149fef141f98060 (diff)
downloadFreeBSD-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/amd64')
-rw-r--r--sys/amd64/include/clock.h10
-rw-r--r--sys/amd64/include/cpufunc.h49
-rw-r--r--sys/amd64/isa/isa.h6
3 files changed, 62 insertions, 3 deletions
diff --git a/sys/amd64/include/clock.h b/sys/amd64/include/clock.h
index 1467e4e..830ae13 100644
--- a/sys/amd64/include/clock.h
+++ b/sys/amd64/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/amd64/include/cpufunc.h b/sys/amd64/include/cpufunc.h
index 1f18615..510cacd 100644
--- a/sys/amd64/include/cpufunc.h
+++ b/sys/amd64/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/amd64/isa/isa.h b/sys/amd64/isa/isa.h
index fccfdad..11beca4 100644
--- a/sys/amd64/isa/isa.h
+++ b/sys/amd64/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_
OpenPOWER on IntegriCloud