summaryrefslogtreecommitdiffstats
path: root/sys/amd64
diff options
context:
space:
mode:
authorasami <asami@FreeBSD.org>1996-10-30 22:41:46 +0000
committerasami <asami@FreeBSD.org>1996-10-30 22:41:46 +0000
commit95ac832055c11e8031e18bcc9759b2d12b654e9b (patch)
tree37f74d6fdf54e31c6c6d69a11d50e299cd0a1118 /sys/amd64
parente1b78916a4b8d96475ebaa0033860c706702fe49 (diff)
downloadFreeBSD-src-95ac832055c11e8031e18bcc9759b2d12b654e9b.zip
FreeBSD-src-95ac832055c11e8031e18bcc9759b2d12b654e9b.tar.gz
More merge and update.
(1) deleted #if 0 pc98/pc98/mse.c (2) hold per-unit I/O ports in ed_softc pc98/pc98/if_ed.c pc98/pc98/if_ed98.h (3) merge more files by segregating changes into headers. new file (moved from pc98/pc98): i386/isa/aic_98.h deleted: well, it's already in the commit message so I won't repeat the long list here ;) Submitted by: The FreeBSD(98) Development Team
Diffstat (limited to 'sys/amd64')
-rw-r--r--sys/amd64/amd64/prof_machdep.c6
-rw-r--r--sys/amd64/amd64/vm_machdep.c18
-rw-r--r--sys/amd64/include/clock.h6
-rw-r--r--sys/amd64/isa/timerreg.h19
-rw-r--r--sys/amd64/isa/vector.S20
-rw-r--r--sys/amd64/isa/vector.s20
-rw-r--r--sys/amd64/pci/pci_bus.c6
-rw-r--r--sys/amd64/pci/pci_cfgreg.c6
8 files changed, 88 insertions, 13 deletions
diff --git a/sys/amd64/amd64/prof_machdep.c b/sys/amd64/amd64/prof_machdep.c
index 62c8df5..a8603cb 100644
--- a/sys/amd64/amd64/prof_machdep.c
+++ b/sys/amd64/amd64/prof_machdep.c
@@ -23,7 +23,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: prof_machdep.c,v 1.2 1996/04/08 16:41:06 wollman Exp $
+ * $Id: prof_machdep.c,v 1.3 1996/10/17 19:32:10 bde Exp $
*/
#ifdef GUPROF
@@ -40,7 +40,11 @@
#include <machine/profile.h>
#endif
+#ifdef PC98
+#include <pc98/pc98/pc98.h>
+#else
#include <i386/isa/isa.h>
+#endif
#include <i386/isa/timerreg.h>
#ifdef GUPROF
diff --git a/sys/amd64/amd64/vm_machdep.c b/sys/amd64/amd64/vm_machdep.c
index 44b799d..62ff784 100644
--- a/sys/amd64/amd64/vm_machdep.c
+++ b/sys/amd64/amd64/vm_machdep.c
@@ -38,7 +38,7 @@
*
* from: @(#)vm_machdep.c 7.3 (Berkeley) 5/13/91
* Utah $Hdr: vm_machdep.c 1.16.1.1 89/06/23$
- * $Id: vm_machdep.c,v 1.69 1996/09/28 22:37:43 dyson Exp $
+ * $Id: vm_machdep.c,v 1.70 1996/10/15 03:16:33 dyson Exp $
*/
#include "npx.h"
@@ -66,7 +66,11 @@
#include <sys/user.h>
+#ifdef PC98
+#include <pc98/pc98/pc98.h>
+#else
#include <i386/isa/isa.h>
+#endif
#ifdef BOUNCE_BUFFERS
static vm_offset_t
@@ -90,7 +94,11 @@ static int bounceallocarraysize;
static unsigned *bounceallocarray;
static int bouncefree;
+#if defined(PC98) && defined (EPSON_BOUNCEDMA)
+#define SIXTEENMEG (3840*4096) /* 15MB boundary */
+#else
#define SIXTEENMEG (4096*4096)
+#endif
#define MAXBKVA 1024
int maxbkva = MAXBKVA*PAGE_SIZE;
@@ -748,7 +756,7 @@ cpu_reset() {
* to do the reset here would then end up in no man's land.
*/
-#ifndef BROKEN_KEYBOARD_RESET
+#if !defined(BROKEN_KEYBOARD_RESET) && !defined(PC98)
outb(IO_KBD + 4, 0xFE);
DELAY(500000); /* wait 0.5 sec to see if that did it */
printf("Keyboard reset did not work, attempting CPU shutdown\n");
@@ -761,6 +769,12 @@ cpu_reset() {
/* "good night, sweet prince .... <THUNK!>" */
invltlb();
/* NOTREACHED */
+#ifdef PC98
+ asm(" cli ");
+ outb(0x37, 0x0f); /* SHUT 0 = 0 */
+ outb(0x37, 0x0b); /* SHUT 1 = 0 */
+ outb(0xf0, 0x00); /* reset port */
+#endif
while(1);
}
diff --git a/sys/amd64/include/clock.h b/sys/amd64/include/clock.h
index f20902f..0f3427f 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.19 1996/10/17 17:31:25 bde Exp $
+ * $Id: clock.h,v 1.20 1996/10/25 13:01:08 bde Exp $
*/
#ifndef _MACHINE_CLOCK_H_
@@ -65,7 +65,11 @@ int sysbeep __P((int pitch, int period));
#ifdef CLOCK_HAIR
+#ifdef PC98
+#include <pc98/pc98/pc98.h> /* XXX */
+#else
#include <i386/isa/isa.h> /* XXX */
+#endif
#include <i386/isa/timerreg.h> /* XXX */
static __inline u_int
diff --git a/sys/amd64/isa/timerreg.h b/sys/amd64/isa/timerreg.h
index 5742f66..16fbc0b 100644
--- a/sys/amd64/isa/timerreg.h
+++ b/sys/amd64/isa/timerreg.h
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* from: Header: timerreg.h,v 1.2 93/02/28 15:08:58 mccanne Exp
- * $Id$
+ * $Id: timerreg.h,v 1.2 1993/10/16 13:46:26 rgrimes Exp $
*/
/*
@@ -59,6 +59,7 @@
* in undefined behavior (but hopefully not fry the chip).
* Reading in this manner has no side effects.
*
+ * [IBM-PC]
* The outputs of the three timers are connected as follows:
*
* timer 0 -> irq 0
@@ -67,15 +68,31 @@
*
* Timer 0 is used to call hardclock.
* Timer 2 is used to generate console beeps.
+ *
+ * [PC-9801]
+ * The outputs of the three timers are connected as follows:
+ *
+ * timer 0 -> irq 0
+ * timer 1 -> speaker (via keyboard controller)
+ * timer 2 -> RS232C
+ *
+ * Timer 0 is used to call hardclock.
+ * Timer 1 is used to generate console beeps.
*/
/*
* Macros for specifying values to be written into a mode register.
*/
#define TIMER_CNTR0 (IO_TIMER1 + 0) /* timer 0 counter port */
+#ifdef PC98
+#define TIMER_CNTR1 0x3fdb /* timer 1 counter port */
+#define TIMER_CNTR2 (IO_TIMER1 + 4) /* timer 2 counter port */
+#define TIMER_MODE (IO_TIMER1 + 6) /* timer mode port */
+#else
#define TIMER_CNTR1 (IO_TIMER1 + 1) /* timer 1 counter port */
#define TIMER_CNTR2 (IO_TIMER1 + 2) /* timer 2 counter port */
#define TIMER_MODE (IO_TIMER1 + 3) /* timer mode port */
+#endif
#define TIMER_SEL0 0x00 /* select counter 0 */
#define TIMER_SEL1 0x40 /* select counter 1 */
#define TIMER_SEL2 0x80 /* select counter 2 */
diff --git a/sys/amd64/isa/vector.S b/sys/amd64/isa/vector.S
index 94691f5..0283c2a 100644
--- a/sys/amd64/isa/vector.S
+++ b/sys/amd64/isa/vector.S
@@ -1,12 +1,26 @@
/*
* from: vector.s, 386BSD 0.1 unknown origin
- * $Id: vector.s,v 1.19 1996/04/11 21:18:47 bde Exp $
+ * $Id: vector.s,v 1.20 1996/05/31 01:08:08 peter Exp $
+ */
+
+/*
+ * modified for PC98 by Kakefuda
*/
#include "opt_auto_eoi.h"
#include <i386/isa/icu.h>
+#ifdef PC98
+#include <pc98/pc98/pc98.h>
+#else
#include <i386/isa/isa.h>
+#endif
+
+#ifdef PC98
+#define ICU_IMR_OFFSET 2 /* IO_ICU{1,2} + 2 */
+#else
+#define ICU_IMR_OFFSET 1 /* IO_ICU{1,2} + 1 */
+#endif
#define ICU_EOI 0x20 /* XXX - define elsewhere */
@@ -168,7 +182,7 @@ IDTVEC(vec_name) ; \
movb _imen + IRQ_BYTE(irq_num),%al ; \
orb $IRQ_BIT(irq_num),%al ; \
movb %al,_imen + IRQ_BYTE(irq_num) ; \
- outb %al,$icu+1 ; \
+ outb %al,$icu+ICU_IMR_OFFSET ; \
enable_icus ; \
incl _cnt+V_INTR ; /* tally interrupts */ \
movl _cpl,%eax ; \
@@ -190,7 +204,7 @@ __CONCAT(Xresume,irq_num): ; \
movb _imen + IRQ_BYTE(irq_num),%al ; \
andb $~IRQ_BIT(irq_num),%al ; \
movb %al,_imen + IRQ_BYTE(irq_num) ; \
- outb %al,$icu+1 ; \
+ outb %al,$icu+ICU_IMR_OFFSET ; \
sti ; /* XXX _doreti repeats the cli/sti */ \
MEXITCOUNT ; \
/* We could usually avoid the following jmp by inlining some of */ \
diff --git a/sys/amd64/isa/vector.s b/sys/amd64/isa/vector.s
index 94691f5..0283c2a 100644
--- a/sys/amd64/isa/vector.s
+++ b/sys/amd64/isa/vector.s
@@ -1,12 +1,26 @@
/*
* from: vector.s, 386BSD 0.1 unknown origin
- * $Id: vector.s,v 1.19 1996/04/11 21:18:47 bde Exp $
+ * $Id: vector.s,v 1.20 1996/05/31 01:08:08 peter Exp $
+ */
+
+/*
+ * modified for PC98 by Kakefuda
*/
#include "opt_auto_eoi.h"
#include <i386/isa/icu.h>
+#ifdef PC98
+#include <pc98/pc98/pc98.h>
+#else
#include <i386/isa/isa.h>
+#endif
+
+#ifdef PC98
+#define ICU_IMR_OFFSET 2 /* IO_ICU{1,2} + 2 */
+#else
+#define ICU_IMR_OFFSET 1 /* IO_ICU{1,2} + 1 */
+#endif
#define ICU_EOI 0x20 /* XXX - define elsewhere */
@@ -168,7 +182,7 @@ IDTVEC(vec_name) ; \
movb _imen + IRQ_BYTE(irq_num),%al ; \
orb $IRQ_BIT(irq_num),%al ; \
movb %al,_imen + IRQ_BYTE(irq_num) ; \
- outb %al,$icu+1 ; \
+ outb %al,$icu+ICU_IMR_OFFSET ; \
enable_icus ; \
incl _cnt+V_INTR ; /* tally interrupts */ \
movl _cpl,%eax ; \
@@ -190,7 +204,7 @@ __CONCAT(Xresume,irq_num): ; \
movb _imen + IRQ_BYTE(irq_num),%al ; \
andb $~IRQ_BIT(irq_num),%al ; \
movb %al,_imen + IRQ_BYTE(irq_num) ; \
- outb %al,$icu+1 ; \
+ outb %al,$icu+ICU_IMR_OFFSET ; \
sti ; /* XXX _doreti repeats the cli/sti */ \
MEXITCOUNT ; \
/* We could usually avoid the following jmp by inlining some of */ \
diff --git a/sys/amd64/pci/pci_bus.c b/sys/amd64/pci/pci_bus.c
index 4232069..903214c 100644
--- a/sys/amd64/pci/pci_bus.c
+++ b/sys/amd64/pci/pci_bus.c
@@ -1,6 +1,6 @@
/**************************************************************************
**
-** $Id: pcibus.c,v 1.25 1996/06/13 21:50:41 se Exp $
+** $Id: pcibus.c,v 1.26 1996/06/18 01:22:28 bde Exp $
**
** pci bus subroutines for i386 architecture.
**
@@ -151,7 +151,11 @@ DATA_SET (pcibus_set, i386pci);
#define CONF1_ENABLE_RES1 0x80000000ul
#define CONF2_ENABLE_PORT 0x0cf8
+#ifdef PC98
+#define CONF2_FORWARD_PORT 0x0cf9
+#else
#define CONF2_FORWARD_PORT 0x0cfa
+#endif
#define CONF2_ENABLE_CHK 0x0e
#define CONF2_ENABLE_RES 0x0e
diff --git a/sys/amd64/pci/pci_cfgreg.c b/sys/amd64/pci/pci_cfgreg.c
index 4232069..903214c 100644
--- a/sys/amd64/pci/pci_cfgreg.c
+++ b/sys/amd64/pci/pci_cfgreg.c
@@ -1,6 +1,6 @@
/**************************************************************************
**
-** $Id: pcibus.c,v 1.25 1996/06/13 21:50:41 se Exp $
+** $Id: pcibus.c,v 1.26 1996/06/18 01:22:28 bde Exp $
**
** pci bus subroutines for i386 architecture.
**
@@ -151,7 +151,11 @@ DATA_SET (pcibus_set, i386pci);
#define CONF1_ENABLE_RES1 0x80000000ul
#define CONF2_ENABLE_PORT 0x0cf8
+#ifdef PC98
+#define CONF2_FORWARD_PORT 0x0cf9
+#else
#define CONF2_FORWARD_PORT 0x0cfa
+#endif
#define CONF2_ENABLE_CHK 0x0e
#define CONF2_ENABLE_RES 0x0e
OpenPOWER on IntegriCloud