sparc64 port.
ok claudio@ kettenis@
-/* $OpenBSD: z8530kbd.c,v 1.30 2021/10/24 17:05:04 mpi Exp $ */
+/* $OpenBSD: z8530kbd.c,v 1.31 2024/03/29 21:09:04 miod Exp $ */
/* $NetBSD: z8530tty.c,v 1.77 2001/05/30 15:24:24 lukem Exp $ */
/*-
void
zskbd_cnpollc(void *v, int on)
{
- extern int swallow_zsintrs;
-
- if (on)
- swallow_zsintrs++;
- else
- swallow_zsintrs--;
}
void
-/* $OpenBSD: zs.c,v 1.32 2021/10/24 17:05:04 mpi Exp $ */
+/* $OpenBSD: zs.c,v 1.33 2024/03/29 21:09:04 miod Exp $ */
/* $NetBSD: zs.c,v 1.29 2001/05/30 15:24:24 lukem Exp $ */
/*-
/* Console ops */
static int zscngetc(dev_t);
static void zscnputc(dev_t, int);
-static void zscnpollc(dev_t, int);
struct consdev zs_consdev = {
NULL,
NULL,
zscngetc,
zscnputc,
- zscnpollc,
+ nullcnpollc,
NULL,
};
sizeof(struct zsc_softc), zs_match_fhc, zs_attach_fhc
};
-extern int stdinnode;
-extern int fbnode;
-
/* Interrupt handlers. */
static int zshard(void *);
static void zssoft(void *);
struct zs_chanstate *cs;
int s, channel, softpri = PIL_TTY;
- if (zsd == NULL) {
- printf("configuration incomplete\n");
- return;
- }
-
printf(" softpri %d\n", softpri);
/*
zs_putc(zs_conschan_put, c);
}
-int swallow_zsintrs;
-
-static void
-zscnpollc(dev_t dev, int on)
-{
- /*
- * Need to tell zs driver to acknowledge all interrupts or we get
- * annoying spurious interrupt messages. This is because mucking
- * with spl() levels during polling does not prevent interrupts from
- * being generated.
- */
-
- if (on)
- swallow_zsintrs++;
- else
- swallow_zsintrs--;
-}
-
int
zs_console_flags(int promunit, int node, int channel)
{
-/* $OpenBSD: cpu.h,v 1.105 2024/03/29 21:06:14 miod Exp $ */
+/* $OpenBSD: cpu.h,v 1.106 2024/03/29 21:09:04 miod Exp $ */
/* $NetBSD: cpu.h,v 1.28 2001/06/14 22:56:58 thorpej Exp $ */
/*
} while (0)
/*
- * Arguments to hardclock, softclock and gatherstats encapsulate the
- * previous machine state in an opaque clockframe. The ipl is here
- * as well for strayintr (see locore.s:interrupt and intr.c:strayintr).
+ * Arguments to clockintr_dispatch encapsulate the
+ * previous machine state in an opaque clockframe.
*/
struct clockframe {
struct trapframe t;
-/* $OpenBSD: autoconf.c,v 1.145 2023/11/09 14:26:34 kn Exp $ */
+/* $OpenBSD: autoconf.c,v 1.146 2024/03/29 21:09:04 miod Exp $ */
/* $NetBSD: autoconf.c,v 1.51 2001/07/24 19:32:11 eeh Exp $ */
/*
static char *str2hex(char *, long *);
static int mbprint(void *, const char *);
-void sync_crash(void);
int mainbus_match(struct device *, void *, void *);
static void mainbus_attach(struct device *, struct device *, void *);
int get_ncpus(void);
#endif
}
-#if notyet
- /* FIXME FIXME FIXME This is probably *WRONG!!!**/
- OF_set_callback(sync_crash);
-#endif
-
/* block clock interrupts and anything below */
splclock();
/* Enable device interrupts */
dumpconf();
}
-/*
- * Console `sync' command. SunOS just does a `panic: zero' so I guess
- * no one really wants anything fancy...
- */
-void
-sync_crash(void)
-{
-
- panic("PROM sync command");
-}
-
char *
clockfreq(long freq)
{
-/* $OpenBSD: intr.c,v 1.63 2022/10/21 18:55:42 miod Exp $ */
+/* $OpenBSD: intr.c,v 1.64 2024/03/29 21:09:04 miod Exp $ */
/* $NetBSD: intr.c,v 1.39 2001/07/19 23:38:11 eeh Exp $ */
/*
#define INTR_DEVINO 0x8000
-void strayintr(const struct trapframe *, int);
-int softintr(void *);
int intr_handler(struct trapframe *, struct intrhand *);
int intr_list_handler(void *);
void intr_ack(struct intrhand *);
-/*
- * Stray interrupt handler. Clear it if possible.
- * If not, and if we get 10 interrupts in 10 seconds, panic.
- */
-int ignore_stray = 1;
-int straycnt[16];
-
-void
-strayintr(const struct trapframe *fp, int vectored)
-{
- static int straytime, nstray;
- int timesince;
-#if 0
- extern int swallow_zsintrs;
-#endif
-
- if (fp->tf_pil < 16)
- straycnt[(int)fp->tf_pil]++;
-
- if (ignore_stray)
- 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=%llx npc=%llx pstate=%llb "
- "vectored=%d\n", fp->tf_pil, fp->tf_pc, fp->tf_npc,
- fp->tf_tstate >> TSTATE_PSTATE_SHIFT, PSTATE_BITS, vectored);
-
- timesince = gettime() - straytime;
- if (timesince <= 10) {
- if (++nstray > 500)
- panic("crazy interrupts");
- } else {
- straytime = gettime();
- nstray = 1;
- }
-#ifdef DDB
- db_enter();
-#endif
-}
-
int
intr_handler(struct trapframe *tf, struct intrhand *ih)
{
-/* $OpenBSD: locore.s,v 1.205 2024/03/29 21:06:14 miod Exp $ */
+/* $OpenBSD: locore.s,v 1.206 2024/03/29 21:09:04 miod Exp $ */
/* $NetBSD: locore.s,v 1.137 2001/08/13 06:10:10 jdolecek Exp $ */
/*
* intrpending[intlev][i] = NULL;
* if ((*ih->ih_fun)(ih->ih_arg ? ih->ih_arg : &frame))
* return;
- * strayintr(&frame);
* return;
* }
*
* they took care of the interrupt. If a handler claims the interrupt,
* we exit (hardware interrupts are latched in the requestor so we'll
* just take another interrupt in the unlikely event of simultaneous
- * interrupts from two different devices at the same level). If we go
- * through all the registered handlers and no one claims it, we report a
- * stray interrupt. This is more or less done as:
+ * interrupts from two different devices at the same level).
*
* for (ih = intrhand[intlev]; ih; ih = ih->ih_next)
* if ((*ih->ih_fun)(ih->ih_arg ? ih->ih_arg : &frame))
* return;
- * strayintr(&frame);
*
* Inputs:
* %l0 = %tstate
* the contents of the D$. We will execute a flush at the end
* to sync the I$.
*/
- .data
-paginuse:
- .word 0
.text
ENTRY(pmap_zero_phys)
set NBPG, %o2 ! Loop count
-/* $OpenBSD: trap.c,v 1.121 2024/03/29 21:08:11 miod Exp $ */
+/* $OpenBSD: trap.c,v 1.122 2024/03/29 21:09:04 miod Exp $ */
/* $NetBSD: trap.c,v 1.73 2001/08/09 01:03:01 eeh Exp $ */
/*
case T_ALIGN:
case T_LDDF_ALIGN:
case T_STDF_ALIGN:
-#if 0
- {
- int64_t dsfsr, dsfar=0, isfsr;
-
- dsfsr = ldxa(SFSR, ASI_DMMU);
- if (dsfsr & SFSR_FV)
- dsfar = ldxa(SFAR, ASI_DMMU);
- isfsr = ldxa(SFSR, ASI_IMMU);
- }
-#endif
/*
* If we're busy doing copyin/copyout continue
*/