More ELF changes (a.out still works).
This commit is contained in:
parent
9faf26ffb5
commit
8e9ff5814e
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: loadfile_machdep.h,v 1.1 2000/05/25 20:25:23 matt Exp $ */
|
||||
/* $NetBSD: loadfile_machdep.h,v 1.2 2000/07/19 18:15:01 matt Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1999 The NetBSD Foundation, Inc.
|
||||
|
@ -43,11 +43,11 @@
|
|||
#define BOOT_ELF
|
||||
#define ELFSIZE 32
|
||||
|
||||
#define LOAD_KERNEL (LOAD_ALL & ~LOAD_TEXTA)
|
||||
#define COUNT_KERNEL (COUNT_ALL & ~COUNT_TEXTA)
|
||||
#define LOAD_KERNEL (LOAD_ALL & ~(LOAD_HDR|LOAD_TEXTA))
|
||||
#define COUNT_KERNEL (COUNT_ALL & ~(COUNT_HDR|COUNT_TEXTA))
|
||||
|
||||
#define LOADADDR(a) (((u_long)(a)) + offset)
|
||||
#define ALIGNENTRY(a) ((u_long)(a))
|
||||
#define ALIGNENTRY(a) ((u_long)(a) & ~0xffffff)
|
||||
#define READ(f, b, c) read((f), (void *)LOADADDR(b), (c))
|
||||
#define BCOPY(s, d, c) memcpy((void *)LOADADDR(d), (void *)(s), (c))
|
||||
#define BZERO(d, c) memset((void *)LOADADDR(d), 0, (c))
|
||||
|
@ -57,6 +57,6 @@
|
|||
#define PROGRESS(a) (void) printf a
|
||||
#define ALLOC(a) alloc(a)
|
||||
#define FREE(a, b) free(a, b)
|
||||
#define OKMAGIC(a) ((a) == OMAGIC)
|
||||
#define OKMAGIC(a) ((a) == OMAGIC || (a) == NMAGIC)
|
||||
|
||||
#endif /* !_VAX_LOADFILE_MACHDEP_H_ */
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: pte.h,v 1.15 2000/07/01 06:43:43 matt Exp $ */
|
||||
/* $NetBSD: pte.h,v 1.16 2000/07/19 18:15:01 matt Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1994 Ludd, University of Lule}, Sweden.
|
||||
|
@ -80,15 +80,21 @@ extern pt_entry_t *Sysmap;
|
|||
*/
|
||||
#endif
|
||||
|
||||
#ifdef __ELF__
|
||||
#define VAX_SYSMAP "Sysmap"
|
||||
#else
|
||||
#define VAX_SYSMAP "_Sysmap"
|
||||
#endif
|
||||
|
||||
#ifdef __GNUC__
|
||||
#define kvtopte(va) ({ \
|
||||
struct pte *r; \
|
||||
asm("extzv $9,$21,%1,%0;moval *_Sysmap[%0],%0" : "=r"(r) : "g"(va)); \
|
||||
asm("extzv $9,$21,%1,%0;moval *" VAX_SYSMAP "[%0],%0" : "=r"(r) : "g"(va)); \
|
||||
r; \
|
||||
})
|
||||
#define kvtophys(va) ({ \
|
||||
long r; \
|
||||
asm("extzv $9,$21,%1,%0;ashl $9,*_Sysmap[%0],%0;insv %1,$0,$9,%0" \
|
||||
asm("extzv $9,$21,%1,%0;ashl $9,*" VAX_SYSMAP "[%0],%0;insv %1,$0,$9,%0" \
|
||||
: "=&r"(r) : "g"(va) : "cc"); \
|
||||
r; \
|
||||
})
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: intvec.s,v 1.51 2000/07/17 02:54:04 matt Exp $ */
|
||||
/* $NetBSD: intvec.s,v 1.52 2000/07/19 18:15:02 matt Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1994, 1997 Ludd, University of Lule}, Sweden.
|
||||
|
@ -40,8 +40,8 @@
|
|||
#define SCBENTRY(name) \
|
||||
.text ; \
|
||||
.align 2 ; \
|
||||
.globl name ; \
|
||||
name /**/:
|
||||
.globl __CONCAT(X,name) ; \
|
||||
__CONCAT(X,name):
|
||||
|
||||
#define TRAPCALL(namn, typ) \
|
||||
SCBENTRY(namn) ; \
|
||||
|
@ -68,7 +68,7 @@ SCBENTRY(namn) ; \
|
|||
#define ISTACK 1
|
||||
#define NOVEC .long 0
|
||||
#define INTVEC(label,stack) \
|
||||
.long label+stack;
|
||||
.long __CONCAT(X,label)+stack;
|
||||
|
||||
.text
|
||||
|
||||
|
@ -158,7 +158,7 @@ _C_LABEL(rpb):
|
|||
# _memtest (memtest in C) holds the address to continue execution
|
||||
# at when returning from a intentional test.
|
||||
#
|
||||
mcheck: .globl mcheck
|
||||
SCBENTRY(mcheck)
|
||||
tstl _C_LABEL(cold) # Ar we still in coldstart?
|
||||
bneq L4 # Yes.
|
||||
|
||||
|
@ -208,9 +208,7 @@ L4: addl2 (sp)+,sp # remove info pushed on stack
|
|||
* put in a need for an extra check when the fault is gotten during
|
||||
* PTE reference. Handled in pmap.c.
|
||||
*/
|
||||
.align 2
|
||||
.globl transl_v # 20: Translation violation
|
||||
transl_v:
|
||||
SCBENTRY(transl_v) # 20: Translation violation
|
||||
pushr $0x3f
|
||||
pushl 28(sp)
|
||||
pushl 28(sp)
|
||||
|
@ -221,11 +219,9 @@ transl_v:
|
|||
addl2 $8,sp
|
||||
rei
|
||||
1: popr $0x3f
|
||||
brb access_v
|
||||
brb Xaccess_v
|
||||
|
||||
.align 2
|
||||
.globl access_v # 24: Access cntrl viol fault
|
||||
access_v:
|
||||
SCBENTRY(access_v) # 24: Access cntrl viol fault
|
||||
blbs (sp), ptelen
|
||||
pushl $T_ACCFLT
|
||||
bbc $1,4(sp),1f
|
||||
|
@ -289,7 +285,7 @@ SCBENTRY(softnet)
|
|||
# beql 2f # no, skip looking at them one by one
|
||||
#define DONETISR(bit, fn) \
|
||||
bbcc $bit,_C_LABEL(netisr),1f; \
|
||||
calls $0,__CONCAT(_,fn); \
|
||||
calls $0,_C_LABEL(fn); \
|
||||
1:
|
||||
|
||||
#include <net/netisr_dispatch.h>
|
||||
|
@ -360,7 +356,7 @@ trap: pushr $0xfff
|
|||
pushl ap
|
||||
pushl fp
|
||||
pushl sp
|
||||
calls $1, _arithflt
|
||||
calls $1, _C_LABEL(arithflt)
|
||||
_C_LABEL(sret):
|
||||
movl (sp)+, fp
|
||||
movl (sp)+, ap
|
||||
|
@ -452,9 +448,7 @@ _C_LABEL(emtable):
|
|||
* information.
|
||||
*/
|
||||
|
||||
.align 2
|
||||
.globl emulate
|
||||
emulate:
|
||||
SCBENTRY(emulate)
|
||||
#if VAX630 || VAX650 || VAX410
|
||||
movl r11,32(sp) # save register r11 in unused operand
|
||||
movl r10,36(sp) # save register r10 in unused operand
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: locore.c,v 1.49 2000/07/06 17:36:23 ragge Exp $ */
|
||||
/* $NetBSD: locore.c,v 1.50 2000/07/19 18:15:03 matt Exp $ */
|
||||
/*
|
||||
* Copyright (c) 1994, 1998 Ludd, University of Lule}, Sweden.
|
||||
* All rights reserved.
|
||||
|
@ -53,7 +53,7 @@
|
|||
|
||||
#include "opt_cputype.h"
|
||||
|
||||
void start(struct rpb *);
|
||||
void _start(struct rpb *);
|
||||
void main(void);
|
||||
|
||||
extern paddr_t avail_end;
|
||||
|
@ -89,7 +89,7 @@ extern struct cpu_dep ka680_calls;
|
|||
* management is disabled, and no interrupt system is active.
|
||||
*/
|
||||
void
|
||||
start(struct rpb *prpb)
|
||||
_start(struct rpb *prpb)
|
||||
{
|
||||
extern void *scratch;
|
||||
struct pte *pt;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: subr.s,v 1.50 2000/07/17 02:54:04 matt Exp $ */
|
||||
/* $NetBSD: subr.s,v 1.51 2000/07/19 18:15:03 matt Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1994 Ludd, University of Lule}, Sweden.
|
||||
|
@ -114,7 +114,7 @@ to: movw $0xfff,_C_LABEL(panic) # Save all regs in panic
|
|||
mtpr r0,$PR_PCBB # Save in IPR PCBB
|
||||
addl3 $USPACE,_C_LABEL(proc0paddr),r0 # Get kernel stack top
|
||||
mtpr r0,$PR_KSP # put in IPR KSP
|
||||
movl r0,_Sysmap # SPT start addr after KSP
|
||||
movl r0,_C_LABEL(Sysmap) # SPT start addr after KSP
|
||||
movab IFTRAP(r0),4(r0) # Save trap address in ESP
|
||||
mtpr 4(r0),$PR_ESP # Put it in ESP also
|
||||
|
||||
|
@ -144,7 +144,7 @@ to: movw $0xfff,_C_LABEL(panic) # Save all regs in panic
|
|||
#endif
|
||||
|
||||
1: pushl 4(ap) # Address of old rpb
|
||||
2: calls $1,_C_LABEL(start) # Jump away.
|
||||
2: calls $1,_C_LABEL(_start) # Jump away.
|
||||
/* NOTREACHED */
|
||||
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: udiv.s,v 1.3 2000/07/19 01:01:02 matt Exp $ */
|
||||
/* $NetBSD: udiv.s,v 1.4 2000/07/19 18:15:03 matt Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1991 The Regents of the University of California.
|
||||
|
@ -53,7 +53,7 @@
|
|||
#ifdef __ELF__
|
||||
ENTRY(__udiv, 0)
|
||||
#else
|
||||
ENTRY(udiv, 0)
|
||||
ASENTRY(udiv, 0)
|
||||
#endif
|
||||
movl DIVISOR,r2
|
||||
jlss Leasy # big divisor: settle by comparison
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: urem.s,v 1.3 2000/07/19 01:01:02 matt Exp $ */
|
||||
/* $NetBSD: urem.s,v 1.4 2000/07/19 18:15:03 matt Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1991 The Regents of the University of California.
|
||||
|
@ -51,7 +51,7 @@
|
|||
#ifdef __ELF__
|
||||
ENTRY(__urem, 0)
|
||||
#else
|
||||
ENTRY(urem, 0)
|
||||
ASENTRY(urem, 0)
|
||||
#endif
|
||||
movl 8(ap),r2
|
||||
jlss Leasy # big divisor: settle by comparison
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: asc_vsbus.c,v 1.18 2000/06/18 22:47:19 matt Exp $ */
|
||||
/* $NetBSD: asc_vsbus.c,v 1.19 2000/07/19 18:15:03 matt Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1998 The NetBSD Foundation, Inc.
|
||||
|
@ -40,7 +40,7 @@
|
|||
|
||||
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
|
||||
|
||||
__KERNEL_RCSID(0, "$NetBSD: asc_vsbus.c,v 1.18 2000/06/18 22:47:19 matt Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: asc_vsbus.c,v 1.19 2000/07/19 18:15:03 matt Exp $");
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/param.h>
|
||||
|
@ -396,8 +396,8 @@ asc_vsbus_dma_intr(sc)
|
|||
|
||||
trans = asc->sc_dmasize - resid;
|
||||
if (trans < 0) { /* transferred < 0 ? */
|
||||
printf("asc_vsbus_intr: xfer (%d) > req (%d)\n",
|
||||
trans, asc->sc_dmasize);
|
||||
printf("asc_vsbus_intr: xfer (%d) > req (%lu)\n",
|
||||
trans, (u_long) asc->sc_dmasize);
|
||||
trans = asc->sc_dmasize;
|
||||
}
|
||||
NCR_DMA(("asc_vsbus_intr: tcl=%d, tcm=%d; trans=%d, resid=%d\n",
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: dz_ibus.c,v 1.18 2000/06/05 00:09:20 matt Exp $ */
|
||||
/* $NetBSD: dz_ibus.c,v 1.19 2000/07/19 18:15:04 matt Exp $ */
|
||||
/*
|
||||
* Copyright (c) 1998 Ludd, University of Lule}, Sweden.
|
||||
* All rights reserved.
|
||||
|
@ -51,7 +51,7 @@
|
|||
#include <machine/cpu.h>
|
||||
#include <machine/scb.h>
|
||||
|
||||
#include <machine/../vax/gencons.h>
|
||||
#include <arch/vax/vax/gencons.h>
|
||||
|
||||
#include <dev/qbus/dzreg.h>
|
||||
#include <dev/qbus/dzvar.h>
|
||||
|
|
Loading…
Reference in New Issue