summaryrefslogtreecommitdiff
path: root/sys/arch/sparc
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>1997-09-11 20:31:34 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>1997-09-11 20:31:34 +0000
commit52759134e40d2ef6a826ca359ca35114097ea751 (patch)
treecf17199eafc20126286e6e70e4cb4edafddd94a6 /sys/arch/sparc
parent4a521d00e4bc2d99852ab4f7387e7dd278dd66be (diff)
Turn off "branch folding" in microsparc II processors. This seems to
avoid strange panics happening. Patch suggested by Chris Torek.
Diffstat (limited to 'sys/arch/sparc')
-rw-r--r--sys/arch/sparc/sparc/cpu.c16
1 files changed, 14 insertions, 2 deletions
diff --git a/sys/arch/sparc/sparc/cpu.c b/sys/arch/sparc/sparc/cpu.c
index 8826a84ae33..b2c26dd0cf9 100644
--- a/sys/arch/sparc/sparc/cpu.c
+++ b/sys/arch/sparc/sparc/cpu.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cpu.c,v 1.7 1997/08/08 08:27:10 downsj Exp $ */
+/* $OpenBSD: cpu.c,v 1.8 1997/09/11 20:31:33 deraadt Exp $ */
/* $NetBSD: cpu.c,v 1.52 1997/07/29 09:41:58 fair Exp $ */
/*
@@ -333,6 +333,7 @@ void getcacheinfo_obp __P((struct cpu_softc *, int node));
void sun4_hotfix __P((struct cpu_softc *));
void viking_hotfix __P((struct cpu_softc *));
void turbosparc_hotfix __P((struct cpu_softc *));
+void swift_hotfix __P((struct cpu_softc *));
void ms1_mmu_enable __P((void));
void viking_mmu_enable __P((void));
@@ -731,7 +732,7 @@ struct module_info module_swift = { /* UNTESTED */
VAC_WRITETHROUGH,
0,
getcacheinfo_obp,
- 0,
+ swift_hotfix,
0,
swift_cache_enable,
256,
@@ -745,6 +746,17 @@ struct module_info module_swift = { /* UNTESTED */
};
void
+swift_hotfix(sc)
+ struct cpu_softc *sc;
+{
+ int pcr = lda(SRMMU_PCR, ASI_SRMMU);
+
+ /* Turn off branch prediction */
+ pcr &= ~SWIFT_PCR_BF;
+ sta(SRMMU_PCR, ASI_SRMMU, pcr);
+}
+
+void
swift_mmu_enable()
{
}