diff options
Diffstat (limited to 'sys')
-rw-r--r-- | sys/arch/mips64/include/exception.h | 74 | ||||
-rw-r--r-- | sys/arch/mips64/include/pio.h | 120 | ||||
-rw-r--r-- | sys/arch/mips64/mips64/interrupt.c | 3 | ||||
-rw-r--r-- | sys/arch/mips64/mips64/lcore_access.S | 115 | ||||
-rw-r--r-- | sys/arch/mips64/mips64/trap.c | 3 | ||||
-rw-r--r-- | sys/arch/sgi/include/bus.h | 4 | ||||
-rw-r--r-- | sys/arch/sgi/include/pio.h | 5 | ||||
-rw-r--r-- | sys/arch/sgi/sgi/machdep.c | 3 |
8 files changed, 5 insertions, 322 deletions
diff --git a/sys/arch/mips64/include/exception.h b/sys/arch/mips64/include/exception.h deleted file mode 100644 index eacbaafafea..00000000000 --- a/sys/arch/mips64/include/exception.h +++ /dev/null @@ -1,74 +0,0 @@ -/* $OpenBSD: exception.h,v 1.5 2007/04/24 16:47:34 miod Exp $ */ - -/* - * Copyright (c) 1998-2003 Opsycon AB (www.opsycon.se) - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS - * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - */ - -/* - * Definitions for exception processing. - */ - -#ifndef _MIPS_EXCEPTION_H_ -#define _MIPS_EXCEPTION_H_ - -/* - * Exception codes. - */ - -#define EX_INT 0 /* Interrupt */ -#define EX_MOD 1 /* TLB Modification */ -#define EX_TLBL 2 /* TLB exception, load or i-fetch */ -#define EX_TLBS 3 /* TLB exception, store */ -#define EX_ADEL 4 /* Address error exception, load or i-fetch */ -#define EX_ADES 5 /* Address error exception, store */ -#define EX_IBE 6 /* Bus error exception, i-fetch */ -#define EX_DBE 7 /* Bus error exception, data reference */ -#define EX_SYS 8 /* Syscall exception */ -#define EX_BP 9 /* Breakpoint exception */ -#define EX_RI 10 /* Reserved instruction exception */ -#define EX_CPU 11 /* Coprocessor unusable exception */ -#define EX_OV 12 /* Arithmetic overflow exception */ -#define EX_TR 13 /* Trap exception */ -#define EX_VCEI 14 /* Virtual coherency exception instruction */ -#define EX_FPE 15 /* Floating point exception */ -#define EX_WATCH 23 /* Reference to watch/hi/watch/lo address */ -#define EX_VCED 31 /* Virtual coherency exception data */ - -#define EX_U 32 /* Exception from user mode (SW flag) */ - -#if defined(DDB) || defined(DEBUG) -#define EX_SIZE 10 -struct ex_debug { - u_int ex_status; - u_int ex_cause; - u_int ex_badaddr; - u_int ex_pc; - u_int ex_ra; - u_int ex_sp; - u_int ex_code; -} ex_debug[EX_SIZE], *exp = ex_debug; - -#endif -#endif /* !_MIPS_EXCEPTION_H_ */ diff --git a/sys/arch/mips64/include/pio.h b/sys/arch/mips64/include/pio.h deleted file mode 100644 index 2f3677bf1fa..00000000000 --- a/sys/arch/mips64/include/pio.h +++ /dev/null @@ -1,120 +0,0 @@ -/* $OpenBSD: pio.h,v 1.3 2004/08/10 20:28:13 deraadt Exp $ */ - -/* - * Copyright (c) 2001-2003 Opsycon AB (www.opsycon.se / www.opsycon.com) - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS - * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - */ - -#ifndef _MIPS_PIO_H_ -#define _MIPS_PIO_H_ - -/* - * I/O macros. - */ - -#define outb(a,v) (*(volatile unsigned char*)(a) = (v)) -#define out8(a,v) (*(volatile unsigned char*)(a) = (v)) -#define outw(a,v) (*(volatile unsigned short*)(a) = (v)) -#define out16(a,v) outw(a,v) -#define outl(a,v) (*(volatile unsigned int*)(a) = (v)) -#define out32(a,v) outl(a,v) -#define inb(a) (*(volatile unsigned char*)(a)) -#define in8(a) (*(volatile unsigned char*)(a)) -#define inw(a) (*(volatile unsigned short*)(a)) -#define in16(a) inw(a) -#define inl(a) (*(volatile unsigned int*)(a)) -#define in32(a) inl(a) - -#define out8rb(a,v) (*(volatile unsigned char*)(a) = (v)) -#define out16rb(a,v) (__out16rb((volatile u_int16_t *)(a), v)) -#define out32rb(a,v) (__out32rb((volatile u_int32_t *)(a), v)) -#define in8rb(a) (*(volatile unsigned char*)(a)) -#define in16rb(a) (__in16rb((volatile u_int16_t *)(a))) -#define in32rb(a) (__in32rb((volatile u_int32_t *)(a))) - -#define _swap_(x) \ - (((x) >> 24) | ((x) << 24) | \ - (((x) >> 8) & 0xff00) | (((x) & 0xff00) << 8)) - -static __inline void __out32rb(volatile u_int32_t *, u_int32_t); -static __inline void __out16rb(volatile u_int16_t *, u_int16_t); -static __inline u_int32_t __in32rb(volatile u_int32_t *); -static __inline u_int16_t __in16rb(volatile u_int16_t *); - -static __inline void -__out32rb(a,v) - volatile u_int32_t *a; - u_int32_t v; -{ - u_int32_t _v_ = v; - - _v_ = _swap_(_v_); - out32(a, _v_); -} - -static __inline void -__out16rb(a,v) - volatile u_int16_t *a; - u_int16_t v; -{ - u_int16_t _v_; - - _v_ = ((v >> 8) & 0xff) | (v << 8); - out16(a, _v_); -} - -static __inline u_int32_t -__in32rb(a) - volatile u_int32_t *a; -{ - u_int32_t _v_; - - _v_ = in32(a); - _v_ = _swap_(_v_); - return _v_; -} - -static __inline u_int16_t -__in16rb(a) - volatile u_int16_t *a; -{ - u_int16_t _v_; - - _v_ = in16(a); - _v_ = ((_v_ >> 8) & 0xff) | (_v_ << 8); - return _v_; -} - -void insb(u_int8_t *, u_int8_t *,int); -void insw(u_int16_t *, u_int16_t *,int); -void insl(u_int32_t *, u_int32_t *,int); -void outsb(u_int8_t *, const u_int8_t *,int); -void outsw(u_int16_t *, const u_int16_t *,int); -void outsl(u_int32_t *, const u_int32_t *,int); - -/* Helper function to access bus 64 bit at at time in LP32 mode */ -u_int64_t lp32_read8(u_int64_t *); -void lp32_write8(u_int64_t *, u_int64_t); - -#endif /* !_MIPS_PIO_H_ */ diff --git a/sys/arch/mips64/mips64/interrupt.c b/sys/arch/mips64/mips64/interrupt.c index 5f8abe02a6e..336901af8d0 100644 --- a/sys/arch/mips64/mips64/interrupt.c +++ b/sys/arch/mips64/mips64/interrupt.c @@ -1,4 +1,4 @@ -/* $OpenBSD: interrupt.c,v 1.32 2007/10/14 18:52:10 miod Exp $ */ +/* $OpenBSD: interrupt.c,v 1.33 2008/02/20 19:13:38 miod Exp $ */ /* * Copyright (c) 2001-2004 Opsycon AB (www.opsycon.se / www.opsycon.com) @@ -41,7 +41,6 @@ #include <machine/trap.h> #include <machine/psl.h> #include <machine/cpu.h> -#include <machine/pio.h> #include <machine/intr.h> #include <machine/autoconf.h> #include <machine/frame.h> diff --git a/sys/arch/mips64/mips64/lcore_access.S b/sys/arch/mips64/mips64/lcore_access.S index 5606a946978..0d9d17f8d91 100644 --- a/sys/arch/mips64/mips64/lcore_access.S +++ b/sys/arch/mips64/mips64/lcore_access.S @@ -1,4 +1,4 @@ -/* $OpenBSD: lcore_access.S,v 1.11 2008/02/20 18:35:43 miod Exp $ */ +/* $OpenBSD: lcore_access.S,v 1.12 2008/02/20 19:13:38 miod Exp $ */ /* * Copyright (c) 2001-2003 Opsycon AB (www.opsycon.se / www.opsycon.com) @@ -186,119 +186,6 @@ LEAF(mem_zero_page, 0) END(mem_zero_page) /* - * Block I/O routines mainly used by I/O drivers. - * - * Args as: a0 = port - * a1 = memory address - * a2 = count - */ -LEAF(insb, 0) - beq a2, zero, 2f - PTR_ADDU a2, a1 -1: - lbu v0, 0(a0) - PTR_ADDU a1, 1 - bne a1, a2, 1b - sb v0, -1(a1) -2: - jr ra - nop -END(insb) - -LEAF(insw, 0) - beq a2, zero, 2f - PTR_ADDU a2, a2 - PTR_ADDU a2, a1 -1: - lhu v0, 0(a0) - PTR_ADDU a1, 2 - bne a1, a2, 1b - sh v0, -2(a1) -2: - jr ra - nop -END(insw) - -LEAF(insl, 0) - beq a2, zero, 2f - PTR_SLL a2, 2 - PTR_ADDU a2, a1 -1: - lw v0, 0(a0) - PTR_ADDU a1, 4 - bne a1, a2, 1b - sw v0, -4(a1) -2: - jr ra - nop -END(insl) - -LEAF(outsb, 0) - beq a2, zero, 2f - PTR_ADDU a2, a1 -1: - lbu v0, 0(a1) - PTR_ADDU a1, 1 - bne a1, a2, 1b - sb v0, 0(a0) -2: - jr ra - nop -END(outsb) - -LEAF(outsw, 0) - beq a2, zero, 2f - PTR_ADDU a2, a2 - LI v0, 1 - and v0, a1 - bne v0, zero, 3f # arghh, unaligned. - PTR_ADDU a2, a1 -1: - lhu v0, 0(a1) - PTR_ADDU a1, 2 - bne a1, a2, 1b - sh v0, 0(a0) -2: - jr ra - nop -3: - LWHI v0, 0(a1) - LWLO v0, 3(a1) - PTR_ADDU a1, 2 - bne a1, a2, 3b - sh v0, 0(a0) - - jr ra - nop -END(outsw) - -LEAF(outsl, 0) - beq a2, zero, 2f - PTR_SLL a2, 2 - LI v0, 3 - and v0, a1 - bne v0, zero, 3f # arghh, unaligned. - PTR_ADDU a2, a1 -1: - lw v0, 0(a1) - PTR_ADDU a1, 4 - bne a1, a2, 1b - sw v0, 0(a0) -2: - jr ra - nop -3: - LWHI v0, 0(a1) - LWLO v0, 3(a1) - PTR_ADDU a1, 4 - bne a1, a2, 3b - sw v0, 0(a0) - - jr ra - nop -END(outsl) - -/* * Copy a null terminated string from the user address space into * the kernel address space. * diff --git a/sys/arch/mips64/mips64/trap.c b/sys/arch/mips64/mips64/trap.c index 3d057cd8539..9fcbcc8841b 100644 --- a/sys/arch/mips64/mips64/trap.c +++ b/sys/arch/mips64/mips64/trap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: trap.c,v 1.40 2008/02/18 19:47:36 miod Exp $ */ +/* $OpenBSD: trap.c,v 1.41 2008/02/20 19:13:38 miod Exp $ */ /* tracked to 1.23 */ /* @@ -70,7 +70,6 @@ #include <machine/trap.h> #include <machine/psl.h> #include <machine/cpu.h> -#include <machine/pio.h> #include <machine/intr.h> #include <machine/autoconf.h> #include <machine/pmap.h> diff --git a/sys/arch/sgi/include/bus.h b/sys/arch/sgi/include/bus.h index b1ed0bbf8be..1a47d7e57f5 100644 --- a/sys/arch/sgi/include/bus.h +++ b/sys/arch/sgi/include/bus.h @@ -1,4 +1,4 @@ -/* $OpenBSD: bus.h,v 1.7 2007/11/27 14:11:06 jsing Exp $ */ +/* $OpenBSD: bus.h,v 1.8 2008/02/20 19:13:38 miod Exp $ */ /* * Copyright (c) 2003-2004 Opsycon AB Sweden. All rights reserved. @@ -27,8 +27,6 @@ #ifndef _MACHINE_BUS_H_ #define _MACHINE_BUS_H_ -#include <machine/pio.h> - #ifdef __STDC__ #define CAT(a,b) a##b #define CAT3(a,b,c) a##b##c diff --git a/sys/arch/sgi/include/pio.h b/sys/arch/sgi/include/pio.h deleted file mode 100644 index d2da74f73fd..00000000000 --- a/sys/arch/sgi/include/pio.h +++ /dev/null @@ -1,5 +0,0 @@ -/* $OpenBSD: pio.h,v 1.1 2004/08/06 21:12:19 pefo Exp $ */ - -/* Use Mips generic include file */ - -#include <mips64/pio.h> diff --git a/sys/arch/sgi/sgi/machdep.c b/sys/arch/sgi/sgi/machdep.c index d912cdb0726..d01d2925fbe 100644 --- a/sys/arch/sgi/sgi/machdep.c +++ b/sys/arch/sgi/sgi/machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machdep.c,v 1.53 2008/02/20 18:46:20 miod Exp $ */ +/* $OpenBSD: machdep.c,v 1.54 2008/02/20 19:13:38 miod Exp $ */ /* * Copyright (c) 2003-2004 Opsycon AB (www.opsycon.se / www.opsycon.com) @@ -63,7 +63,6 @@ #include <machine/cpu.h> #include <machine/frame.h> -#include <machine/pio.h> #include <machine/psl.h> #include <machine/autoconf.h> #include <machine/memconf.h> |