Added a couple of miscellaneous spl functions e.g. dumping spl
masks.
This commit is contained in:
parent
6efb550cb2
commit
85d00ef7b5
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: stubs.c,v 1.3 1996/02/22 22:48:05 mark Exp $ */
|
||||
/* $NetBSD: stubs.c,v 1.4 1996/03/08 18:41:52 mark Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1994,1995 Mark Brinicombe.
|
||||
|
@ -41,9 +41,6 @@
|
|||
* Routines that are temporary or do not have a home yet.
|
||||
*
|
||||
* Created : 17/09/94
|
||||
* Last updated : 20/01/96
|
||||
*
|
||||
* $Id: stubs.c,v 1.3 1996/02/22 22:48:05 mark Exp $
|
||||
*/
|
||||
|
||||
#include <sys/param.h>
|
||||
|
@ -68,6 +65,7 @@
|
|||
#include <machine/vidc.h>
|
||||
#include <machine/bootconfig.h>
|
||||
#include <machine/katelib.h>
|
||||
#include <machine/psl.h>
|
||||
|
||||
#include "fdc.h"
|
||||
#include "rd.h"
|
||||
|
@ -81,7 +79,6 @@ int (*mountroot)() = do_mountroot;
|
|||
|
||||
extern u_int soft_interrupts;
|
||||
|
||||
extern int boothowto;
|
||||
extern int msgbufmapped;
|
||||
extern dev_t rootdev;
|
||||
extern dev_t dumpdev;
|
||||
|
@ -569,4 +566,53 @@ dumpvncbuf(vp)
|
|||
}
|
||||
#endif
|
||||
|
||||
|
||||
extern u_int spl_mask;
|
||||
|
||||
int current_spl_level = SPL_0;
|
||||
u_int spl_masks[8];
|
||||
|
||||
int safepri = SPL_0;
|
||||
|
||||
void
|
||||
set_spl_masks()
|
||||
{
|
||||
spl_masks[SPL_0] = 0xffffffff;
|
||||
spl_masks[SPL_SOFT] = ~IRQMASK_SOFTNET;
|
||||
spl_masks[SPL_BIO] = irqmasks[IPL_BIO];
|
||||
spl_masks[SPL_NET] = irqmasks[IPL_NET];
|
||||
spl_masks[SPL_TTY] = irqmasks[IPL_TTY];
|
||||
spl_masks[SPL_CLOCK] = irqmasks[IPL_CLOCK];
|
||||
spl_masks[SPL_IMP] = irqmasks[IPL_IMP];
|
||||
spl_masks[SPL_HIGH] = 0x00000000;
|
||||
}
|
||||
|
||||
void
|
||||
dump_spl_masks()
|
||||
{
|
||||
printf("spl0=%08x splsoft=%08x splbio=%08x splnet=%08x\n",
|
||||
spl_masks[SPL_0], spl_masks[SPL_SOFT], spl_masks[SPL_BIO], spl_masks[SPL_NET]);
|
||||
printf("spltty=%08x splclock=%08x splimp=%08x splhigh=%08x\n",
|
||||
spl_masks[SPL_TTY], spl_masks[SPL_CLOCK], spl_masks[SPL_IMP], spl_masks[SPL_HIGH]);
|
||||
}
|
||||
|
||||
/*
|
||||
* Ok things are broken here. If we lower the spl level to SPL_SOFT
|
||||
* then, for the most things work. However wd interrupts start to get
|
||||
* lost ... i.e. you either get wdc interrupt lost messages or
|
||||
* wdc timeout messages.
|
||||
* The fault is the CLKF_FRAME macro uses in kern_clock.c. This
|
||||
* currently always returns 1 thus splsoftclock() is always
|
||||
* called before calling softclock().
|
||||
*
|
||||
* This is about to be fixed
|
||||
*/
|
||||
|
||||
int
|
||||
splsoftclock()
|
||||
{
|
||||
/* return(lowerspl(SPL_SOFT));*/
|
||||
return(current_spl_level);
|
||||
}
|
||||
|
||||
/* End of stubs.c */
|
||||
|
|
Loading…
Reference in New Issue