summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog21
-rw-r--r--i386/i386/fpu.c4
-rw-r--r--i386/i386/gdt.c6
-rw-r--r--i386/i386/gdt.h11
-rw-r--r--i386/i386/hardclock.c23
-rw-r--r--i386/i386/locore.S6
-rw-r--r--i386/i386/pic.c8
-rw-r--r--i386/i386/pic.h8
-rw-r--r--i386/i386/pit.c58
-rw-r--r--i386/i386/pit.h8
10 files changed, 36 insertions, 117 deletions
diff --git a/ChangeLog b/ChangeLog
index e0a91a1..bc1e276 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,24 @@
+2006-11-05 Samuel Thibault <samuel.thibault@ens-lyon.org>
+
+ Drop PS2 architecture support.
+
+ * i386/i386/fpu.c (fpintr): Remove PS2 from #if.
+ * i386/i386/gdt.c (abios_int_return, abios_th_return, intstack): Remove
+ extern declaration.
+ * i386/i386/gdt.h (ABIOS_INT_RET, ABIOS_TH_RET, ABIOS_INT_SS,
+ ABIOS_TH_SS, ABIOS_FIRST_AVAIL_SEL): Remove macros.
+ (GDTSZ): Remove PS2 case.
+ * i386/i386/hardclock.c: Don't include `i386/pic.h' and `i386/pio.h'.
+ (hardclock): Remove PS2 prototype and code.
+ * i386/i386/locore.S (RET_OFFSET): Remove PS2 stack layout.
+ * i386/i386/pic.c (picinit): Remove #ifdef PS2.
+ * i386/i386/pic.h: Remove PS2 from #if.
+ * i386/i386/pit.c (clock_int_handler): Remove extern declaration.
+ (clock_request_block, clock_flags, cqbuf): Remove variables.
+ (clkstart): Remove call to abios_clock_start function.
+ (abios_clock_start, ackrtclock): Remove function.
+ * i386/i386/pit.h: Remove PS2 from #if.
+
2006-10-26 Thomas Schwinge <tschwinge@gnu.org>
* Makefile.in: Regenerate.
diff --git a/i386/i386/fpu.c b/i386/i386/fpu.c
index 0ebdaa5..9a82d01 100644
--- a/i386/i386/fpu.c
+++ b/i386/i386/fpu.c
@@ -692,7 +692,7 @@ fp_state_alloc()
ifps->fp_save_state.fp_tag = 0xffff; /* all empty */
}
-#if AT386 || PS2
+#if AT386
/*
* Handle a coprocessor error interrupt on the AT386.
* This comes in on line 5 of the slave PIC at SPL1.
@@ -757,4 +757,4 @@ ASSERT_IPL(SPL1);
ast_on(cpu_number(), AST_I386_FP);
splx(s);
}
-#endif /* AT386 || PS2 */
+#endif /* AT386 */
diff --git a/i386/i386/gdt.c b/i386/i386/gdt.c
index 56c1168..9438ee1 100644
--- a/i386/i386/gdt.c
+++ b/i386/i386/gdt.c
@@ -36,12 +36,6 @@
#include "seg.h"
#include "gdt.h"
-#if PS2
-extern unsigned long abios_int_return;
-extern unsigned long abios_th_return;
-extern char intstack[];
-#endif /* PS2 */
-
struct real_descriptor gdt[GDTSZ];
void
diff --git a/i386/i386/gdt.h b/i386/i386/gdt.h
index 24bb45c..49cb0d3 100644
--- a/i386/i386/gdt.h
+++ b/i386/i386/gdt.h
@@ -49,18 +49,7 @@
#define USER_FPREGS 0x40 /* user-mode access to saved
floating-point registers */
-#ifdef PS2
-#define ABIOS_INT_RET 0x48 /* 16 bit return selector for ABIOS */
-#define ABIOS_TH_RET 0x50 /* 16 bit return selector for ABIOS */
-#define ABIOS_INT_SS 0x58 /* ABIOS interrupt stack selector */
-#define ABIOS_TH_SS 0x60 /* ABIOS current stack selector */
-#define ABIOS_FIRST_AVAIL_SEL \
- 0x68 /* first selector for ABIOS
- to allocate */
-#define GDTSZ 0x300 /* size of gdt table */
-#else /* PS2 */
#define GDTSZ 11
-#endif /* PS2 */
extern struct real_descriptor gdt[GDTSZ];
diff --git a/i386/i386/hardclock.c b/i386/i386/hardclock.c
index 140a6f5..23eb4c1 100644
--- a/i386/i386/hardclock.c
+++ b/i386/i386/hardclock.c
@@ -41,24 +41,14 @@
#if defined(AT386) || defined(iPSC386)
#include <i386/ipl.h>
#endif
-#ifdef PS2
-#include <i386/pic.h>
-#include <i386/pio.h>
-#endif /* PS2 */
extern void clock_interrupt();
extern char return_to_iret[];
void
-#ifdef PS2
-hardclock(iunit, ivect, old_ipl, ret_addr, regs)
- int iunit; /* 'unit' number */
- int ivect; /* interrupt number */
-#else /* PS2 */
hardclock(iunit, old_ipl, ret_addr, regs)
int iunit; /* 'unit' number */
int old_ipl; /* old interrupt level */
-#endif /* PS2 */
char * ret_addr; /* return address in interrupt handler */
struct i386_interrupt_state *regs;
/* saved registers */
@@ -70,11 +60,11 @@ hardclock(iunit, old_ipl, ret_addr, regs)
clock_interrupt(tick, /* usec per tick */
(regs->efl & EFL_VM) || /* user mode */
((regs->cs & 0x03) != 0), /* user mode */
-#if defined(PS2) || defined(LINUX_DEV)
+#if defined(LINUX_DEV)
FALSE /* ignore SPL0 */
-#else /* PS2 */
+#else /* LINUX_DEV */
old_ipl == SPL0 /* base priority */
-#endif /* PS2 */
+#endif /* LINUX_DEV */
);
else
/*
@@ -87,11 +77,4 @@ hardclock(iunit, old_ipl, ret_addr, regs)
#ifdef LINUX_DEV
linux_timer_intr();
#endif
-
-#ifdef PS2
- /*
- * Reset the clock interrupt line.
- */
- outb(0x61, inb(0x61) | 0x80);
-#endif /* PS2 */
}
diff --git a/i386/i386/locore.S b/i386/i386/locore.S
index 7ae5bf1..3db614f 100644
--- a/i386/i386/locore.S
+++ b/i386/i386/locore.S
@@ -745,7 +745,6 @@ ast_from_interrupt:
* frame-> saved %ebp
* return address in interrupt handler
* iunit
- * [ PS2 - saved interrupt number ]
* saved SPL
* return address == return_to_iret_i
* saved %edx
@@ -759,7 +758,6 @@ ast_from_interrupt:
* frame-> saved %ebp
* return address in interrupt handler
* iunit
- * [ PS2 - saved interrupt number ]
* saved SPL
* return address == return_to_iret
* pointer to save area on old stack
@@ -777,11 +775,7 @@ ast_from_interrupt:
* Call kdb, passing it that register save area.
*/
-#ifdef PS2
-#define RET_OFFSET 20
-#else /* not PS2 */
#define RET_OFFSET 16
-#endif /* PS2 */
ENTRY(kdb_kintr)
movl %ebp,%eax /* save caller`s frame pointer */
diff --git a/i386/i386/pic.c b/i386/i386/pic.c
index 4efe0ab..ea16111 100644
--- a/i386/i386/pic.c
+++ b/i386/i386/pic.c
@@ -134,8 +134,6 @@ picinit()
slaves_icw = (char *)PIC_SLAVE_ICW;
slaves_ocw = (char *)PIC_SLAVE_OCW;
-#ifdef PS2
-#else /* PS2 */
/*
** 3. Select options for each ICW and each OCW for each PIC.
*/
@@ -211,8 +209,6 @@ picinit()
*/
outb ( master_ocw, PICM_OCW1 );
-#endif /* PS2 */
-
#if 0
printf(" spl set to %x \n", curr_pic_mask);
#endif
@@ -231,9 +227,9 @@ picinit()
**
*/
-#if defined(AT386) || defined(PS2)
+#if defined(AT386)
#define SLAVEMASK (0xFFFF ^ SLAVE_ON_IR2)
-#endif /* defined(AT386) || defined(PS2) */
+#endif /* defined(AT386) */
#ifdef iPSC386
#define SLAVEMASK (0xFFFF ^ SLAVE_ON_IR7)
#endif /* iPSC386 */
diff --git a/i386/i386/pic.h b/i386/i386/pic.h
index faf123a..d455f7c 100644
--- a/i386/i386/pic.h
+++ b/i386/i386/pic.h
@@ -59,12 +59,12 @@ WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
** The following are definitions used to locate the PICs in the system
*/
-#if defined(AT386) || defined(PS2)
+#if defined(AT386)
#define ADDR_PIC_BASE 0x20
#define OFF_ICW 0x00
#define OFF_OCW 0x01
#define SIZE_PIC 0x80
-#endif /* defined(AT386) || defined(PS2) */
+#endif /* defined(AT386) */
#ifdef iPSC386
#define ADDR_PIC_BASE 0xC0
@@ -102,10 +102,10 @@ WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
** ICW2
*/
-#if defined(AT386) || defined(PS2)
+#if defined(AT386)
#define PICM_VECTBASE 0x40
#define PICS_VECTBASE PICM_VECTBASE + 0x08
-#endif /* defined(AT386) || defined(PS2) */
+#endif /* defined(AT386) */
#ifdef iPSC386
#define PICM_VECTBASE 0x40
diff --git a/i386/i386/pit.c b/i386/i386/pit.c
index 68661f5..8e9f953 100644
--- a/i386/i386/pit.c
+++ b/i386/i386/pit.c
@@ -64,16 +64,6 @@ int pit0_mode = PIT_C0|PIT_SQUAREMODE|PIT_READMODE ;
unsigned int clknumb = CLKNUM; /* interrupt interval for timer 0 */
-#ifdef PS2
-extern int clock_int_handler();
-
-#include <sys/types.h>
-#include <i386ps2/abios.h>
-static struct generic_request *clock_request_block;
-static int clock_flags;
-char cqbuf[200]; /*XXX temporary.. should use kmem_alloc or whatever..*/
-#endif /* PS2 */
-
clkstart()
{
unsigned int flags;
@@ -85,10 +75,6 @@ clkstart()
s = sploff(); /* disable interrupts */
-#ifdef PS2
- abios_clock_start();
-#endif /* PS2 */
-
/* Since we use only timer 0, we program that.
* 8254 Manual specifically says you do not need to program
* timers you do not use
@@ -101,47 +87,3 @@ clkstart()
outb(pitctr0_port, byte);
splon(s); /* restore interrupt state */
}
-
-#define COUNT 10000 /* should be a multiple of 1000! */
-
-#ifdef PS2
-
-abios_clock_start()
-{
- struct generic_request temp_request_block;
- int rc;
-
- nmi_enable(); /* has to happen somewhere! */
- temp_request_block.r_current_req_blck_len = ABIOS_MIN_REQ_SIZE;
- temp_request_block.r_logical_id = abios_next_LID(SYSTIME_ID,
- ABIOS_FIRST_LID);
- temp_request_block.r_unit = 0;
- temp_request_block.r_function = ABIOS_LOGICAL_PARAMETER;
- temp_request_block.r_return_code = ABIOS_UNDEFINED;
-
- abios_common_start(&temp_request_block,0);
- if (temp_request_block.r_return_code != ABIOS_DONE) {
- panic("couldn init abios time code!\n");
- }
-
- /*
- * now build the clock request for the hardware system clock
- */
- clock_request_block = (struct generic_request *)cqbuf;
- clock_request_block->r_current_req_blck_len =
- temp_request_block.r_request_block_length;
- clock_request_block->r_logical_id = temp_request_block.r_logical_id;
- clock_request_block->r_unit = 0;
- clock_request_block->r_function = ABIOS_DEFAULT_INTERRUPT;
- clock_request_block->r_return_code = ABIOS_UNDEFINED;
- clock_flags = temp_request_block.r_logical_id_flags;
-}
-
-ackrtclock()
-{
- if (clock_request_block) {
- clock_request_block->r_return_code = ABIOS_UNDEFINED;
- abios_common_interrupt(clock_request_block,clock_flags);
- }
- }
-#endif /* PS2 */
diff --git a/i386/i386/pit.h b/i386/i386/pit.h
index 380bffd..a34628e 100644
--- a/i386/i386/pit.h
+++ b/i386/i386/pit.h
@@ -51,7 +51,7 @@ WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#define PITCTR1_PORT 0xD2 /* counter 1 port */
#define PITCTR2_PORT 0xD4 /* counter 2 port */
#define PITCTL_PORT 0xD6 /* PIT control port */
-#else /* defined(AT386) || defined(PS2) */
+#else /* defined(AT386) */
/* Definitions for 8254 Programmable Interrupt Timer ports on AT 386 */
#define PITCTR0_PORT 0x40 /* counter 0 port */
#define PITCTR1_PORT 0x41 /* counter 1 port */
@@ -61,7 +61,7 @@ WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
/* bits used in auxiliary control port for timer 2 */
#define PITAUX_GATE2 0x01 /* aux port, PIT gate 2 input */
#define PITAUX_OUT2 0x02 /* aux port, PIT clock out 2 enable */
-#endif /* defined(AT386) || defined(PS2) */
+#endif /* defined(AT386) */
/* Following are used for Timer 0 */
#define PIT_C0 0x00 /* select counter 0 */
@@ -80,9 +80,9 @@ WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
* Clock speed for the timer in hz divided by the constant HZ
* (defined in param.h)
*/
-#if AT386 || PS2
+#if AT386
#define CLKNUM 1193167
-#endif /* AT386 || PS2 */
+#endif /* AT386 */
#if defined(MB1)
#define CLKNUM 12300
#endif