Add "options FLASHYTHING", which causes IPL changes to trigger screen border

colour changes.  This gives quite a good real-time visual impression of what
the system's doing at reasonable overhead.
This commit is contained in:
bjh21 2001-11-29 22:17:16 +00:00
parent 2c06265fb5
commit de5af1d829
2 changed files with 39 additions and 3 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: irq.c,v 1.23 2001/10/20 22:15:02 bjh21 Exp $ */
/* $NetBSD: irq.c,v 1.24 2001/11/29 22:17:17 bjh21 Exp $ */
/*-
* Copyright (c) 2000, 2001 Ben Harris
@ -33,7 +33,7 @@
#include <sys/param.h>
__RCSID("$NetBSD: irq.c,v 1.23 2001/10/20 22:15:02 bjh21 Exp $");
__RCSID("$NetBSD: irq.c,v 1.24 2001/11/29 22:17:17 bjh21 Exp $");
#include <sys/device.h>
#include <sys/kernel.h> /* for cold */
@ -54,6 +54,7 @@ __RCSID("$NetBSD: irq.c,v 1.23 2001/10/20 22:15:02 bjh21 Exp $");
#include <arch/arm26/iobus/iocvar.h>
#include "opt_ddb.h"
#include "opt_flashything.h"
#include "fiq.h"
#include "ioeb.h"
#include "unixbp.h"
@ -311,6 +312,32 @@ void irq_genmasks()
splx(s);
}
#ifdef FLASHYTHING
#include <machine/memcreg.h>
#include <arch/arm26/vidc/vidcreg.h>
static const int iplcolours[] = {
VIDC_PALETTE_ENTRY( 0, 0, 0, 0), /* Black: IPL_NONE */
VIDC_PALETTE_ENTRY( 0, 0, 15, 0), /* Blue: IPL_SOFTCLOCK */
VIDC_PALETTE_ENTRY( 6, 4, 2, 0), /* Brown: IPL_SOFTNET */
VIDC_PALETTE_ENTRY(15, 0, 0, 0), /* Red: IPL_BIO */
VIDC_PALETTE_ENTRY(15, 9, 1, 0), /* Orange: IPL_NET */
VIDC_PALETTE_ENTRY(15, 15, 0, 0), /* Yellow: IPL_TTY */
VIDC_PALETTE_ENTRY( 0, 15, 0, 0), /* Green: IPL_IMP */
VIDC_PALETTE_ENTRY( 5, 8, 14, 0), /* Light Blue: IPL_AUDIO */
VIDC_PALETTE_ENTRY( 15, 0, 15, 0), /* Magenta: IPL_SERIAL */
VIDC_PALETTE_ENTRY( 0, 15, 15, 0), /* Cyan: IPL_CLOCK */
VIDC_PALETTE_ENTRY( 8, 8, 8, 0), /* Grey: IPL_STATCLOCK */
VIDC_PALETTE_ENTRY( 8, 8, 8, 0), /* Grey: IPL_SCHED */
VIDC_PALETTE_ENTRY(15, 15, 15, 0), /* White: IPL_HIGH */
};
#endif
int schedbreak = 0;
#include <machine/db_machdep.h>
#include <ddb/db_interface.h>
__inline int
hardsplx(int s)
{
@ -319,6 +346,9 @@ hardsplx(int s)
KASSERT(s < IPL_HIGH);
int_off();
#ifdef FLASHYTHING
VIDC_WRITE(VIDC_PALETTE_BCOL | iplcolours[s]);
#endif
was = current_spl;
mask = irqmask[s];
#if NFIQ > 0
@ -342,6 +372,9 @@ splhigh(void)
int was;
int_off();
#ifdef FLASHYTHING
VIDC_WRITE(VIDC_PALETTE_BCOL | iplcolours[IPL_HIGH]);
#endif
was = current_spl;
current_spl = IPL_HIGH;
#ifdef DEBUG

View File

@ -1,4 +1,4 @@
# $NetBSD: files.arm26,v 1.41 2001/11/28 10:21:12 lukem Exp $
# $NetBSD: files.arm26,v 1.42 2001/11/29 22:17:16 bjh21 Exp $
# Copyright (c) 1997, 1998, 2000 Ben Harris
# All rights reserved.
@ -30,6 +30,9 @@
maxpartitions 8
maxusers 2 8 64
# Display current IPL in screen border
defflag FLASHYTHING
include "dev/wscons/files.wscons"
include "dev/rasops/files.rasops"
include "dev/wsfont/files.wsfont"