From d1be7c7ea4871aa2fa3d222f9c3517a76e8a8978 Mon Sep 17 00:00:00 2001 From: pk Date: Mon, 10 Mar 1997 23:08:31 +0000 Subject: [PATCH] New location of Interrupt Enable register on sun4/sun4c. --- sys/arch/sparc/sparc/amd7930intr.s | 13 +++++-------- sys/arch/sparc/sparc/bsd_fdintr.s | 15 ++++++--------- 2 files changed, 11 insertions(+), 17 deletions(-) diff --git a/sys/arch/sparc/sparc/amd7930intr.s b/sys/arch/sparc/sparc/amd7930intr.s index ef900d460d24..a651824596b2 100644 --- a/sys/arch/sparc/sparc/amd7930intr.s +++ b/sys/arch/sparc/sparc/amd7930intr.s @@ -49,14 +49,11 @@ #include #include -/* 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; \ + sethi %hi(INTRREG_VA), %l5; \ + ldub [%l5 + %lo(INTRREG_VA)], %l6; \ or %l6, IE_L4, %l6; \ - stb %l6, [%l5 + %lo(INTREG_ADDR)] + stb %l6, [%l5 + %lo(INTRREG_VA)] ! raise(0,PIL_AUSOFT) ! NOTE: CPU#0 and PIL_AUSOFT=4 #define AUDIO_SET_SWINTR_4M \ @@ -65,9 +62,9 @@ st %l5, [%l6] /* set software interrupt */ -#if defined(SUN4C) && !defined(SUN4M) +#if (defined(SUN4) || defined(SUN4C)) && !defined(SUN4M) #define AUDIO_SET_SWINTR AUDIO_SET_SWINTR_4C -#elif !defined(SUN4C) && defined(SUN4M) +#elif !(defined(SUN4) || defined(SUN4C)) && defined(SUN4M) #define AUDIO_SET_SWINTR AUDIO_SET_SWINTR_4M #else #define AUDIO_SET_SWINTR \ diff --git a/sys/arch/sparc/sparc/bsd_fdintr.s b/sys/arch/sparc/sparc/bsd_fdintr.s index 11eb7b035ec0..aea501a3099e 100644 --- a/sys/arch/sparc/sparc/bsd_fdintr.s +++ b/sys/arch/sparc/sparc/bsd_fdintr.s @@ -1,4 +1,4 @@ -/* $NetBSD: bsd_fdintr.s,v 1.9 1996/12/08 23:41:39 pk Exp $ */ +/* $NetBSD: bsd_fdintr.s,v 1.10 1997/03/10 23:08:32 pk Exp $ */ /* * Copyright (c) 1995 Paul Kranenburg @@ -41,14 +41,11 @@ #include #include -/* XXX this goes in a header file -- currently, it's hidden in locore.s */ -#define INTREG_ADDR 0xf8002000 - #define FD_SET_SWINTR_4C \ - sethi %hi(INTREG_ADDR), %l5; \ - ldub [%l5 + %lo(INTREG_ADDR)], %l6; \ + sethi %hi(INTRREG_VA), %l5; \ + ldub [%l5 + %lo(INTRREG_VA)], %l6; \ or %l6, IE_L4, %l6; \ - stb %l6, [%l5 + %lo(INTREG_ADDR)] + stb %l6, [%l5 + %lo(INTRREG_VA)] ! raise(0,PIL_AUSOFT) ! NOTE: CPU#0 and PIL_AUSOFT=4 #define FD_SET_SWINTR_4M \ @@ -57,9 +54,9 @@ st %l5, [%l6] /* set software interrupt */ -#if defined(SUN4C) && !defined(SUN4M) +#if (defined(SUN4) || defined(SUN4C)) && !defined(SUN4M) #define FD_SET_SWINTR FD_SET_SWINTR_4C -#elif !defined(SUN4C) && defined(SUN4M) +#elif !(defined(SUN4) || defined(SUN4C)) && defined(SUN4M) #define FD_SET_SWINTR FD_SET_SWINTR_4M #else #define FD_SET_SWINTR \