Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 1 Feb 2004 12:42:18 -0500 (EST)
From:      Andrew Gallatin <gallatin@cs.duke.edu>
To:        Tom Ponsford <tponsford@theriver.com>
Cc:        freebsd-alpha@FreeBSD.ORG
Subject:   Re: AS2100A machine checks
Message-ID:  <16413.14970.439194.139148@grasshopper.cs.duke.edu>
In-Reply-To: <4019D382.4090003@theriver.com>
References:  <40196F20.3000102@theriver.com> <16410.50024.301271.366647@grasshopper.cs.duke.edu> <4019D382.4090003@theriver.com>

next in thread | previous in thread | raw e-mail | index | archive | help

I could be missing something, its been a long time since I looked at
this code.

The way PCI bus probing works on ancient alphas is that you do a "bad
addr" read from an address.  If you get a machine check from this
read, you handle the machine check and report that no device is
present.

You also need to make sure that nothing else is happening while
you do this read.  In 4.x, this was done with an splhigh().
In -current, its done with intr_disable().  intr_disable()
in -current also masks machine checks.  I don't see how a
machine check could be delivered during badaddr_read().

So what I think is happening is that the machine check is
happening for a bad address, badaddr_read() never sees it,
we unmask machine checks and kaboom!  I've appended a patch
to leave machine checks always unmasked.

I think other old alpha platforms (apecs, cia) work because
they still use splhigh(), which is a nop these days.

Changing intr_disable() may be the wrong thing, since its probably
used elsewhere in code where we might really want to disable machine
checks.  If that doesn't work, try backing out the patch to cpufun.h
and changing the calls to intr_disable/intr_restore in
alpha/pci/t2_pci.c T2_TYPE1_SETUP/T2_TYPE1_TEARDOWN to
splhigh/splx. (ie, nop's).


Drew


Index: alpha/include/cpufunc.h
===================================================================
RCS file: /home/ncvs/src/sys/alpha/include/cpufunc.h,v
retrieving revision 1.15
diff -u -r1.15 cpufunc.h
--- alpha/include/cpufunc.h	1 Apr 2002 23:51:22 -0000	1.15
+++ alpha/include/cpufunc.h	1 Feb 2004 17:21:58 -0000
@@ -50,7 +50,7 @@
 static __inline register_t
 intr_disable(void)
 {
-	return (alpha_pal_swpipl(ALPHA_PSL_IPL_MCES));
+	return (alpha_pal_swpipl(ALPHA_PSL_IPL_HIGH));
 }
 
 static __inline void



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?16413.14970.439194.139148>