summaryrefslogtreecommitdiff
path: root/sys/arch/sgi
diff options
context:
space:
mode:
authorVisa Hankala <visa@cvs.openbsd.org>2015-12-23 11:45:25 +0000
committerVisa Hankala <visa@cvs.openbsd.org>2015-12-23 11:45:25 +0000
commitdb4c5b45f5b02137351a3a53369b7e4fff2cd169 (patch)
tree2b8afbcbe89ad7b42ee233108d7c31d43ce30bdc /sys/arch/sgi
parent40fd65585c3e3833441022a6e01c1363bb0254ca (diff)
Execution of the `sync' instruction is not supported by the T-Bus and
raises a machine check exception. Do not report anything on console in that case, so that userland does not suffer too much. Diff from miod@
Diffstat (limited to 'sys/arch/sgi')
-rw-r--r--sys/arch/sgi/localbus/tcc.c21
1 files changed, 16 insertions, 5 deletions
diff --git a/sys/arch/sgi/localbus/tcc.c b/sys/arch/sgi/localbus/tcc.c
index 5b18db1c7d6..9ac1155a64d 100644
--- a/sys/arch/sgi/localbus/tcc.c
+++ b/sys/arch/sgi/localbus/tcc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tcc.c,v 1.7 2015/09/24 18:37:50 miod Exp $ */
+/* $OpenBSD: tcc.c,v 1.8 2015/12/23 11:45:24 visa Exp $ */
/*
* Copyright (c) 2012 Miodrag Vallat.
@@ -102,14 +102,25 @@ uint32_t
tcc_bus_error(uint32_t hwpend, struct trap_frame *tf)
{
uint64_t intr, error, addr, errack;
+ unsigned int errtype;
intr = tcc_read(TCC_INTR);
error = tcc_read(TCC_ERROR);
- addr = tcc_read(TCC_BERR_ADDR);
- printf("tcc bus error: intr %llx error %llx (%llu) addr %08llx\n",
- intr, error, (error & TCC_ERROR_TYPE_MASK) >> TCC_ERROR_TYPE_SHIFT,
- addr);
+ errtype = (error & TCC_ERROR_TYPE_MASK) >> TCC_ERROR_TYPE_SHIFT;
+
+ /*
+ * Execution of the `sync' instruction is not supported by the
+ * T-Bus and raises a machine check exception.
+ * Do not report anything on console in that case, so that
+ * userland does not suffer too much.
+ */
+ if (errtype != TCC_ERROR_TYPE_TBUS || (intr & TCC_INTR_MCHECK) == 0) {
+ addr = tcc_read(TCC_BERR_ADDR);
+
+ printf("tcc bus error: intr %llx error %llx (%u) addr %08llx\n",
+ intr, error, errtype, addr);
+ }
/* Ack error condition */
errack = 0;