summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
Diffstat (limited to 'sys')
-rw-r--r--sys/arch/arc/arc/arctype.h5
-rw-r--r--sys/arch/arc/arc/clock_mc.c6
-rw-r--r--sys/arch/arc/arc/locore.S12
-rw-r--r--sys/arch/arc/arc/machdep.c51
-rw-r--r--sys/arch/arc/arc/trap.c28
-rw-r--r--sys/arch/arc/dev/dma.c38
-rw-r--r--sys/arch/arc/dev/dma.h96
-rw-r--r--sys/arch/arc/dev/if_sn.c14
-rw-r--r--sys/arch/arc/include/asm.h94
-rw-r--r--sys/arch/arc/include/bus.h3
-rw-r--r--sys/arch/arc/include/float.h8
-rw-r--r--sys/arch/arc/include/kbdreg.h31
-rw-r--r--sys/arch/arc/include/pcb.h4
-rw-r--r--sys/arch/arc/include/pio.h4
-rw-r--r--sys/arch/arc/include/proc.h4
-rw-r--r--sys/arch/arc/include/profile.h52
-rw-r--r--sys/arch/arc/include/reloc.h39
-rw-r--r--sys/arch/arc/include/stdarg.h8
-rw-r--r--sys/arch/arc/include/varargs.h8
-rw-r--r--sys/arch/arc/include/vmparam.h17
-rw-r--r--sys/arch/arc/isa/isabus.c4
-rw-r--r--sys/arch/arc/pica/pica.h40
-rw-r--r--sys/arch/arc/pica/picabus.c4
23 files changed, 311 insertions, 259 deletions
diff --git a/sys/arch/arc/arc/arctype.h b/sys/arch/arc/arc/arctype.h
index d309d3e5d48..b8588877637 100644
--- a/sys/arch/arc/arc/arctype.h
+++ b/sys/arch/arc/arc/arctype.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: arctype.h,v 1.1 1996/06/24 09:07:21 pefo Exp $ */
+/* $OpenBSD: arctype.h,v 1.2 1996/07/30 20:24:12 pefo Exp $ */
/*-
* Copyright (c) 1992, 1993
* The Regents of the University of California. All rights reserved.
@@ -36,7 +36,7 @@
* SUCH DAMAGE.
*
* from: @(#)arctype.h 8.1 (Berkeley) 6/10/93
- * $Id: arctype.h,v 1.1 1996/06/24 09:07:21 pefo Exp $
+ * $Id: arctype.h,v 1.2 1996/07/30 20:24:12 pefo Exp $
*/
/*
@@ -44,3 +44,4 @@
*/
#define ACER_PICA_61 0x1 /* Acer Labs Pica 61 */
#define DESKSTATION 0x2 /* Deskstation xxx */
+#define MAGNUM 0x3 /* Mips MAGNUM R4000 */
diff --git a/sys/arch/arc/arc/clock_mc.c b/sys/arch/arc/arc/clock_mc.c
index 88261cac0ed..b3012f35f84 100644
--- a/sys/arch/arc/arc/clock_mc.c
+++ b/sys/arch/arc/arc/clock_mc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: clock_mc.c,v 1.1 1996/06/24 09:07:20 pefo Exp $ */
+/* $OpenBSD: clock_mc.c,v 1.2 1996/07/30 20:24:13 pefo Exp $ */
/* $NetBSD: clock_mc.c,v 1.2 1995/06/28 04:30:30 cgd Exp $ */
/*
@@ -128,9 +128,9 @@ mcclock_init(csc)
struct clock_softc *csc;
{
/* XXX Does not really belong here but for the moment we don't care */
- out32(PICA_SYS_IT_VALUE, 9); /* 10ms - 1 */
+ out32(R4030_SYS_IT_VALUE, 9); /* 10ms - 1 */
/* Enable periodic clock interrupt */
- out32(PICA_SYS_EXT_IMASK, cpu_int_mask);
+ out32(R4030_SYS_EXT_IMASK, cpu_int_mask);
}
/*
diff --git a/sys/arch/arc/arc/locore.S b/sys/arch/arc/arc/locore.S
index 5c3e375c0d1..38f2ee06538 100644
--- a/sys/arch/arc/arc/locore.S
+++ b/sys/arch/arc/arc/locore.S
@@ -1,4 +1,4 @@
-/* $OpenBSD: locore.S,v 1.1 1996/06/24 09:07:20 pefo Exp $ */
+/* $OpenBSD: locore.S,v 1.2 1996/07/30 20:24:15 pefo Exp $ */
/*
* Copyright (c) 1992, 1993
* The Regents of the University of California. All rights reserved.
@@ -50,7 +50,7 @@
* v 1.1 89/07/10 14:27:41 nelson Exp SPRITE (DECWRL)
*
* from: @(#)locore.s 8.5 (Berkeley) 1/4/94
- * $Id: locore.S,v 1.1 1996/06/24 09:07:20 pefo Exp $
+ * $Id: locore.S,v 1.2 1996/07/30 20:24:15 pefo Exp $
*/
/*
@@ -2732,8 +2732,8 @@ LEAF(mdbpeek)
b 2f
lw v0, (a0) # aligned access
1:
- lwr v0, 0(a0) # get next 4 bytes (unaligned)
- lwl v0, 3(a0)
+ LWHI v0, 0(a0) # get next 4 bytes (unaligned)
+ LWLO v0, 3(a0)
2:
j ra # made it w/o errors
sw zero, UADDR+U_PCB_ONFAULT
@@ -2765,8 +2765,8 @@ LEAF(mdbpoke)
b 2f
sw a1, (a0) # aligned access
1:
- swr a1, 0(a0) # store next 4 bytes (unaligned)
- swl a1, 3(a0)
+ SWHI a1, 0(a0) # store next 4 bytes (unaligned)
+ SWLO a1, 3(a0)
and a0, a0, ~3 # align address for cache flush
2:
sw zero, UADDR+U_PCB_ONFAULT
diff --git a/sys/arch/arc/arc/machdep.c b/sys/arch/arc/arc/machdep.c
index 2dc6eefabfc..991f8fdd231 100644
--- a/sys/arch/arc/arc/machdep.c
+++ b/sys/arch/arc/arc/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.3 1996/07/27 11:40:29 deraadt Exp $ */
+/* $OpenBSD: machdep.c,v 1.4 1996/07/30 20:24:17 pefo Exp $ */
/*
* Copyright (c) 1988 University of Utah.
* Copyright (c) 1992, 1993
@@ -38,7 +38,7 @@
* SUCH DAMAGE.
*
* from: @(#)machdep.c 8.3 (Berkeley) 1/12/94
- * $Id: machdep.c,v 1.3 1996/07/27 11:40:29 deraadt Exp $
+ * $Id: machdep.c,v 1.4 1996/07/30 20:24:17 pefo Exp $
*/
/* from: Utah Hdr: machdep.c 1.63 91/04/24 */
@@ -139,6 +139,8 @@ int (*Mach_spltty)() = splhigh;
int (*Mach_splclock)() = splhigh;
int (*Mach_splstatclock)() = splhigh;
+typedef void * (*FUNCPTR)();
+
void vid_print_string(const char *str);
void vid_putchar(dev_t dev, char c);
@@ -172,13 +174,21 @@ mips_init(argc, argv, code)
extern char edata[], end[];
extern char MachTLBMiss[], MachTLBMissEnd[];
extern char MachException[], MachExceptionEnd[];
+ struct sid {
+ char vendor[8];
+ u_char prodid[8];
+ } *sys_id;
-vid_print_string("Starting\n");
/* clear the BSS segment in NetBSD code */
v = (caddr_t)mips_round_page(end);
bzero(edata, v - edata);
/* check what model platform we are running on */
+
+ /* I just hate function pointer pointers.... */
+ sys_id = (struct sid *)((*(FUNCPTR)((*(caddr_t **)0x80001020))[17])());
+
+
cputype = ACER_PICA_61; /* FIXME find systemtype */
/*
@@ -194,6 +204,13 @@ vid_print_string("Starting\n");
isa_io_base = PICA_V_ISA_IO;
isa_mem_base = PICA_V_ISA_MEM;
break;
+
+ case DESKSTATION:
+ break;
+
+ case MAGNUM:
+ break;
+
default:
memcfg = -1;
break;
@@ -268,8 +285,8 @@ vid_print_string("Starting\n");
*/
tlb.tlb_mask = PG_SIZE_256K;
- tlb.tlb_hi = vad_to_vpn(PICA_V_LOCAL_IO_BASE);
- tlb.tlb_lo0 = vad_to_pfn(PICA_P_LOCAL_IO_BASE) | PG_IOPAGE;
+ tlb.tlb_hi = vad_to_vpn(R4030_V_LOCAL_IO_BASE);
+ tlb.tlb_lo0 = vad_to_pfn(R4030_P_LOCAL_IO_BASE) | PG_IOPAGE;
tlb.tlb_lo1 = vad_to_pfn(PICA_P_INT_SOURCE) | PG_IOPAGE;
MachTLBWriteIndexed(1, &tlb);
@@ -367,7 +384,15 @@ vid_print_string("Starting\n");
Mach_spltty = Mach_spl2;
Mach_splstatclock = Mach_spl3;
#endif
- strcpy(cpu_model, "PICA_61");
+ strcpy(cpu_model, "ACER PICA_61");
+ break;
+
+ case DESKSTATION:
+ strcpy(cpu_model, "DESKSTATION");
+ break;
+
+ case MAGNUM:
+ strcpy(cpu_model, "MIPS MAGNUM");
break;
default:
@@ -380,7 +405,7 @@ vid_print_string("Starting\n");
*/
switch (cputype) {
- case ACER_PICA_61: /* ALI PICA 61 */
+ case ACER_PICA_61:
/*
* Size is determined from the memory config register.
* d0-d2 = bank 0 size (sim id)
@@ -398,6 +423,13 @@ vid_print_string("Starting\n");
physmem = btoc(physmem);
break;
+ case MAGNUM:
+ memcfg = in32(R4030_SYS_CONFIG);
+ break;
+
+ case DESKSTATION:
+ break;
+
default:
physmem = btoc((u_int)v - KERNBASE);
cp = (char *)PHYS_TO_UNCACHED(physmem << PGSHIFT);
@@ -626,6 +658,8 @@ cpu_startup()
#endif
}
configure();
+
+ spl0(); /* safe to turn interrupts on now */
}
/*
@@ -1029,9 +1063,8 @@ initcpu()
* during system configuration
*/
out16(PICA_SYS_LB_IE,0x000);
- out32(PICA_SYS_EXT_IMASK, 0x00);
+ out32(R4030_SYS_EXT_IMASK, 0x00);
- spl0(); /* safe to turn interrupts on now */
}
/*
diff --git a/sys/arch/arc/arc/trap.c b/sys/arch/arc/arc/trap.c
index aa58bd7a90c..41c4c009f82 100644
--- a/sys/arch/arc/arc/trap.c
+++ b/sys/arch/arc/arc/trap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: trap.c,v 1.2 1996/07/16 07:46:14 pefo Exp $ */
+/* $OpenBSD: trap.c,v 1.3 1996/07/30 20:24:18 pefo Exp $ */
/*
* Copyright (c) 1988 University of Utah.
* Copyright (c) 1992, 1993
@@ -39,7 +39,7 @@
* from: Utah Hdr: trap.c 1.32 91/04/06
*
* from: @(#)trap.c 8.5 (Berkeley) 1/11/94
- * $Id: trap.c,v 1.2 1996/07/16 07:46:14 pefo Exp $
+ * $Id: trap.c,v 1.3 1996/07/30 20:24:18 pefo Exp $
*/
#include <sys/param.h>
@@ -71,6 +71,7 @@
#include <vm/vm_page.h>
#include <arc/pica/pica.h>
+#include <arc/arc/arctype.h>
#include <sys/cdefs.h>
#include <sys/syslog.h>
@@ -226,6 +227,7 @@ static void arc_errintr();
extern const struct callback *callv;
extern volatile struct chiptime *Mach_clock_addr;
extern u_long intrcnt[];
+extern u_int cputype;
/*
* Handle an exception.
@@ -905,13 +907,17 @@ interrupt(statusReg, causeReg, pc, what, args)
}
}
-
+/*
+ * Set up handler for external interrupt events.
+ * Events are checked in priority order.
+ */
+void
set_intr(mask, int_hand, prio)
int mask;
int (*int_hand)();
int prio;
{
- if(prio > 4)
+ if(prio > 5)
panic("set_intr: to high priority");
if(cpu_int_tab[prio].int_mask != 0)
@@ -924,7 +930,15 @@ set_intr(mask, int_hand, prio)
/*
* Update external interrupt mask but don't enable clock.
*/
- out32(PICA_SYS_EXT_IMASK, cpu_int_mask & (~INT_MASK_4 >> 10));
+ switch(cputype) {
+ case ACER_PICA_61:
+ case MAGNUM:
+ out32(R4030_SYS_EXT_IMASK, cpu_int_mask & (~INT_MASK_4 >> 10));
+ break;
+
+ case DESKSTATION:
+ break;
+ }
}
/*
@@ -1271,7 +1285,7 @@ kdbpeek(addr)
/* forward */
char *fn_name(unsigned addr);
-void stacktrace_subr __P((int, int, int, int, void (*)(const char*, ...)));
+void stacktrace_subr __P((int, int, int, int, int (*)(const char*, ...)));
/*
* Print a stack backtrace.
@@ -1293,7 +1307,7 @@ logstacktrace(a0, a1, a2, a3)
void
stacktrace_subr(a0, a1, a2, a3, printfn)
int a0, a1, a2, a3;
- void (*printfn) __P((const char*, ...));
+ int (*printfn) __P((const char*, ...));
{
unsigned pc, sp, fp, ra, va, subr;
unsigned instr, mask;
diff --git a/sys/arch/arc/dev/dma.c b/sys/arch/arc/dev/dma.c
index 20d068480e5..433655983de 100644
--- a/sys/arch/arc/dev/dma.c
+++ b/sys/arch/arc/dev/dma.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dma.c,v 1.1 1996/06/24 09:07:19 pefo Exp $ */
+/* $OpenBSD: dma.c,v 1.2 1996/07/30 20:24:20 pefo Exp $ */
/*
* Copyright (c) 1992, 1993
* The Regents of the University of California. All rights reserved.
@@ -32,7 +32,7 @@
* SUCH DAMAGE.
*
* from: @(#)rz.c 8.1 (Berkeley) 7/29/93
- * $Id: dma.c,v 1.1 1996/06/24 09:07:19 pefo Exp $
+ * $Id: dma.c,v 1.2 1996/07/30 20:24:20 pefo Exp $
*/
/*
@@ -66,7 +66,7 @@
extern vm_map_t phys_map;
-#define dma_pte_to_pa(x) (((x) - first_dma_pte) * PICA_DMA_PAGE_SIZE)
+#define dma_pte_to_pa(x) (((x) - first_dma_pte) * R4030_DMA_PAGE_SIZE)
dma_pte_t *free_dma_pte; /* Pointer to free dma pte list */
dma_pte_t *first_dma_pte; /* Pointer to first dma pte */
@@ -87,9 +87,9 @@ picaDmaInit()
free_dma_pte->queue.next = NULL;
free_dma_pte->queue.size = PICA_TL_SIZE / sizeof(dma_pte_t);
- out32(PICA_SYS_TL_BASE, UNCACHED_TO_PHYS(map));
- out32(PICA_SYS_TL_LIMIT, PICA_TL_SIZE);
- out32(PICA_SYS_TL_IVALID, 0);
+ out32(R4030_SYS_TL_BASE, UNCACHED_TO_PHYS(map));
+ out32(R4030_SYS_TL_LIMIT, PICA_TL_SIZE);
+ out32(R4030_SYS_TL_IVALID, 0);
}
/*
@@ -190,7 +190,7 @@ picaDmaTLBMap(dma_softc_t *sc)
int nbytes;
va = sc->next_va - sc->dma_va;
- dma_pte = sc->pte_base + (va / PICA_DMA_PAGE_SIZE);
+ dma_pte = sc->pte_base + (va / R4030_DMA_PAGE_SIZE);
nbytes = dma_page_round(sc->next_size + dma_page_offs(va));
va = sc->req_va;
while(nbytes > 0) {
@@ -200,14 +200,14 @@ picaDmaTLBMap(dma_softc_t *sc)
else {
pa = pmap_extract(vm_map_pmap(phys_map), va);
}
- pa &= PICA_DMA_PAGE_NUM;
+ pa &= R4030_DMA_PAGE_NUM;
if(pa == 0)
panic("picaDmaTLBMap: null page frame");
dma_pte->entry.lo_addr = pa;
dma_pte->entry.hi_addr = 0;
dma_pte++;
- va += PICA_DMA_PAGE_SIZE;
- nbytes -= PICA_DMA_PAGE_SIZE;
+ va += R4030_DMA_PAGE_SIZE;
+ nbytes -= R4030_DMA_PAGE_SIZE;
}
}
@@ -236,21 +236,21 @@ picaDmaStart(sc, addr, size, datain)
/* Map up the request viritual dma space */
picaDmaTLBMap(sc);
- out32(PICA_SYS_TL_IVALID, 0); /* Flush dma map cache */
+ out32(R4030_SYS_TL_IVALID, 0); /* Flush dma map cache */
/* Load new transfer parameters */
regs->dma_addr = sc->next_va;
regs->dma_count = sc->next_size;
- regs->dma_mode = sc->mode & PICA_DMA_MODE;
+ regs->dma_mode = sc->mode & R4030_DMA_MODE;
sc->sc_active = 1;
if(datain == DMA_FROM_DEV) {
sc->mode &= ~DMA_DIR_WRITE;
- regs->dma_enab = PICA_DMA_ENAB_RUN | PICA_DMA_ENAB_READ;
+ regs->dma_enab = R4030_DMA_ENAB_RUN | R4030_DMA_ENAB_READ;
}
else {
sc->mode |= DMA_DIR_WRITE;
- regs->dma_enab = PICA_DMA_ENAB_RUN | PICA_DMA_ENAB_WRITE;
+ regs->dma_enab = R4030_DMA_ENAB_RUN | R4030_DMA_ENAB_WRITE;
}
wbflush();
}
@@ -286,7 +286,7 @@ picaDmaFlush(sc, addr, size, datain)
size_t size;
int datain;
{
- out32(PICA_SYS_TL_IVALID, 0); /* Flush dma map cache */
+ out32(R4030_SYS_TL_IVALID, 0); /* Flush dma map cache */
}
/*
@@ -348,9 +348,9 @@ asc_dma_init(dma_softc_t *sc)
sc->intr = (int(*)())picaDmaNull;
sc->end = picaDmaEnd;
- sc->dma_reg = (pDmaReg)PICA_SYS_DMA0_REGS;
+ sc->dma_reg = (pDmaReg)R4030_SYS_DMA0_REGS;
sc->pte_size = 32;
- sc->mode = PICA_DMA_MODE_160NS | PICA_DMA_MODE_16;
+ sc->mode = R4030_DMA_MODE_160NS | R4030_DMA_MODE_16;
picaDmaTLBAlloc(sc);
}
/*
@@ -368,9 +368,9 @@ fdc_dma_init(dma_softc_t *sc)
sc->intr = (int(*)())picaDmaNull;
sc->end = picaDmaEnd;
- sc->dma_reg = (pDmaReg)PICA_SYS_DMA1_REGS;
+ sc->dma_reg = (pDmaReg)R4030_SYS_DMA1_REGS;
sc->pte_size = 32;
- sc->mode = PICA_DMA_MODE_160NS | PICA_DMA_MODE_8;
+ sc->mode = R4030_DMA_MODE_160NS | R4030_DMA_MODE_8;
picaDmaTLBAlloc(sc);
}
/*
diff --git a/sys/arch/arc/dev/dma.h b/sys/arch/arc/dev/dma.h
index 949154ca697..3e6f4446ca2 100644
--- a/sys/arch/arc/dev/dma.h
+++ b/sys/arch/arc/dev/dma.h
@@ -1,7 +1,7 @@
-/* $OpenBSD: dma.h,v 1.1 1996/06/24 09:07:19 pefo Exp $ */
-/*-
- * Copyright (c) 1992, 1993
- * The Regents of the University of California. All rights reserved.
+/* $OpenBSD: dma.h,v 1.2 1996/07/30 20:24:21 pefo Exp $ */
+/*
+ * Copyright (c) 1996 Per Fogelstrom
+ * All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -13,30 +13,24 @@
* documentation and/or other materials provided with the distribution.
* 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``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 REGENTS OR CONTRIBUTORS 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.
+ * This product includes software developed by Per Fogelstrom.
+ * 4. The name of the author may not be used to endorse or promote products
+ * derived from this software without specific prior written permission
*
- * from: @(#)dma.h 8.1 (Berkeley) 6/10/93
- * $Id: dma.h,v 1.1 1996/06/24 09:07:19 pefo Exp $
+ * 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.
*/
/*
- * The PICA system has four dma channels capable of scatter/gather
+ * The R4030 system has four dma channels capable of scatter/gather
* and full memory addressing. The maximum transfer length is 1Mb.
* Dma snopes the L2 cache so no precaution is required. However
* if L1 cache is cached 'write back' the processor is responible
@@ -62,35 +56,35 @@ typedef volatile struct {
int pad4;
} DmaReg, *pDmaReg;
-#define PICA_DMA_MODE_40NS 0x00 /* Device dma timing */
-#define PICA_DMA_MODE_80NS 0x01 /* Device dma timing */
-#define PICA_DMA_MODE_120NS 0x02 /* Device dma timing */
-#define PICA_DMA_MODE_160NS 0x03 /* Device dma timing */
-#define PICA_DMA_MODE_200NS 0x04 /* Device dma timing */
-#define PICA_DMA_MODE_240NS 0x05 /* Device dma timing */
-#define PICA_DMA_MODE_280NS 0x06 /* Device dma timing */
-#define PICA_DMA_MODE_320NS 0x07 /* Device dma timing */
-#define PICA_DMA_MODE_8 0x08 /* Device 8 bit */
-#define PICA_DMA_MODE_16 0x10 /* Device 16 bit */
-#define PICA_DMA_MODE_32 0x18 /* Device 32 bit */
-#define PICA_DMA_MODE_INT 0x20 /* Interrupt when done */
-#define PICA_DMA_MODE_BURST 0x40 /* Burst mode (Rev 2 only) */
-#define PICA_DMA_MODE_FAST 0x80 /* Fast dma cycle (Rev 2 only) */
-#define PICA_DMA_MODE 0xff /* Mode register bits */
+#define R4030_DMA_MODE_40NS 0x00 /* Device dma timing */
+#define R4030_DMA_MODE_80NS 0x01 /* Device dma timing */
+#define R4030_DMA_MODE_120NS 0x02 /* Device dma timing */
+#define R4030_DMA_MODE_160NS 0x03 /* Device dma timing */
+#define R4030_DMA_MODE_200NS 0x04 /* Device dma timing */
+#define R4030_DMA_MODE_240NS 0x05 /* Device dma timing */
+#define R4030_DMA_MODE_280NS 0x06 /* Device dma timing */
+#define R4030_DMA_MODE_320NS 0x07 /* Device dma timing */
+#define R4030_DMA_MODE_8 0x08 /* Device 8 bit */
+#define R4030_DMA_MODE_16 0x10 /* Device 16 bit */
+#define R4030_DMA_MODE_32 0x18 /* Device 32 bit */
+#define R4030_DMA_MODE_INT 0x20 /* Interrupt when done */
+#define R4030_DMA_MODE_BURST 0x40 /* Burst mode (Rev 2 only) */
+#define R4030_DMA_MODE_FAST 0x80 /* Fast dma cycle (Rev 2 only) */
+#define R4030_DMA_MODE 0xff /* Mode register bits */
#define DMA_DIR_WRITE 0x100 /* Software direction status */
#define DMA_DIR_READ 0x000 /* Software direction status */
-#define PICA_DMA_ENAB_RUN 0x01 /* Enable dma */
-#define PICA_DMA_ENAB_READ 0x00 /* Read from device */
-#define PICA_DMA_ENAB_WRITE 0x02 /* Write to device */
-#define PICA_DMA_ENAB_TC_IE 0x100 /* Terminal count int enable */
-#define PICA_DMA_ENAB_ME_IE 0x200 /* Memory error int enable */
-#define PICA_DMA_ENAB_TL_IE 0x400 /* Translation limit int enable */
+#define R4030_DMA_ENAB_RUN 0x01 /* Enable dma */
+#define R4030_DMA_ENAB_READ 0x00 /* Read from device */
+#define R4030_DMA_ENAB_WRITE 0x02 /* Write to device */
+#define R4030_DMA_ENAB_TC_IE 0x100 /* Terminal count int enable */
+#define R4030_DMA_ENAB_ME_IE 0x200 /* Memory error int enable */
+#define R4030_DMA_ENAB_TL_IE 0x400 /* Translation limit int enable */
-#define PICA_DMA_COUNT_MASK 0x00fffff /* Byte count mask */
-#define PICA_DMA_PAGE_NUM 0xffff000 /* Address page number */
-#define PICA_DMA_PAGE_OFFS 0x0000fff /* Address page offset */
-#define PICA_DMA_PAGE_SIZE 0x0001000 /* Address page size */
+#define R4030_DMA_COUNT_MASK 0x00fffff /* Byte count mask */
+#define R4030_DMA_PAGE_NUM 0xffff000 /* Address page number */
+#define R4030_DMA_PAGE_OFFS 0x0000fff /* Address page offset */
+#define R4030_DMA_PAGE_SIZE 0x0001000 /* Address page size */
/*
@@ -140,8 +134,8 @@ typedef struct dma_softc {
#define DMA_TO_DEV 0
#define DMA_FROM_DEV 1
-#define dma_page_offs(x) ((int)(x) & PICA_DMA_PAGE_OFFS)
-#define dma_page_round(x) (((int)(x) + PICA_DMA_PAGE_OFFS) & PICA_DMA_PAGE_NUM)
+#define dma_page_offs(x) ((int)(x) & R4030_DMA_PAGE_OFFS)
+#define dma_page_round(x) (((int)(x) + R4030_DMA_PAGE_OFFS) & R4030_DMA_PAGE_NUM)
#define DMA_RESET(r) ((r->reset)(r))
#define DMA_START(a, b, c, d) ((a->start)(a, b, c, d))
diff --git a/sys/arch/arc/dev/if_sn.c b/sys/arch/arc/dev/if_sn.c
index dfe411a6551..c5148833611 100644
--- a/sys/arch/arc/dev/if_sn.c
+++ b/sys/arch/arc/dev/if_sn.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_sn.c,v 1.1 1996/06/24 09:07:19 pefo Exp $ */
+/* $OpenBSD: if_sn.c,v 1.2 1996/07/30 20:24:22 pefo Exp $ */
/*
* National Semiconductor SONIC Driver
* Copyright (c) 1991 Algorithmics Ltd (http://www.algor.co.uk)
@@ -287,8 +287,8 @@ snattach(parent, self, aux)
sc->dma = &sc->__dma;
sn_dma_init(sc->dma, FRAGMAX * NTDA
- + (NRBA * RBASIZE / PICA_DMA_PAGE_SIZE) + 1
- + (DESC_SIZE * 2 / PICA_DMA_PAGE_SIZE) + 1);
+ + (NRBA * RBASIZE / R4030_DMA_PAGE_SIZE) + 1
+ + (DESC_SIZE * 2 / R4030_DMA_PAGE_SIZE) + 1);
/*
* because the sonic is basicly 16bit device it 'concatenates'
@@ -296,7 +296,7 @@ snattach(parent, self, aux)
* around problems near the end of 64k !!
*/
p = SONICBUF;
- pp = SONICBUF - (FRAGMAX * NTDA * PICA_DMA_PAGE_SIZE);
+ pp = SONICBUF - (FRAGMAX * NTDA * R4030_DMA_PAGE_SIZE);
if ((p ^ (p + TDASIZE)) & 0x10000)
p = (p + 0x10000) & ~0xffff;
@@ -320,7 +320,7 @@ snattach(parent, self, aux)
v_cda = (struct CDA *)(p - pp + sc->dma->dma_va);
p += CDASIZE;
- p += PICA_DMA_PAGE_SIZE - (p & (PICA_DMA_PAGE_SIZE -1));
+ p += R4030_DMA_PAGE_SIZE - (p & (R4030_DMA_PAGE_SIZE -1));
p_rba = (char *)p;
v_rba = (char *)(p - pp + sc->dma->dma_va);
p += NRBA * RBASIZE;
@@ -649,7 +649,7 @@ sonicput(sc, m0)
mtdnext->mtd_mbuf = m0;
txp = mtdnext->mtd_txp;
SWR(txp->config, 0);
- fragoffset = (txp - p_tda) * FRAGMAX * PICA_DMA_PAGE_SIZE;
+ fragoffset = (txp - p_tda) * FRAGMAX * R4030_DMA_PAGE_SIZE;
/*
* Now fill in the fragments. Each fragment maps to it's
@@ -685,7 +685,7 @@ sonicput(sc, m0)
fr++;
va += n;
resid -= n;
- fragoffset += PICA_DMA_PAGE_SIZE;
+ fragoffset += R4030_DMA_PAGE_SIZE;
}
}
/*
diff --git a/sys/arch/arc/include/asm.h b/sys/arch/arc/include/asm.h
index 81cc88408c5..c1c95942cfe 100644
--- a/sys/arch/arc/include/asm.h
+++ b/sys/arch/arc/include/asm.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: asm.h,v 1.2 1996/07/18 17:00:09 pefo Exp $ */
+/* $OpenBSD: asm.h,v 1.3 1996/07/30 20:24:23 pefo Exp $ */
/*
* Copyright (c) 1992, 1993
@@ -49,31 +49,48 @@
#include <machine/regdef.h>
-#define ABICALLS
+#define ABICALLS .abicalls
+
+#if defined(ABICALLS) && !defined(_KERNEL)
+ ABICALLS
+#endif
#define RCSID(x)
#define _C_LABEL(x) x
/*
- * Define how to access unaligned data word
+ * Define how to access unaligned data word (LITTLE Endian mode)
*/
-#define LWLO lwr
-#define LWHI lwl
-#define SWLO swr
-#define SWHI swl
+#define LWLO lwl
+#define LWHI lwr
+#define SWLO swl
+#define SWHI swr
+
+/*
+ * Code for setting gp reg if abicalls are used.
+ */
+#if defined(ABICALLS) && !defined(_KERNEL)
+#define ABISETUP \
+ .set noreorder; \
+ .cpload t9; \
+ .set reorder;
+#else
+#define ABISETUP
+#endif
/*
* Define -pg profile entry code.
*/
#if defined(GPROF) || defined(PROF)
-#define MCOUNT .set noreorder; \
- .set noat; \
- move $1,$31; \
- jal _mcount; \
- subu sp,sp,8; \
- .set reorder; \
- .set at;
+#define MCOUNT \
+ .set noreorder; \
+ .set noat; \
+ move $1,$31; \
+ jal _mcount; \
+ subu sp,sp,8; \
+ .set reorder; \
+ .set at;
#else
#define MCOUNT
#endif
@@ -83,30 +100,29 @@
*
* Declare a leaf routine.
*/
-#define LEAF(x) \
- .globl x; \
- .ent x, 0; \
-x: ; \
- .frame sp, 0, ra; \
+#define LEAF(x) \
+ .globl x; \
+ .ent x, 0; \
+x: ; \
+ .frame sp, 0, ra; \
+ ABISETUP \
MCOUNT
+#define ALEAF(x) \
+ .globl x; \
+x:
+
/*
* NLEAF(x)
*
* Declare a non-profiled leaf routine.
*/
-#define NLEAF(x) \
- .globl x; \
- .ent x, 0; \
-x: ; \
- .frame sp, 0, ra
-
-/*
- * ALEAF -- declare alternate entry to a leaf routine.
- */
-#define ALEAF(x) \
- .globl x; \
-x:
+#define NLEAF(x) \
+ .globl x; \
+ .ent x, 0; \
+x: ; \
+ .frame sp, 0, ra; \
+ ABISETUP
/*
* NON_LEAF(x)
@@ -114,10 +130,11 @@ x:
* Declare a non-leaf routine (a routine that makes other C calls).
*/
#define NON_LEAF(x, fsize, retpc) \
- .globl x; \
- .ent x, 0; \
-x: ; \
+ .globl x; \
+ .ent x, 0; \
+x: ; \
.frame sp, fsize, retpc; \
+ ABISETUP \
MCOUNT
/*
@@ -127,10 +144,11 @@ x: ; \
* (a routine that makes other C calls).
*/
#define NNON_LEAF(x, fsize, retpc) \
- .globl x; \
- .ent x, 0; \
-x: ; \
- .frame sp, fsize, retpc
+ .globl x; \
+ .ent x, 0; \
+x: ; \
+ .frame sp, fsize, retpc \
+ ABISETUP
/*
* END(x)
diff --git a/sys/arch/arc/include/bus.h b/sys/arch/arc/include/bus.h
index 49203479164..c9ab54932a2 100644
--- a/sys/arch/arc/include/bus.h
+++ b/sys/arch/arc/include/bus.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: bus.h,v 1.2 1996/06/24 20:05:36 pefo Exp $ */
+/* $OpenBSD: bus.h,v 1.3 1996/07/30 20:24:24 pefo Exp $ */
/*
* Copyright (c) 1996 Christopher G. Demetriou. All rights reserved.
@@ -119,6 +119,7 @@ struct arc_isa_busmap {
((void)(*(volatile u_int64_t *)((h) + (o)) = (v)))
/* These are extensions to the general NetBSD bus interface. */
+/* XXX Check endianess */
#define bus_to_host_2(t, v) (v)
#define bus_to_host_4(t, v) (v)
#define bus_to_host_8(t, v) (v)
diff --git a/sys/arch/arc/include/float.h b/sys/arch/arc/include/float.h
index db2c3da071f..27f365d9a17 100644
--- a/sys/arch/arc/include/float.h
+++ b/sys/arch/arc/include/float.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: float.h,v 1.1 1996/06/24 09:07:17 pefo Exp $ */
+/* $OpenBSD: float.h,v 1.2 1996/07/30 20:24:25 pefo Exp $ */
/* $NetBSD: float.h,v 1.7 1995/06/20 20:45:50 jtc Exp $ */
/*
@@ -36,8 +36,8 @@
* @(#)float.h 8.1 (Berkeley) 6/10/93
*/
-#ifndef _PMAX_FLOAT_H_
-#define _PMAX_FLOAT_H_
+#ifndef _MIPS_FLOAT_H_
+#define _MIPS_FLOAT_H_
#include <sys/cdefs.h>
@@ -78,4 +78,4 @@ __END_DECLS
#define LDBL_MAX DBL_MAX
#define LDBL_MAX_10_EXP DBL_MAX_10_EXP
-#endif /* _PMAX_FLOAT_H_ */
+#endif /* _MIPS_FLOAT_H_ */
diff --git a/sys/arch/arc/include/kbdreg.h b/sys/arch/arc/include/kbdreg.h
index 36f7c430398..fe61cd72d3c 100644
--- a/sys/arch/arc/include/kbdreg.h
+++ b/sys/arch/arc/include/kbdreg.h
@@ -1,6 +1,35 @@
-/* $OpenBSD: kbdreg.h,v 1.1 1996/06/24 09:07:17 pefo Exp $ */
+/* $OpenBSD: kbdreg.h,v 1.2 1996/07/30 20:24:25 pefo Exp $ */
/*
+ * Copyright (c) 1996 Per Fogelstrom
+ * All rights reserved.
+ *
+ * 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.
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgement:
+ * This product includes software developed by Per Fogelstrom.
+ * 4. The name of the author may not be used to endorse or promote products
+ * derived from this software without specific prior written permission
+ *
+ * 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.
+ */
+/*
* Keyboard definitions
*
*/
diff --git a/sys/arch/arc/include/pcb.h b/sys/arch/arc/include/pcb.h
index 8181602c1ab..871e651335b 100644
--- a/sys/arch/arc/include/pcb.h
+++ b/sys/arch/arc/include/pcb.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: pcb.h,v 1.1 1996/06/24 09:07:17 pefo Exp $ */
+/* $OpenBSD: pcb.h,v 1.2 1996/07/30 20:24:26 pefo Exp $ */
/*
* Copyright (c) 1988 University of Utah.
@@ -42,7 +42,7 @@
*/
/*
- * PICA process control block
+ * ARC process control block
*/
struct pcb
{
diff --git a/sys/arch/arc/include/pio.h b/sys/arch/arc/include/pio.h
index 04db5b11f34..39ddf216ce4 100644
--- a/sys/arch/arc/include/pio.h
+++ b/sys/arch/arc/include/pio.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: pio.h,v 1.1 1996/06/24 09:07:17 pefo Exp $ */
+/* $OpenBSD: pio.h,v 1.2 1996/07/30 20:24:27 pefo Exp $ */
/*
* Copyright (c) 1995 Per Fogelstrom. All rights reserved.
@@ -13,7 +13,7 @@
* documentation and/or other materials provided with the distribution.
* 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgement:
- * This product includes software developed by Charles M. Hannum.
+ * This product includes software developed by Per Fogelstrom.
* 4. The name of the author may not be used to endorse or promote products
* derived from this software without specific prior written permission
*
diff --git a/sys/arch/arc/include/proc.h b/sys/arch/arc/include/proc.h
index b9b2b81c76d..2db639d145b 100644
--- a/sys/arch/arc/include/proc.h
+++ b/sys/arch/arc/include/proc.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: proc.h,v 1.1 1996/06/24 09:07:17 pefo Exp $ */
+/* $OpenBSD: proc.h,v 1.2 1996/07/30 20:24:27 pefo Exp $ */
/* $NetBSD: proc.h,v 1.4 1994/10/26 21:09:52 cgd Exp $ */
/*
@@ -40,7 +40,7 @@
*/
/*
- * Machine-dependent part of the proc structure for DEC Station.
+ * Machine-dependent part of the proc structure.
*/
struct mdproc {
int *md_regs; /* registers on current frame */
diff --git a/sys/arch/arc/include/profile.h b/sys/arch/arc/include/profile.h
index 911da1370f9..b00430cd56c 100644
--- a/sys/arch/arc/include/profile.h
+++ b/sys/arch/arc/include/profile.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: profile.h,v 1.1 1996/06/24 09:07:18 pefo Exp $ */
+/* $OpenBSD: profile.h,v 1.2 1996/07/30 20:24:28 pefo Exp $ */
/*
* Copyright (c) 1992, 1993
@@ -41,36 +41,38 @@
#define _MCOUNT_DECL static void ___mcount
#define MCOUNT \
- __asm(".globl _mcount;" \
- "_mcount:;" \
- ".set noreorder;" \
- ".set noat;" \
- "sw $4,8($29);" \
- "sw $5,12($29);" \
- "sw $6,16($29);" \
- "sw $7,20($29);" \
- "sw $1,0($29);" \
- "sw $31,4($29);" \
- "move $5,$31;" \
- "jal ___mcount;" \
- "move $4,$1;" \
- "lw $4,8($29);" \
- "lw $5,12($29);" \
- "lw $6,16($29);" \
- "lw $7,20($29);" \
- "lw $31,4($29);" \
- "lw $1,0($29);" \
- "addu $29,$29,8;" \
- "j $31;" \
- "move $31,$1;" \
- ".set reorder;" \
+ __asm(".globl _mcount;" \
+ ".type _mcount,@function;" \
+ "_mcount:;" \
+ ".set noreorder;" \
+ ".set noat;" \
+ ".cpload $25;" \
+ "sw $4,8($29);" \
+ "sw $5,12($29);" \
+ "sw $6,16($29);" \
+ "sw $7,20($29);" \
+ "sw $1,0($29);" \
+ "sw $31,4($29);" \
+ "move $5,$31;" \
+ "jal ___mcount;" \
+ "move $4,$1;" \
+ "lw $4,8($29);" \
+ "lw $5,12($29);" \
+ "lw $6,16($29);" \
+ "lw $7,20($29);" \
+ "lw $31,4($29);" \
+ "lw $1,0($29);" \
+ "addu $29,$29,8;" \
+ "j $31;" \
+ "move $31,$1;" \
+ ".set reorder;" \
".set at");
#ifdef _KERNEL
/*
* The following two macros do splhigh and splx respectively.
* They have to be defined this way because these are real
- * functions on the PICA, and we do not want to invoke mcount
+ * functions on the MIPS, and we do not want to invoke mcount
* recursively.
*/
#define MCOUNT_ENTER s = _splhigh()
diff --git a/sys/arch/arc/include/reloc.h b/sys/arch/arc/include/reloc.h
index bba5426b18a..48d74df6751 100644
--- a/sys/arch/arc/include/reloc.h
+++ b/sys/arch/arc/include/reloc.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: reloc.h,v 1.1 1996/06/24 09:07:18 pefo Exp $ */
+/* $OpenBSD: reloc.h,v 1.2 1996/07/30 20:24:28 pefo Exp $ */
/*-
* Copyright (c) 1992, 1993
@@ -36,40 +36,3 @@
* from: Header: reloc.h,v 1.6 92/06/20 09:59:37 torek Exp
*/
-#if 0
-/*
- * MIPS relocation types.
- */
-enum reloc_type {
- MIPS_RELOC_32, /* 32-bit absolute */
- MIPS_RELOC_JMP, /* 26-bit absolute << 2 | high 4 bits of pc */
- MIPS_RELOC_WDISP16, /* 16-bit signed pc-relative << 2 */
- MIPS_RELOC_HI16, /* 16-bit absolute << 16 */
- MIPS_RELOC_HI16_S, /* 16-bit absolute << 16 (+1 if needed) */
- MIPS_RELOC_LO16, /* 16-bit absolute */
-};
-
-/*
- * MIPS relocation info.
- *
- * Symbol-relative relocation is done by:
- * 1. start with the value r_addend,
- * 2. locate the appropriate symbol and if defined, add symbol value,
- * 3. if pc relative, subtract pc,
- * 4. if the reloc_type is MIPS_RELOC_HI16_S and the result bit 15 is set,
- * add 0x00010000,
- * 5. shift down 2 or 16 if necessary.
- * The resulting value is then to be stuffed into the appropriate bits
- * in the object (the low 16, or the low 26 bits).
- */
-struct reloc_info_pica {
- u_long r_address; /* relocation addr (offset in segment) */
- u_int r_index:24, /* segment (r_extern==0) or symbol index */
- r_extern:1, /* if set, r_index is symbol index */
- :2; /* unused */
- enum reloc_type r_type:5; /* relocation type, from above */
- long r_addend; /* value to add to symbol value */
-};
-
-#define relocation_info reloc_info_pica
-#endif
diff --git a/sys/arch/arc/include/stdarg.h b/sys/arch/arc/include/stdarg.h
index f2416324434..ac6cd07e268 100644
--- a/sys/arch/arc/include/stdarg.h
+++ b/sys/arch/arc/include/stdarg.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: stdarg.h,v 1.1 1996/06/24 09:07:18 pefo Exp $ */
+/* $OpenBSD: stdarg.h,v 1.2 1996/07/30 20:24:29 pefo Exp $ */
/* $NetBSD: stdarg.h,v 1.7 1995/03/28 18:19:28 jtc Exp $ */
/*-
@@ -36,8 +36,8 @@
* @(#)stdarg.h 8.1 (Berkeley) 6/10/93
*/
-#ifndef _PMAX_STDARG_H_
-#define _PMAX_STDARG_H_
+#ifndef _MIPS_STDARG_H_
+#define _MIPS_STDARG_H_
#include <machine/ansi.h>
@@ -62,4 +62,4 @@ typedef _BSD_VA_LIST_ va_list;
#define va_end(ap) ((void) 0)
-#endif /* !_PMAX_STDARG_H_ */
+#endif /* !_MIPS_STDARG_H_ */
diff --git a/sys/arch/arc/include/varargs.h b/sys/arch/arc/include/varargs.h
index eca413161e8..e35ce16f8be 100644
--- a/sys/arch/arc/include/varargs.h
+++ b/sys/arch/arc/include/varargs.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: varargs.h,v 1.1 1996/06/24 09:07:18 pefo Exp $ */
+/* $OpenBSD: varargs.h,v 1.2 1996/07/30 20:24:29 pefo Exp $ */
/* $NetBSD: varargs.h,v 1.8 1995/03/28 18:19:30 jtc Exp $ */
/*-
@@ -41,8 +41,8 @@
* @(#)varargs.h 8.2 (Berkeley) 3/22/94
*/
-#ifndef _PMAX_VARARGS_H_
-#define _PMAX_VARARGS_H_
+#ifndef _MIPS_VARARGS_H_
+#define _MIPS_VARARGS_H_
#include <machine/ansi.h>
@@ -66,4 +66,4 @@ typedef _BSD_VA_LIST_ va_list;
#define va_end(ap) ((void) 0)
-#endif /* !_PMAX_VARARGS_H_ */
+#endif /* !_MIPS_VARARGS_H_ */
diff --git a/sys/arch/arc/include/vmparam.h b/sys/arch/arc/include/vmparam.h
index 539b024441d..4615bd8d68e 100644
--- a/sys/arch/arc/include/vmparam.h
+++ b/sys/arch/arc/include/vmparam.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: vmparam.h,v 1.1 1996/06/24 09:07:18 pefo Exp $ */
+/* $OpenBSD: vmparam.h,v 1.2 1996/07/30 20:24:30 pefo Exp $ */
/* $NetBSD: vmparam.h,v 1.5 1994/10/26 21:10:10 cgd Exp $ */
/*
@@ -43,20 +43,14 @@
*/
/*
- * Machine dependent constants for DEC Station 3100.
+ * Machine dependent constants.
*/
/*
* USRTEXT is the start of the user text/data space, while USRSTACK
- * is the top (end) of the user stack. LOWPAGES and HIGHPAGES are
- * the number of pages from the beginning of the P0 region to the
- * beginning of the text and from the beginning of the P1 region to the
- * beginning of the stack respectively.
+ * is the top (end) of the user stack.
*/
-#define USRTEXT 0x00001000
+#define USRTEXT 0x00400000
#define USRSTACK 0x80000000 /* Start of user stack */
-#define BTOPUSRSTACK 0x80000 /* btop(USRSTACK) */
-#define LOWPAGES 0x00001
-#define HIGHPAGES 0
/*
* Virtual memory related constants, all in bytes
@@ -218,9 +212,6 @@
*/
#define LOTSOFMEM 2
-#define mapin(pte, v, pfnum, prot) \
- (*(int *)(pte) = ((pfnum) << PG_SHIFT) | (prot), MachTLBFlushAddr(v))
-
/*
* Mach derived constants
*/
diff --git a/sys/arch/arc/isa/isabus.c b/sys/arch/arc/isa/isabus.c
index 75f69270954..75e5d5cb9d4 100644
--- a/sys/arch/arc/isa/isabus.c
+++ b/sys/arch/arc/isa/isabus.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: isabus.c,v 1.1 1996/06/24 09:07:18 pefo Exp $ */
+/* $OpenBSD: isabus.c,v 1.2 1996/07/30 20:24:30 pefo Exp $ */
/* $NetBSD: isa.c,v 1.33 1995/06/28 04:30:51 cgd Exp $ */
/*-
@@ -393,7 +393,7 @@ isabr_iointr(ca)
int isa_vector;
int o_imen;
- isa_vector = in32(PICA_SYS_ISA_VECTOR) & (ICU_LEN - 1);
+ isa_vector = in32(R4030_SYS_ISA_VECTOR) & (ICU_LEN - 1);
o_imen = imen;
imen |= 1 << (isa_vector & (ICU_LEN - 1));
diff --git a/sys/arch/arc/pica/pica.h b/sys/arch/arc/pica/pica.h
index 454e674f81f..4b5089b6085 100644
--- a/sys/arch/arc/pica/pica.h
+++ b/sys/arch/arc/pica/pica.h
@@ -36,7 +36,7 @@
* SUCH DAMAGE.
*
* from: @(#)pica.h 8.1 (Berkeley) 6/10/93
- * $Id: pica.h,v 1.1 1996/06/24 09:07:18 pefo Exp $
+ * $Id: pica.h,v 1.2 1996/07/30 20:24:31 pefo Exp $
*/
/*
@@ -75,21 +75,27 @@
* I/O map
*/
-#define PICA_P_LOCAL_IO_BASE 0x80000000 /* I/O Base address */
-#define PICA_V_LOCAL_IO_BASE 0xe0000000
-#define PICA_S_LOCAL_IO_BASE 0x00040000 /* Size */
-#define PVLB PICA_V_LOCAL_IO_BASE
-#define PICA_SYS_TL_BASE (PVLB+0x0018) /* DMA transl. table base */
-#define PICA_SYS_TL_LIMIT (PVLB+0x0020) /* DMA transl. table limit */
-#define PICA_SYS_TL_IVALID (PVLB+0x0028) /* DMA transl. cache inval */
-#define PICA_SYS_DMA0_REGS (PVLB+0x0100) /* DMA ch0 base address */
-#define PICA_SYS_DMA1_REGS (PVLB+0x0120) /* DMA ch0 base address */
-#define PICA_SYS_DMA2_REGS (PVLB+0x0140) /* DMA ch0 base address */
-#define PICA_SYS_DMA3_REGS (PVLB+0x0160) /* DMA ch0 base address */
-#define PICA_SYS_IT_VALUE (PVLB+0x0228) /* Interval timer reload */
-#define PICA_SYS_IT_STAT (PVLB+0x0230) /* Interval timer count */
-#define PICA_SYS_ISA_VECTOR (PVLB+0x0238) /* ISA Interrupt vector */
-#define PICA_SYS_EXT_IMASK (PVLB+0x00e8) /* External int enable mask */
+#define R4030_P_LOCAL_IO_BASE 0x80000000 /* I/O Base address */
+#define R4030_V_LOCAL_IO_BASE 0xe0000000
+#define R4030_S_LOCAL_IO_BASE 0x00040000 /* Size */
+#define R4030 R4030_V_LOCAL_IO_BASE
+
+#define R4030_SYS_CONFIG (R4030+0x0000) /* Global config register */
+#define R4030_SYS_TL_BASE (R4030+0x0018) /* DMA transl. table base */
+#define R4030_SYS_TL_LIMIT (R4030+0x0020) /* DMA transl. table limit */
+#define R4030_SYS_TL_IVALID (R4030+0x0028) /* DMA transl. cache inval */
+#define R4030_SYS_DMA0_REGS (R4030+0x0100) /* DMA ch0 base address */
+#define R4030_SYS_DMA1_REGS (R4030+0x0120) /* DMA ch0 base address */
+#define R4030_SYS_DMA2_REGS (R4030+0x0140) /* DMA ch0 base address */
+#define R4030_SYS_DMA3_REGS (R4030+0x0160) /* DMA ch0 base address */
+#define R4030_SYS_DMA_INT_SRC (R4030+0x0200) /* DMA int source status reg */
+#define R4030_SYS_NVRAM_PROT (R4030+0x0220) /* NV ram protect register */
+#define R4030_SYS_IT_VALUE (R4030+0x0228) /* Interval timer reload */
+#define R4030_SYS_IT_STAT (R4030+0x0230) /* Interval timer count */
+#define R4030_SYS_ISA_VECTOR (R4030+0x0238) /* ISA Interrupt vector */
+#define R4030_SYS_EXT_IMASK (R4030+0x00e8) /* External int enable mask */
+
+#define PVLB R4030_V_LOCAL_IO_BASE
#define PICA_SYS_SONIC (PVLB+0x1000) /* SONIC base address */
#define PICA_SYS_SCSI (PVLB+0x2000) /* SCSI base address */
#define PICA_SYS_FLOPPY (PVLB+0x3000) /* Floppy base address */
@@ -110,7 +116,7 @@
#define PICA_S_DRAM_CONF 0x00020000
#define PICA_P_INT_SOURCE 0xf0000000 /* Interrupt src registers */
-#define PICA_V_INT_SOURCE PICA_V_LOCAL_IO_BASE+PICA_S_LOCAL_IO_BASE
+#define PICA_V_INT_SOURCE R4030_V_LOCAL_IO_BASE+R4030_S_LOCAL_IO_BASE
#define PICA_S_INT_SOURCE 0x00001000
#define PVIS PICA_V_INT_SOURCE
#define PICA_SYS_LB_IS (PVIS+0x0000) /* Local bus int source */
diff --git a/sys/arch/arc/pica/picabus.c b/sys/arch/arc/pica/picabus.c
index 590f92b500f..5656c49f7ca 100644
--- a/sys/arch/arc/pica/picabus.c
+++ b/sys/arch/arc/pica/picabus.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: picabus.c,v 1.2 1996/07/16 07:46:18 pefo Exp $ */
+/* $OpenBSD: picabus.c,v 1.3 1996/07/30 20:24:32 pefo Exp $ */
/* $NetBSD: tc.c,v 1.2 1995/03/08 00:39:05 cgd Exp $ */
/*
@@ -310,7 +310,7 @@ pica_clkintr(mask, pc, statusReg, causeReg)
struct clockframe cf;
int temp;
- temp = inw(PICA_SYS_IT_STAT);
+ temp = inw(R4030_SYS_IT_STAT);
cf.pc = pc;
cf.sr = statusReg;
hardclock(&cf);