summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2001-03-08 00:03:32 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2001-03-08 00:03:32 +0000
commit087ddc0610713bfc31aeb19debbd8f5525769c92 (patch)
treef6f26c1c708b6cf9760fd1e54bb207f850fa698b /sys
parentaea1fc865c99ac9305a3e480b9515fa515c4c236 (diff)
Some warning hunting.
Diffstat (limited to 'sys')
-rw-r--r--sys/arch/mvme88k/include/asm_macro.h6
-rw-r--r--sys/arch/mvme88k/include/db_machdep.h15
-rw-r--r--sys/arch/mvme88k/include/locore.h303
-rw-r--r--sys/arch/mvme88k/mvme88k/cmmu.c32
-rw-r--r--sys/arch/mvme88k/mvme88k/conf.c5
-rw-r--r--sys/arch/mvme88k/mvme88k/disksubr.c8
-rw-r--r--sys/arch/mvme88k/mvme88k/dkbad.c3
-rw-r--r--sys/arch/mvme88k/mvme88k/locore_c_routines.c10
-rw-r--r--sys/arch/mvme88k/mvme88k/m18x_cmmu.c19
-rw-r--r--sys/arch/mvme88k/mvme88k/pmap_table.c1
-rw-r--r--sys/arch/mvme88k/mvme88k/trap.c14
-rw-r--r--sys/arch/mvme88k/mvme88k/vm_machdep.c6
12 files changed, 75 insertions, 347 deletions
diff --git a/sys/arch/mvme88k/include/asm_macro.h b/sys/arch/mvme88k/include/asm_macro.h
index 1ece66a5ab7..76ea253fdac 100644
--- a/sys/arch/mvme88k/include/asm_macro.h
+++ b/sys/arch/mvme88k/include/asm_macro.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: asm_macro.h,v 1.9 2001/02/01 03:38:17 smurph Exp $ */
+/* $OpenBSD: asm_macro.h,v 1.10 2001/03/08 00:03:22 miod Exp $ */
/*
* Mach Operating System
* Copyright (c) 1993-1991 Carnegie Mellon University
@@ -95,7 +95,7 @@ static __inline__ m88k_psr_type enable_interrupts_return_psr(void)
/*
* flushes the data pipeline.
*/
-static __inline__ void flush_pipeline()
+static __inline__ void flush_pipeline(void)
{
__asm__ __volatile__ ("tcnd ne0, r0, 0");
}
@@ -104,7 +104,7 @@ static __inline__ void flush_pipeline()
/*
* gets the current stack pointer.
*/
-static inline unsigned long stack_pointer()
+static __inline__ unsigned long stack_pointer(void)
{
register unsigned long sp;
__asm__ __volatile__ ("or %0,r0,r31" : "=r" (sp));
diff --git a/sys/arch/mvme88k/include/db_machdep.h b/sys/arch/mvme88k/include/db_machdep.h
index e1025da235b..0efd4ec2018 100644
--- a/sys/arch/mvme88k/include/db_machdep.h
+++ b/sys/arch/mvme88k/include/db_machdep.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: db_machdep.h,v 1.5 1999/02/09 06:36:26 smurph Exp $ */
+/* $OpenBSD: db_machdep.h,v 1.6 2001/03/08 00:03:22 miod Exp $ */
/*
* Mach Operating System
* Copyright (c) 1993-1991 Carnegie Mellon University
@@ -34,7 +34,7 @@
*/
#ifndef _M88K_DB_MACHDEP_H_
-#define _M88K_DB_MACHDEP_H_ 1
+#define _M88K_DB_MACHDEP_H_
#include <sys/types.h>
#include <vm/vm_prot.h>
@@ -53,6 +53,8 @@
#define ENTRY_ASM "tb0 0, r0, 132"
#define DDB_ENTRY_TRAP_NO 132
+void gimmeabreak __P((void));
+
typedef vm_offset_t db_addr_t;
typedef int db_expr_t;
typedef struct m88100_saved_state db_regs_t;
@@ -99,7 +101,14 @@ extern int quiet_db_read_bytes;
/* These versions are not constantly doing SPL */
/*#define cnmaygetc db_getc*/
/*#define cngetc db_getc*/
-#define cnputc db_putc
+/*#define cnputc db_putc*/
+
+unsigned inst_load __P((unsigned));
+unsigned inst_store __P((unsigned));
+boolean_t inst_branch __P((unsigned));
+db_addr_t next_instr_address __P((db_addr_t, unsigned));
+db_addr_t branch_taken __P((u_int, db_addr_t,
+ db_expr_t (*) __P((db_regs_t *, int)), db_regs_t *));
/* breakpoint/watchpoint foo */
#define IS_BREAKPOINT_TRAP(type,code) ((type)==T_KDB_BREAK)
diff --git a/sys/arch/mvme88k/include/locore.h b/sys/arch/mvme88k/include/locore.h
index 61ac8d131f1..68e95ba9b49 100644
--- a/sys/arch/mvme88k/include/locore.h
+++ b/sys/arch/mvme88k/include/locore.h
@@ -1,290 +1,31 @@
-/* $OpenBSD: locore.h,v 1.5 1999/02/09 06:36:26 smurph Exp $ */
-/*
- * Mach Operating System
- * Copyright (c) 1993-1991 Carnegie Mellon University
- * Copyright (c) 1991 OMRON Corporation
- * All Rights Reserved.
- *
- * Permission to use, copy, modify and distribute this software and its
- * documentation is hereby granted, provided that both the copyright
- * notice and this permission notice appear in all copies of the
- * software, derivative works or modified versions, and any portions
- * thereof, and that both notices appear in supporting documentation.
- *
- * CARNEGIE MELLON AND OMRON ALLOW FREE USE OF THIS SOFTWARE IN ITS "AS IS"
- * CONDITION. CARNEGIE MELLON AND OMRON DISCLAIM ANY LIABILITY OF ANY KIND
- * FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
- *
- * Carnegie Mellon requests users of this software to return to
- *
- * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
- * School of Computer Science
- * Carnegie Mellon University
- * Pittsburgh PA 15213-3890
- *
- * any improvements or extensions that they make and grant Carnegie the
- * rights to redistribute these changes.
- */
-/* "locore.h" Omron Corporation
- * This file created by Omron Corporation, 1990.
- * NOTE: Any assembly file that includes this one must define ASSEMBLER first
- */
-
-#ifndef __MACHINE_LOCORE_H__
-#define __MACHINE_LOCORE_H__
-
-
-/*
- **********************************************************************
- SYNTACTICAL AND SEMANTIC DOO-DADS
- **********************************************************************
- */
-/*
- * NEWLINE is defined in 'assmy.s' in the object area to be a double
- * backslash, which 'as' interprets the same as '\n'
- */
-
-/*
- * If this has been included in an assembly file, make sure
- * LOCORE is defined. Always make sure KERNEL is defined.
- */
-#if defined(ASSEMBLER) && !defined(LOCORE)
-# define LOCORE
-#endif
-#if !defined(KERNEL)
-# define KERNEL
-#endif
+/* $OpenBSD: locore.h,v 1.6 2001/03/08 00:03:22 miod Exp $ */
-/* Define EH_DEBUG to be non-zero to compile-in various debugging things */
-#ifndef EH_DEBUG
-#define EH_DEBUG 0
-#endif EH_DEBUG
+#ifndef _MACHINE_LOCORE_H_
+#define _MACHINE_LOCORE_H_
-/* this gives the offsets into various structures of various elements, etc */
-#include "assym.s"
+#include <vm/vm_param.h>
/*
- * LABEL(name)
- * Defines the name to be a label visible to the world.
- *
- * _LABEL(name)
- * Defines one visible only to the file, unless debugging
- * is enabled, in which case it's visible to the world (and
- * hence to debuggers, and such).
+ * C prototypes for various routines defined in locore_*
*/
-#define LABEL(name) name: global name NEWLINE
-
-#if EH_DEBUG
-# define _LABEL(name) name: global name NEWLINE
-#else
-# define _LABEL(name) name: NEWLINE
-#endif
+extern unsigned int do_load_word __P((vm_offset_t address,
+ boolean_t supervisor_mode));
+extern unsigned int do_load_half __P((vm_offset_t address,
+ boolean_t supervisor_mode));
+extern unsigned int do_load_byte __P((vm_offset_t address,
+ boolean_t supervisor_mode));
-/*
- * Useful in some situations.
- * NOTE: If ARG1 or ARG2 are r2 or r3, strange things may happen. Watch out!
- */
-#define CALL(NAME, ARG1, ARG2) \
- subu r31, r31, 32 NEWLINE \
- or r2, r0, ARG1 NEWLINE \
- bsr.n NAME NEWLINE \
- or r3, r0, ARG2 NEWLINE \
- addu r31, r31, 32
-
-/*
- **********************************************************************
- SYMBOLIC CONSTANTS AND VALUES and other important things
- **********************************************************************
- */
-
-/*
- * SR1 - CPU FLAGS REGISTER
- *
- * SR1 contains flags about the current CPU status.
- *
- * The lowest FLAG_CPU_FIELD_WIDTH bits hold the cpu number (currently 0-3).
- *
- *
- * The bit FLAG_IGNORE_DATA_EXCEPTION indicates that any data exceptions
- * should be ignored (well, at least treated in a special way).
- * The bit FLAG_INTERRUPT_EXCEPTION indicates that the current exception
- * is the interrupt exception. Such information can be gotten
- * in other ways, but having it in the flags makes it easy for the
- * exception handler to check quickly.
- * The bit FLAG_ENABLING_FPU indicates that the exception handler is
- * in the process of enabling the FPU (so that an exception can
- * be serviced). This is needed because enabling the FPU can
- * cause other exceptions to happen, and the whole system is
- * in a rather precarious state and so special cautions must
- * be taken.
- */
-#define FLAG_CPU_FIELD_WIDTH 4 /* must be <= 12 */
-
-#define FLAG_IGNORE_DATA_EXCEPTION 5 /* bit number 5 */
-#define FLAG_INTERRUPT_EXCEPTION 6 /* bit number 6 */
-#define FLAG_ENABLING_FPU 7 /* bit number 7 */
-
-
-/* REGister OFFset into the E.F. (exception frame) */
-#define REG_OFF(reg_num) ((reg_num) * 4) /* (num * sizeof(register int)) */
-#define GENREG_OFF(num) (REG_OFF(EF_R0 + (num))) /* GENeral REGister OFFset */
-
-
-#define GENERAL_BREATHING_ROOM /* arbitrarily */ 200
-#define KERNEL_STACK_BREATHING_ROOM \
- (GENERAL_BREATHING_ROOM + SIZEOF_STRUCT_PCB + SIZEOF_STRUCT_UTHREAD)
-
-/*
- * Some registers used during the setting up of the new exception frame.
- * Don't choose r1, r30, or r31 for any of them.
- *
- * Also, if any are 'r2' or 'r3', be careful using with CALL above!
- */
-#define FLAGS r2
-#define TMP r3
-#define TMP2 r10
-#define TMP3 r11
-#define SAVE_TMP2 st r10, r31, GENREG_OFF(10)
-#define SAVE_TMP3 st r11, r31, GENREG_OFF(11)
-#define RESTORE_TMP2 ld r10, r31, GENREG_OFF(10)
-#define RESTORE_TMP3 ld r11, r31, GENREG_OFF(11)
-
-
-/* alternate CPU control register names */
-#define PID cr0
-#define PSR cr1
-#define EPSR cr2
-#define SSBR cr3
-#define SXIP cr4
-#define SNIP cr5
-#define SFIP cr6
-#define VBR cr7
-#define DMT0 cr8
-#define DMD0 cr9
-#define DMA0 cr10
-#define DMT1 cr11
-#define DMD1 cr12
-#define DMA1 cr13
-#define DMT2 cr14
-#define DMD2 cr15
-#define DMA2 cr16
-#define SR0 cr17
-#define SR1 cr18
-#define SR2 cr19
-#define SR3 cr20
-#define FPECR fcr0
-#define FPHS1 fcr1
-#define FPLS1 fcr2
-#define FPHS2 fcr3
-#define FPLS2 fcr4
-#define FPPT fcr5
-#define FPRH fcr6
-#define FPRL fcr7
-#define FPIT fcr8
-#define FPSR fcr62
-#define FPCR fcr63
-
-/*
- * Info about the PSR
- */
-#define PSR_SHADOW_FREEZE_BIT 0
-#define PSR_INTERRUPT_DISABLE_BIT 1
-#define PSR_FPU_DISABLE_BIT 3
-#define PSR_BIG_ENDIAN_MODE 30
-#define PSR_SUPERVISOR_MODE_BIT 31
-
-/*
- * Status bits for an SXIP/SNIP/SFIP address.
- */
-#define RTE_VALID_BIT 1
-#define RTE_ERROR_BIT 0
-
-/*
- * Info about DMT0/DMT1/DMT2
- */
-#define DMT_VALID_BIT 0
-#define DMT_WRITE_BIT 1
-#define DMT_LOCK_BIT 12
-#define DMT_DOUBLE_BIT 13
-#define DMT_DAS_BIT 14
-#define DMT_DREG_OFFSET 7
-#define DMT_DREG_WIDTH 5
-
-/*
- * Bits for eh_debug.
- */
-#define DEBUG_INTERRUPT_BIT 0
-#define DEBUG_DATA_BIT 1
-#define DEBUG_INSTRUCTION_BIT 2
-#define DEBUG_MISALIGN_BIT 3
-#define DEBUG_UNIMP_BIT 4
-#define DEBUG_DIVIDE_BIT 5
-#define DEBUG_OF_BIT 6
-#define DEBUG_FPp_BIT 7
-#define DEBUG_FPi_BIT 8
-#define DEBUG_SYSCALL_BIT 9
-#define DEBUG_MACHSYSCALL_BIT 10
-#define DEBUG_UNIMPLEMENTED_BIT 11
-#define DEBUG_PRIVILEGE_BIT 12
-#define DEBUG_BOUNDS_BIT 13
-#define DEBUG_OVERFLOW_BIT 14
-#define DEBUG_ERROR_BIT 15
-#define DEBUG_SIGSYS_BIT 16
-#define DEBUG_SIGTRAP_BIT 17
-#define DEBUG_BREAK_BIT 18
-#define DEBUG_TRACE_BIT 19
-#define DEBUG_KDB_BIT 20
-#define DEBUG_JKDB_BIT 21
-#define DEBUG_BUGCALL_BIT 22
-
-#define DEBUG_UNKNOWN_BIT 31
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-
-#define YES 1
-#define NO 0
-
-#define SCSI_INTS 0x10
-#define SCSI_SSTS 0x18
-#define SCSI_DREG 0x28
-
-/* change software timer for 8mm device support -- 90/08/21 CEC OKUI */
-#define SCSI_WAIT 0x5000000
-
-/*
- * At various times, there is the need to clear the pipeline (i.e.
- * synchronize). A "tcnd ne0, r0, foo" will do that (because a trap
- * instruction always synchronizes, and this particular instruction
- * will never actually take the trap).
- */
-#define FLUSH_PIPELINE tcnd ne0, r0, 0
-
-/*
- * NOP -- NO-Operation.
- *
- * A do-nothing one clock doesn't-touch-the-scoreboard type of instruction,
- * in case one's needed (sometimes useful for debugging).
- */
-#define NOP or r0, r0, r0
-
-/*
- * These things for vector_init.c and locore.c
- */
-#if defined(ASSEMBLER)
-# define PREDEFINED_BY_ROM 0xffffffff
-# define END_OF_VECTOR_LIST 0xfffffffe
-#else
-# define PREDEFINED_BY_ROM 0xffffffffU
-# define END_OF_VECTOR_LIST 0xfffffffeU
-#endif
-
-/*
- * Define ERROR__XXX_USR if the xxx.usr bug (mask C82N) is present.
- * This implements the workaround.
- */
-#define ERRATA__XXX_USR 1
+extern void do_store_word __P((vm_offset_t address, unsigned int data,
+ boolean_t supervisor_mode));
+extern void do_store_half __P((vm_offset_t address, unsigned int data,
+ boolean_t supervisor_mode));
+extern void do_store_byte __P((vm_offset_t address, unsigned int data,
+ boolean_t supervisor_mode));
-#define USERMODE(x) (!(x & (1 << PSR_SUPERVISOR_MODE_BIT)))
+extern unsigned do_xmem_word __P((vm_offset_t address, unsigned int data,
+ boolean_t supervisor_mode));
+extern unsigned do_xmem_byte __P((vm_offset_t address, unsigned int data,
+ boolean_t supervisor_mode));
-#endif /* __MACHINE_LOCORE_H__ */
+#endif /* _MACHINE_LOCORE_H_ */
diff --git a/sys/arch/mvme88k/mvme88k/cmmu.c b/sys/arch/mvme88k/mvme88k/cmmu.c
index 34cc27390a6..1f62907a58b 100644
--- a/sys/arch/mvme88k/mvme88k/cmmu.c
+++ b/sys/arch/mvme88k/mvme88k/cmmu.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cmmu.c,v 1.7 2001/02/01 03:38:19 smurph Exp $ */
+/* $OpenBSD: cmmu.c,v 1.8 2001/03/08 00:03:30 miod Exp $ */
/*
* Copyright (c) 1998 Steve Murphree, Jr.
* Copyright (c) 1996 Nivas Madhur
@@ -160,7 +160,6 @@ setup_cmmu_config(void)
break;
#endif
}
- return;
}
void
@@ -179,7 +178,6 @@ cmmu_dump_config(void)
break;
#endif
}
- return;
}
#ifdef DDB
@@ -232,7 +230,6 @@ cpu_configuration_print(int master)
#endif
}
CMMU_UNLOCK;
- return;
}
/*
@@ -257,7 +254,6 @@ cmmu_init(void)
break;
#endif /* MVME197 */
}
- return;
}
/*
@@ -281,7 +277,6 @@ cmmu_shutdown_now(void)
#endif /* MVME197 */
}
CMMU_UNLOCK;
- return;
}
#define PARITY_ENABLE
@@ -309,7 +304,6 @@ cmmu_parity_enable(void)
}
#endif /* PARITY_ENABLE */
CMMU_UNLOCK;
- return;
}
/*
@@ -364,7 +358,6 @@ cmmu_remote_set(unsigned cpu, unsigned r, unsigned data, unsigned x)
#endif /* MVME197 */
}
CMMU_UNLOCK;
- return;
}
/*
@@ -437,7 +430,6 @@ cmmu_set_sapr(unsigned ap)
#endif /* MVME197 */
}
CMMU_UNLOCK;
- return;
}
void
@@ -458,13 +450,12 @@ cmmu_remote_set_sapr(unsigned cpu, unsigned ap)
#endif /* MVME197 */
}
CMMU_UNLOCK;
- return;
}
void
cmmu_set_uapr(unsigned ap)
{
- register s = splhigh();
+ register int s = splhigh();
CMMU_LOCK;
switch (cputyp) {
#if defined(MVME187) || defined(MVME188)
@@ -481,7 +472,6 @@ cmmu_set_uapr(unsigned ap)
}
CMMU_UNLOCK;
splx(s);
- return;
}
/*
@@ -514,7 +504,6 @@ cmmu_set_batc_entry(
#endif /* MVME197 */
}
CMMU_UNLOCK;
- return;
}
/*
@@ -542,7 +531,6 @@ cmmu_set_pair_batc_entry(
#endif /* MVME197 */
}
CMMU_UNLOCK;
- return;
}
/**
@@ -571,7 +559,6 @@ cmmu_flush_remote_tlb(unsigned cpu, unsigned kernel, vm_offset_t vaddr, int size
#endif /* MVME197 */
}
CMMU_UNLOCK;
- return;
}
/*
@@ -597,7 +584,7 @@ cmmu_pmap_activate(
batc_template_t i_batc[BATC_MAX],
batc_template_t d_batc[BATC_MAX])
{
- register s = splhigh();
+ register int s = splhigh();
CMMU_LOCK;
switch (cputyp) {
#if defined(MVME187) || defined(MVME188)
@@ -614,7 +601,6 @@ cmmu_pmap_activate(
}
CMMU_UNLOCK;
splx(s);
- return;
}
/**
@@ -651,7 +637,6 @@ cmmu_flush_remote_cache(int cpu, vm_offset_t physaddr, int size)
#endif /* MVME197 */
}
CMMU_UNLOCK;
- return;
}
/*
@@ -685,7 +670,6 @@ cmmu_flush_remote_inst_cache(int cpu, vm_offset_t physaddr, int size)
#endif /* MVME197 */
}
CMMU_UNLOCK;
- return;
}
/*
@@ -717,7 +701,6 @@ cmmu_flush_remote_data_cache(int cpu, vm_offset_t physaddr, int size)
#endif /* MVME197 */
}
CMMU_UNLOCK;
- return;
}
/*
@@ -731,6 +714,7 @@ cmmu_flush_data_cache(vm_offset_t physaddr, int size)
cmmu_flush_remote_data_cache(cpu, physaddr, size);
}
+#if 0
/*
* sync dcache (and icache too)
*/
@@ -752,7 +736,6 @@ cmmu_sync_cache(vm_offset_t physaddr, int size)
#endif /* MVME197 */
}
CMMU_UNLOCK;
- return;
}
static void
@@ -773,7 +756,6 @@ cmmu_sync_inval_cache(vm_offset_t physaddr, int size)
#endif /* MVME197 */
}
CMMU_UNLOCK;
- return;
}
static void
@@ -794,8 +776,8 @@ cmmu_inval_cache(vm_offset_t physaddr, int size)
#endif /* MVME197 */
}
CMMU_UNLOCK;
- return;
}
+#endif
void
dma_cachectl(vm_offset_t va, int size, int op)
@@ -815,7 +797,6 @@ dma_cachectl(vm_offset_t va, int size, int op)
#endif /* MVME197 */
}
CMMU_UNLOCK;
- return;
}
#if DDB
@@ -848,7 +829,6 @@ cmmu_show_translation(
#endif /* MVME197 */
}
CMMU_UNLOCK;
- return;
}
@@ -868,7 +848,6 @@ cmmu_cache_state(unsigned addr, unsigned supervisor_flag)
break;
#endif /* MVME197 */
}
- return;
}
void
@@ -887,6 +866,5 @@ show_cmmu_info(unsigned addr)
break;
#endif /* MVME197 */
}
- return;
}
#endif /* end if DDB */
diff --git a/sys/arch/mvme88k/mvme88k/conf.c b/sys/arch/mvme88k/mvme88k/conf.c
index e3cd1ae12d7..b0bf074a2d5 100644
--- a/sys/arch/mvme88k/mvme88k/conf.c
+++ b/sys/arch/mvme88k/mvme88k/conf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: conf.c,v 1.13 2000/09/26 14:03:54 art Exp $ */
+/* $OpenBSD: conf.c,v 1.14 2001/03/08 00:03:30 miod Exp $ */
/*-
* Copyright (c) 1991 The Regents of the University of California.
@@ -291,6 +291,7 @@ dev_t swapdev = makedev(3, 0);
/*
* Returns true if dev is /dev/mem or /dev/kmem.
*/
+int
iskmemdev(dev)
dev_t dev;
{
@@ -301,6 +302,7 @@ iskmemdev(dev)
/*
* Returns true if dev is /dev/zero.
*/
+int
iszerodev(dev)
dev_t dev;
{
@@ -349,6 +351,7 @@ static int chrtoblktbl[] = {
/*
* Convert a character device number to a block device number.
*/
+int
chrtoblk(dev)
dev_t dev;
{
diff --git a/sys/arch/mvme88k/mvme88k/disksubr.c b/sys/arch/mvme88k/mvme88k/disksubr.c
index 180dca59155..e4cfefa69d8 100644
--- a/sys/arch/mvme88k/mvme88k/disksubr.c
+++ b/sys/arch/mvme88k/mvme88k/disksubr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: disksubr.c,v 1.11 2000/10/18 21:00:38 mickey Exp $ */
+/* $OpenBSD: disksubr.c,v 1.12 2001/03/08 00:03:30 miod Exp $ */
/*
* Copyright (c) 1998 Steve Murphree, Jr.
* Copyright (c) 1995 Dale Rahn.
@@ -251,7 +251,7 @@ setdisklabel(olp, nlp, openmask, clp)
u_long openmask;
struct cpu_disklabel *clp;
{
- register i;
+ register int i;
register struct partition *opp, *npp;
#ifdef DEBUG
@@ -313,6 +313,7 @@ setdisklabel(olp, nlp, openmask, clp)
/*
* Write disk label back to device after modification.
*/
+int
writedisklabel(dev, strat, lp, clp)
dev_t dev;
void (*strat)();
@@ -339,7 +340,7 @@ writedisklabel(dev, strat, lp, clp)
bp->b_cylin = 0; /* contained in block 0 */
(*strat)(bp);
- if (error = biowait(bp)) {
+ if ((error = biowait(bp)) != 0 ) {
/* nothing */
} else {
bcopy(bp->b_data, clp, sizeof(struct cpu_disklabel));
@@ -584,7 +585,6 @@ cputobsdlabel(lp, clp)
int i;
if (clp->version == 0) {
- struct cpu_disklabel_old *clpo = (void *) clp;
#ifdef DEBUG
if (disksubr_debug > 0) {
printf("Reading old disklabel\n");
diff --git a/sys/arch/mvme88k/mvme88k/dkbad.c b/sys/arch/mvme88k/mvme88k/dkbad.c
index cc3a62d7697..69b357fd8f3 100644
--- a/sys/arch/mvme88k/mvme88k/dkbad.c
+++ b/sys/arch/mvme88k/mvme88k/dkbad.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dkbad.c,v 1.3 1999/07/20 03:23:06 csapuntz Exp $ */
+/* $OpenBSD: dkbad.c,v 1.4 2001/03/08 00:03:30 miod Exp $ */
/*
* Copyright (c) 1982, 1986, 1990, 1993
@@ -46,6 +46,7 @@
* Return -1 if not found.
*/
+int
isbad(bt, cyl, trk, sec)
register struct dkbad *bt;
int cyl, trk, sec;
diff --git a/sys/arch/mvme88k/mvme88k/locore_c_routines.c b/sys/arch/mvme88k/mvme88k/locore_c_routines.c
index 069d4aee24a..97fe6dd0d81 100644
--- a/sys/arch/mvme88k/mvme88k/locore_c_routines.c
+++ b/sys/arch/mvme88k/mvme88k/locore_c_routines.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: locore_c_routines.c,v 1.8 2001/02/01 03:38:20 smurph Exp $ */
+/* $OpenBSD: locore_c_routines.c,v 1.9 2001/03/08 00:03:31 miod Exp $ */
/*
* Mach Operating System
* Copyright (c) 1993-1991 Carnegie Mellon University
@@ -30,12 +30,17 @@
*****************************************************************RCS**/
/* This file created by Omron Corporation, 1990. */
+#include <sys/types.h>
+#include <sys/systm.h>
+
+#include <machine/param.h>
#include <machine/cpu_number.h> /* cpu_number() */
#include <machine/board.h> /* m188 bit defines */
#include <machine/m88100.h> /* DMT_VALID */
#include <assym.s> /* EF_NREGS, etc. */
#include <machine/asm.h> /* END_OF_VECTOR_LIST, etc. */
#include <machine/asm_macro.h> /* enable/disable interrupts */
+#include <machine/locore.h>
#ifdef DDB
#include <ddb/db_output.h> /* db_printf() */
#endif /* DDB */
@@ -96,7 +101,6 @@ dae_print(unsigned *eframe)
register int x;
register struct dmt_reg *dmtx;
register unsigned dmax, dmdx;
- register unsigned v, reg;
static char *bytes[] =
{
"____", "___x", "__x_", "__xx",
@@ -419,7 +423,6 @@ unsigned curlevel;
void
setlevel(int level)
{
- m88k_psr_type psr;
register unsigned int mask;
register int cpu = cpu_number();
if (level > 7) {
@@ -447,7 +450,6 @@ setlevel(int level)
void
db_setlevel(int level)
{
- m88k_psr_type psr;
register unsigned int mask;
register int cpu = cpu_number();
diff --git a/sys/arch/mvme88k/mvme88k/m18x_cmmu.c b/sys/arch/mvme88k/mvme88k/m18x_cmmu.c
index 5087e44680f..e80a1805903 100644
--- a/sys/arch/mvme88k/mvme88k/m18x_cmmu.c
+++ b/sys/arch/mvme88k/mvme88k/m18x_cmmu.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: m18x_cmmu.c,v 1.5 2001/02/01 03:38:20 smurph Exp $ */
+/* $OpenBSD: m18x_cmmu.c,v 1.6 2001/03/08 00:03:31 miod Exp $ */
/*
* Copyright (c) 1998 Steve Murphree, Jr.
* Copyright (c) 1996 Nivas Madhur
@@ -711,6 +711,7 @@ m18x_cmmu_get_by_mode(int cpu, int mode)
printf("can't figure out first %s CMMU for CPU %d\n",
(mode == DATA_CMMU) ? "data" : "instruction", cpu);
panic("m18x_cmmu_get_by_mode");
+ /* NOTREACHED */
}
#endif
@@ -1187,7 +1188,7 @@ m18x_cmmu_set_pair_batc_entry(unsigned cpu,
void
m18x_cmmu_flush_remote_tlb(unsigned cpu, unsigned kernel, vm_offset_t vaddr, int size)
{
- register s = splhigh();
+ register int s = splhigh();
if (cpu > max_cpus) {
cpu = cpu_number();
@@ -1303,7 +1304,7 @@ m18x_cmmu_pmap_activate(unsigned cpu,
void
m18x_cmmu_flush_remote_cache(int cpu, vm_offset_t physaddr, int size)
{
- register s = splhigh();
+ register int s = splhigh();
#if !defined(BROKEN_MMU_MASK)
@@ -1383,7 +1384,7 @@ m18x_cmmu_flush_cache(vm_offset_t physaddr, int size)
void
m18x_cmmu_flush_remote_inst_cache(int cpu, vm_offset_t physaddr, int size)
{
- register s = splhigh();
+ register int s = splhigh();
@@ -1454,7 +1455,7 @@ m18x_cmmu_flush_inst_cache(vm_offset_t physaddr, int size)
void
m18x_cmmu_flush_remote_data_cache(int cpu, vm_offset_t physaddr, int size)
{
- register s = splhigh();
+ register int s = splhigh();
#if !defined(BROKEN_MMU_MASK)
if (size < 0 || size > NBSG ) {
@@ -1520,7 +1521,7 @@ m18x_cmmu_flush_data_cache(vm_offset_t physaddr, int size)
void
m18x_cmmu_sync_cache(vm_offset_t physaddr, int size)
{
- register s = splhigh();
+ register int s = splhigh();
int cpu;
cpu = cpu_number();
@@ -1602,7 +1603,7 @@ m18x_cmmu_sync_cache(vm_offset_t physaddr, int size)
void
m18x_cmmu_sync_inval_cache(vm_offset_t physaddr, int size)
{
- register s = splhigh();
+ register int s = splhigh();
int cpu;
cpu = cpu_number();
@@ -1685,7 +1686,7 @@ m18x_cmmu_sync_inval_cache(vm_offset_t physaddr, int size)
void
m18x_cmmu_inval_cache(vm_offset_t physaddr, int size)
{
- register s = splhigh();
+ register int s = splhigh();
int cpu;
cpu = cpu_number();
@@ -1768,9 +1769,9 @@ m18x_cmmu_inval_cache(vm_offset_t physaddr, int size)
void
m18x_dma_cachectl(vm_offset_t va, int size, int op)
{
+#if !defined(BROKEN_MMU_MASK)
int count;
-#if !defined(BROKEN_MMU_MASK)
while (size) {
count = NBPG - ((int)va & PGOFSET);
diff --git a/sys/arch/mvme88k/mvme88k/pmap_table.c b/sys/arch/mvme88k/mvme88k/pmap_table.c
index 41fe155a734..a85c66624ab 100644
--- a/sys/arch/mvme88k/mvme88k/pmap_table.c
+++ b/sys/arch/mvme88k/mvme88k/pmap_table.c
@@ -73,7 +73,6 @@ pmap_table_t
pmap_table_build(endoftext)
unsigned endoftext;
{
- extern int kernelstart;
unsigned int i;
pmap_table_t bt, pbt;
diff --git a/sys/arch/mvme88k/mvme88k/trap.c b/sys/arch/mvme88k/mvme88k/trap.c
index a31eaa0b3be..39e7b4ebee0 100644
--- a/sys/arch/mvme88k/mvme88k/trap.c
+++ b/sys/arch/mvme88k/mvme88k/trap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: trap.c,v 1.12 2001/02/01 03:38:22 smurph Exp $ */
+/* $OpenBSD: trap.c,v 1.13 2001/03/08 00:03:31 miod Exp $ */
/*
* Copyright (c) 1998 Steve Murphree, Jr.
* Copyright (c) 1996 Nivas Madhur
@@ -124,7 +124,6 @@ char *pbus_exception_type[] = {
"Write Violation",
};
-extern ret_addr;
#define NSIR 8
void (*sir_routines[NSIR])();
void *sir_args[NSIR];
@@ -211,7 +210,6 @@ trap(unsigned type, struct m88100_saved_state *frame)
unsigned nss, fault_addr;
struct vmspace *vm;
union sigval sv;
- int su = 0;
int result;
int sig = 0;
unsigned pc = PC_REGS(frame); /* get program counter (sxip) */
@@ -1285,12 +1283,13 @@ error_reset(struct m88100_saved_state *frame)
bugreturn(); /* This gets us to Bug instead of a loop forever */
}
+void
syscall(register_t code, struct m88100_saved_state *tf)
{
register int i, nsys, *ap, nap;
register struct sysent *callp;
register struct proc *p;
- int error, new;
+ int error;
struct args {
int i[8];
} args;
@@ -1445,12 +1444,13 @@ syscall(register_t code, struct m88100_saved_state *tf)
}
/* Instruction pointers opperate differently on mc88110 */
+void
m197_syscall(register_t code, struct m88100_saved_state *tf)
{
register int i, nsys, *ap, nap;
register struct sysent *callp;
register struct proc *p;
- int error, new;
+ int error;
struct args {
int i[8];
} args;
@@ -1826,15 +1826,11 @@ int
cpu_singlestep(p)
register struct proc *p;
{
- register unsigned va;
struct trapframe *sstf = USER_REGS(p); /*p->p_md.md_tf;*/
unsigned pc, brpc;
int i;
int bpinstr = SSBREAKPOINT;
unsigned curinstr;
- unsigned inst;
- struct uio uio;
- struct iovec iov;
pc = PC_REGS(sstf);
/*
diff --git a/sys/arch/mvme88k/mvme88k/vm_machdep.c b/sys/arch/mvme88k/mvme88k/vm_machdep.c
index f398c86d117..c9fb725a41d 100644
--- a/sys/arch/mvme88k/mvme88k/vm_machdep.c
+++ b/sys/arch/mvme88k/mvme88k/vm_machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vm_machdep.c,v 1.17 2001/01/13 05:19:00 smurph Exp $ */
+/* $OpenBSD: vm_machdep.c,v 1.18 2001/03/08 00:03:31 miod Exp $ */
/*
* Copyright (c) 1998 Steve Murphree, Jr.
@@ -84,7 +84,6 @@ void
cpu_fork(struct proc *p1, struct proc *p2, void *stack, size_t stacksize)
{
struct switchframe *p2sf;
- int off, ssz;
int cpu;
struct ksigframe {
void (*func)(struct proc *);
@@ -320,7 +319,7 @@ vm_offset_t
iomap_mapin(vm_offset_t pa, vm_size_t len, boolean_t canwait)
{
vm_offset_t iova, tva, off, ppa;
- register int npf, s;
+ register int s;
if (len == 0)
return NULL;
@@ -412,7 +411,6 @@ unmapiodev(kva, size)
void *kva;
int size;
{
- int ix;
vm_offset_t va;
va = (vm_offset_t)kva;
iomap_mapout(va, size);