32-bit fixup.
This commit is contained in:
parent
b871ab5f2c
commit
edc4ed9846
@ -1,4 +1,4 @@
|
||||
# $NetBSD: NONPLUS,v 1.7 1998/08/27 11:43:15 mrg Exp $
|
||||
# $NetBSD: NONPLUS,v 1.8 1998/09/06 21:53:41 eeh Exp $
|
||||
|
||||
include "arch/sparc64/conf/std.sparc64"
|
||||
|
||||
@ -11,6 +11,8 @@ maxusers 64
|
||||
# We currently support three architecture types; at least one is required.
|
||||
options SUN4U # sun4u - Ultra 140 and 170
|
||||
options TRAPWIN # use a new window for traps
|
||||
options __ELF__ # we use elf
|
||||
#options _LP64 # we're using a 64-bit compiler
|
||||
|
||||
## System options specific to the sparc machine type
|
||||
|
||||
@ -124,11 +126,11 @@ options COMPAT_10 # NetBSD 1.0 binary compatibility
|
||||
options COMPAT_11 # NetBSD 1.1 binary compatibility
|
||||
options COMPAT_12 # NetBSD 1.2 binary compatibility
|
||||
options COMPAT_13 # NetBSD 1.3 binary compatibility
|
||||
#options COMPAT_SPARC32 # NetBSD/sparc binary compatibility
|
||||
options COMPAT_SUNOS # SunOS 4.x binary compatibility
|
||||
options COMPAT_SVR4 # SunOS 5.x binary compatibility
|
||||
options EXEC_ELF32 # Exec module for SunOS 5.x binaries.
|
||||
#options EXEC_ELF64 # Exec module for SunOS 5.x binaries.
|
||||
options __ELF__
|
||||
options SYSCALL_DEBUG
|
||||
|
||||
## File systems. You probably need at least one of FFS or NFS.
|
||||
@ -245,7 +247,7 @@ dma* at sbus? slot ? offset ? # SBus
|
||||
esp* at dma? flags 0x0000 # SBus
|
||||
scsibus* at esp?
|
||||
|
||||
fas* at sbus? slot ? offset ? flags 0x0000 # fast/wide NCR derivative
|
||||
#fas* at sbus? slot ? offset ? flags 0x0000 # fast/wide NCR derivative
|
||||
#scsi* at pci? # 53C875 "glm" compatible
|
||||
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: bus.h,v 1.6 1998/09/05 23:57:25 eeh Exp $ */
|
||||
/* $NetBSD: bus.h,v 1.7 1998/09/06 21:53:42 eeh Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc.
|
||||
@ -73,8 +73,6 @@
|
||||
|
||||
#include <machine/types.h>
|
||||
#include <machine/ctlreg.h>
|
||||
/* Need to get defines for ldxa, etc. */
|
||||
#include "asm.h"
|
||||
|
||||
/*
|
||||
* UPA and SBUS spaces are non-cached and big endian
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: param.h,v 1.4 1998/09/02 05:51:38 eeh Exp $ */
|
||||
/* $NetBSD: param.h,v 1.5 1998/09/06 21:53:42 eeh Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1992, 1993
|
||||
@ -71,7 +71,11 @@
|
||||
* (within reasonable limits).
|
||||
*
|
||||
*/
|
||||
#ifdef _LP64
|
||||
#define ALIGNBYTES 0xf
|
||||
#else
|
||||
#define ALIGNBYTES 0x7
|
||||
#endif
|
||||
#define ALIGN(p) (((u_long)(p) + ALIGNBYTES) & ~ALIGNBYTES)
|
||||
#define ALIGNED_POINTER(p,t) ((((u_long)(p)) & (sizeof(t)-1)) == 0)
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: clock.c,v 1.7 1998/09/05 23:57:27 eeh Exp $ */
|
||||
/* $NetBSD: clock.c,v 1.8 1998/09/06 21:53:42 eeh Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1992, 1993
|
||||
@ -323,10 +323,10 @@ timerattach(parent, self, aux)
|
||||
|
||||
/* Install the appropriate interrupt vector here */
|
||||
level10.ih_number = ma->ma_interrupts[0];
|
||||
level10.ih_clr = timerreg_4u.t_clrintr[0];
|
||||
/* level10.ih_clr = (void*)timerreg_4u.t_clrintr[0]; */
|
||||
intr_establish(10, &level10);
|
||||
level14.ih_number = ma->ma_interrupts[1];
|
||||
level14.ih_clr = timerreg_4u.t_clrintr[1];
|
||||
/* level14.ih_clr = (void*)timerreg_4u.t_clrintr[1]; */
|
||||
intr_establish(14, &level14);
|
||||
printf(" irq vectors %lx and %lx\n",
|
||||
(u_long)level10.ih_number,
|
||||
@ -462,6 +462,7 @@ cpu_initclocks()
|
||||
if (intrdebug) {
|
||||
hz = 1;
|
||||
tick = 1000000;
|
||||
printf("intrdebug set: 1Hz clock\n");
|
||||
}
|
||||
#endif
|
||||
profhz = stathz; /* always */
|
||||
@ -527,7 +528,7 @@ clockintr(cap)
|
||||
extern int rom_console_input;
|
||||
#endif
|
||||
|
||||
#if 0
|
||||
#if 1
|
||||
/* Let locore.s clear the interrupt for us. */
|
||||
/*
|
||||
* Protect the clearing of the clock interrupt. If we don't
|
||||
@ -571,7 +572,7 @@ statintr(cap)
|
||||
#ifdef NOT_DEBUG
|
||||
prom_printf("!");
|
||||
#endif
|
||||
#if 0
|
||||
#if 1
|
||||
/* Let locore.s clear the interrupt for us. */
|
||||
/* read the limit register to clear the interrupt */
|
||||
#if 0
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: genassym.c,v 1.4 1998/09/05 23:57:27 eeh Exp $ */
|
||||
/* $NetBSD: genassym.c,v 1.5 1998/09/06 21:53:42 eeh Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1992, 1993
|
||||
@ -65,11 +65,13 @@
|
||||
#include <machine/reg.h>
|
||||
|
||||
#ifdef notyet
|
||||
#include <machine/bus.h>
|
||||
#include <sparc64/dev/zsreg.h>
|
||||
#include <sparc64/dev/zsvar.h>
|
||||
#endif
|
||||
|
||||
#include <dev/ic/am7930reg.h>
|
||||
#include <dev/ic/amd7930var.h>
|
||||
#include <dev/ic/am7930var.h>
|
||||
#endif
|
||||
|
||||
#include <sparc64/dev/fdreg.h>
|
||||
#include <sparc64/dev/fdvar.h>
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: intr.c,v 1.9 1998/09/05 23:57:28 eeh Exp $ */
|
||||
/* $NetBSD: intr.c,v 1.10 1998/09/06 21:53:42 eeh Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1992, 1993
|
||||
@ -113,10 +113,12 @@ strayintr(fp)
|
||||
int timesince;
|
||||
extern int swallow_zsintrs;
|
||||
|
||||
return;
|
||||
|
||||
/* If we're in polled mode ignore spurious interrupts */
|
||||
if ((fp->tf_pil == PIL_SER) /* && swallow_zsintrs */) return;
|
||||
|
||||
printf("stray interrupt ipl %u pc=%lx npc=%lx pstate=%b\n",
|
||||
printf("stray interrupt ipl %u pc=%lx npc=%lx pstate=%lb\n",
|
||||
fp->tf_pil, fp->tf_pc, fp->tf_npc,
|
||||
(unsigned long)(fp->tf_tstate>>TSTATE_PSTATE_SHIFT), PSTATE_BITS);
|
||||
timesince = time.tv_sec - straytime;
|
||||
|
@ -50,7 +50,7 @@
|
||||
*/
|
||||
|
||||
#undef NO_VCACHE
|
||||
#define TRAPTRACE
|
||||
#undef TRAPTRACE
|
||||
#define TRAPSTATS
|
||||
#undef TRAPS_USE_IG
|
||||
#undef LOCKED_PCB
|
||||
@ -7325,7 +7325,7 @@ ENTRY(proc_trampoline)
|
||||
stx %g2, [%sp + CC64FSZ + STKB + TF_PC]
|
||||
stx %g1, [%sp + CC64FSZ + STKB + TF_TSTATE]
|
||||
#ifdef NOTDEF_DEBUG
|
||||
! set panicstack-CC64FSZ, %o0! DEBUG
|
||||
! set panicstack-CC64FSZ-STKB, %o0! DEBUG
|
||||
! save %g0, %o0, %sp ! DEBUG
|
||||
save %sp, -CC64FSZ, %sp
|
||||
set 1f, %o0
|
||||
@ -7345,7 +7345,7 @@ ENTRY(proc_trampoline)
|
||||
LOCTOGLOB
|
||||
ba 2f
|
||||
restore
|
||||
1: .asciz "proc_trampoline: returning to %x, sp=%x, tf=%x\r\n"
|
||||
1: .asciz "proc_trampoline: returning to %p, sp=%p, tf=%p\r\n"
|
||||
3: .asciz "tstate=%p tpc=%p tnpc=%p ctx=%x\r\n"
|
||||
_ALIGN
|
||||
2:
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: machdep.c,v 1.9 1998/09/05 23:57:28 eeh Exp $ */
|
||||
/* $NetBSD: machdep.c,v 1.10 1998/09/06 21:53:43 eeh Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc.
|
||||
@ -467,16 +467,24 @@ allocsys(v)
|
||||
|
||||
/*
|
||||
* Set up registers on exec.
|
||||
*
|
||||
* XXX this entire mess must be fixed
|
||||
* XXX especially for 64-bit exec types.
|
||||
*/
|
||||
|
||||
#ifdef _LP64
|
||||
#define rwindow rwindow64
|
||||
#define STACK_OFFSET BIAS
|
||||
#define CPOUTREG(l,v) copyout(&(v), (l), sizeof(v))
|
||||
#else
|
||||
#define rwindow rwindow32
|
||||
#define STACK_OFFSET 0
|
||||
#define CPOUTREG(l,v) suword((l), (v))
|
||||
#endif
|
||||
|
||||
/* ARGSUSED */
|
||||
void
|
||||
setregs(p, pack, stack)
|
||||
struct proc *p;
|
||||
struct exec_package *pack;
|
||||
u_long stack;
|
||||
vaddr_t stack;
|
||||
{
|
||||
register struct trapframe *tf = p->p_md.md_tf;
|
||||
register struct fpstate *fs;
|
||||
@ -513,19 +521,17 @@ setregs(p, pack, stack)
|
||||
}
|
||||
bzero((caddr_t)tf, sizeof *tf);
|
||||
tf->tf_tstate = tstate;
|
||||
tf->tf_global[1] = (int)PS_STRINGS;
|
||||
tf->tf_global[1] = (vaddr_t)PS_STRINGS;
|
||||
tf->tf_pc = pack->ep_entry & ~3;
|
||||
tf->tf_npc = tf->tf_pc + 4;
|
||||
/* XXXX Needs to support 64-bit frames */
|
||||
stack -= sizeof(struct rwindow32);
|
||||
tf->tf_out[6] = stack;
|
||||
stack -= sizeof(struct rwindow);
|
||||
tf->tf_out[6] = stack - STACK_OFFSET;
|
||||
tf->tf_out[7] = NULL;
|
||||
#ifdef NOTDEF_DEBUG
|
||||
{
|
||||
extern int execdebug;
|
||||
if (execdebug)
|
||||
printf("setregs: setting tf %x sp %x\n", tf, stack);
|
||||
}
|
||||
printf("setregs: setting tf %p sp %p pc %p\n", (long)tf,
|
||||
(long)tf->tf_out[6], (long)tf->tf_pc);
|
||||
Debugger();
|
||||
#endif
|
||||
}
|
||||
|
||||
@ -573,15 +579,6 @@ cpu_sysctl(name, namelen, oldp, oldlenp, newp, newlen, p)
|
||||
/* NOTREACHED */
|
||||
}
|
||||
|
||||
#ifdef _LP64
|
||||
#define rwindow rwindow64
|
||||
#define STACK_OFFSET BIAS
|
||||
#define CPOUTREG(l,v) copyout(&(v), (l), sizeof(v))
|
||||
#else
|
||||
#define rwindow rwindow32
|
||||
#define STACK_OFFSET 0
|
||||
#define CPOUTREG(l,v) suword((l), (v))
|
||||
#endif
|
||||
/*
|
||||
* Send an interrupt to process.
|
||||
*/
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: pmap.c,v 1.11 1998/09/05 23:57:29 eeh Exp $ */
|
||||
/* $NetBSD: pmap.c,v 1.12 1998/09/06 21:53:43 eeh Exp $ */
|
||||
/* #define NO_VCACHE /* Don't forget the locked TLB in dostart */
|
||||
#define HWREF
|
||||
/* #define BOOT_DEBUG */
|
||||
@ -871,7 +871,7 @@ pmap_bootstrap(kernelstart, kernelend, maxctx)
|
||||
atop(mp->start),
|
||||
atop(mp->start+mp->size),
|
||||
atop(mp->start),
|
||||
atop(mp->start+mp->size);
|
||||
atop(mp->start+mp->size));
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: trap.c,v 1.11 1998/09/05 23:57:29 eeh Exp $ */
|
||||
/* $NetBSD: trap.c,v 1.12 1998/09/06 21:53:43 eeh Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1996
|
||||
@ -154,7 +154,7 @@ int rwindow_debug = RW_64|RW_ERR;
|
||||
#define TDB_STOPCALL 0x200
|
||||
#define TDB_STOPCPIO 0x400
|
||||
#define TDB_SYSTOP 0x800
|
||||
int trapdebug = 0|TDB_STOPSIG|TDB_STOPCPIO/*|TDB_FOLLOW*/;
|
||||
int trapdebug = 0/*|TDB_STOPSIG|TDB_STOPCPIO|TDB_ADDFLT|TDB_FOLLOW*/;
|
||||
/* #define __inline */
|
||||
#endif
|
||||
|
||||
@ -1136,7 +1136,7 @@ kfault:
|
||||
(long)p->p_addr->u_pcb.pcb_onfault : 0;
|
||||
if (!onfault) {
|
||||
(void) splhigh();
|
||||
printf("data fault: pc=%lx addr=%x\n",
|
||||
printf("data fault: pc=%lx addr=%lx\n",
|
||||
pc, addr);
|
||||
DEBUGGER(type, tf);
|
||||
panic("kernel fault");
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: vm_machdep.c,v 1.7 1998/09/05 23:57:29 eeh Exp $ */
|
||||
/* $NetBSD: vm_machdep.c,v 1.8 1998/09/06 21:53:43 eeh Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1996
|
||||
@ -202,11 +202,11 @@ vunmapbuf(bp, len)
|
||||
* The offset of the topmost frame in the kernel stack.
|
||||
*/
|
||||
#ifdef _LP64
|
||||
#define TOPFRAMEOFF (USPACE-sizeof(struct trapframe)-sizeof(struct frame64))
|
||||
#define TOPFRAMEOFF (USPACE-sizeof(struct trapframe)-CC64FSZ)
|
||||
#define rwindow rwindow64
|
||||
#define STACK_OFFSET BIAS
|
||||
#else
|
||||
#define TOPFRAMEOFF (USPACE-sizeof(struct trapframe)-sizeof(struct frame32))
|
||||
#define TOPFRAMEOFF (USPACE-sizeof(struct trapframe)-CC64FSZ)
|
||||
#define rwindow rwindow32
|
||||
#define STACK_OFFSET 0
|
||||
#endif
|
||||
@ -357,16 +357,6 @@ cpu_set_kpc(p, pc)
|
||||
rp->rw_local[0] = (long)pc; /* Function to call */
|
||||
rp->rw_local[1] = (long)p; /* and its argument */
|
||||
|
||||
#ifdef NOTDEF_DEBUG
|
||||
/* Let's see if this is ever called */
|
||||
{ int s=splhigh();
|
||||
extern int pmapdebug;
|
||||
pmapdebug = 0;
|
||||
printf("cpu_set_kpc: p=%x pc=%x, sp=%x rsp=%x\n", p, pc, rp, rp->rw_in[6]);
|
||||
splx(s);
|
||||
delay(2000000);
|
||||
}
|
||||
#endif
|
||||
/*
|
||||
* Frob PCB:
|
||||
* - arrange to return to proc_trampoline() from cpu_switch()
|
||||
@ -375,6 +365,16 @@ cpu_set_kpc(p, pc)
|
||||
*/
|
||||
pcb->pcb_pc = (long)proc_trampoline - 8 ;
|
||||
pcb->pcb_sp = (long)rp - STACK_OFFSET;
|
||||
#ifdef NOTDEF_DEBUG
|
||||
/* Let's see if this is ever called */
|
||||
{ int s=splhigh();
|
||||
extern int pmapdebug;
|
||||
pmapdebug = 0;
|
||||
printf("cpu_set_kpc: p=%p pc=%p, sp=%p rsp=%p\n", p, pc, rp, (long)rp->rw_in[6]);
|
||||
splx(s);
|
||||
delay(2000000);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: Locore.c,v 1.5 1998/08/27 06:23:33 eeh Exp $ */
|
||||
/* $NetBSD: Locore.c,v 1.6 1998/09/06 21:53:44 eeh Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (C) 1995, 1996 Wolfgang Solfrank.
|
||||
@ -298,8 +298,9 @@ OF_read(handle, addr, len)
|
||||
args.ihandle = HDL2CELL(handle);
|
||||
args.addr = ADR2CELL(addr);
|
||||
args.len = len;
|
||||
if (openfirmware(&args) == -1)
|
||||
if (openfirmware(&args) == -1) {
|
||||
return -1;
|
||||
}
|
||||
return args.actual;
|
||||
}
|
||||
|
||||
@ -324,12 +325,9 @@ OF_seek(handle, pos)
|
||||
args.handle = HDL2CELL(handle);
|
||||
args.poshi = HDL2CELL(pos >> 32);
|
||||
args.poslo = HDL2CELL(pos);
|
||||
if ((args.poshi<<32)|args.poslo > pos) printf("OF_seek: conversion error\n");
|
||||
if (openfirmware(&args) == -1) {
|
||||
printf("OF_seek: to %lx -- error\n", (long)pos);
|
||||
return -1;
|
||||
}
|
||||
printf("OF_seek: to %lx status %lx\n", (long)pos, (long)args.status);
|
||||
return args.status;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user