Take care of the sun4m way of raising soft interrupts.

This commit is contained in:
pk 1996-11-01 23:30:09 +00:00
parent 19b8bfdf3d
commit 33558b9e5f
1 changed files with 34 additions and 8 deletions

View File

@ -46,9 +46,41 @@
#ifndef AUDIO_C_HANDLER
#include "assym.h"
#include <sparc/sparc/intreg.h>
#include <machine/psl.h>
/* XXX this goes in a header file -- currently, it's hidden in locore.s */
#define INTREG_ADDR 0xf8002000
#define AUDIO_SET_SWINTR_4C \
sethi %hi(INTREG_ADDR), %l5; \
ldub [%l5 + %lo(INTREG_ADDR)], %l6; \
or %l6, IE_L4, %l6; \
stb %l6, [%l5 + %lo(INTREG_ADDR)]
! raise(0,PIL_AUSOFT) ! NOTE: CPU#0 and PIL_AUSOFT=4
#define AUDIO_SET_SWINTR_4M \
sethi %hi(1 << (16 + 4)), %l5; \
set ICR_PI_SET, %l6; \
st %l5, [%l6]
/* set software interrupt */
#if defined(SUN4C) && !defined(SUN4M)
#define AUDIO_SET_SWINTR AUDIO_SET_SWINTR_4C
#elif !defined(SUN4C) && defined(SUN4M)
#define AUDIO_SET_SWINTR AUDIO_SET_SWINTR_4M
#else
#define AUDIO_SET_SWINTR \
sethi %hi(_cputyp), %l5; \
ld [%l5 + %lo(_cputyp)], %l5; \
cmp %l5, CPU_SUN4M; \
be 8f; \
AUDIO_SET_SWINTR_4C; \
ba,a 9f; \
8: \
AUDIO_SET_SWINTR_4M; \
9:
#endif
#define R_amd %l2
#define R_data %l3
#define R_end %l4
@ -100,10 +132,7 @@ _amd7930_trap:
bne 1f ! if (d == e)
st R_data, [%l7 + AU_RDATA]
sethi %hi(INTREG_ADDR), %l5
ldub [%l5 + %lo(INTREG_ADDR)], %l6
or %l6, IE_L4, %l6
stb %l6, [%l5 + %lo(INTREG_ADDR)] ! set software interrupt
AUDIO_SET_SWINTR
1:
! write outgoing data
@ -124,10 +153,7 @@ _amd7930_trap:
bne 2f ! if (d == e)
st R_data, [%l7 + AU_PDATA]
sethi %hi(INTREG_ADDR), %l5
ldub [%l5 + %lo(INTREG_ADDR)], %l6
or %l6, IE_L4, %l6
stb %l6, [%l5 + %lo(INTREG_ADDR)] ! set software interrupt
AUDIO_SET_SWINTR
2:
/*