From owner-freebsd-alpha@FreeBSD.ORG Sun Feb 1 09:42:28 2004 Return-Path: Delivered-To: freebsd-alpha@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C6E0C16A4CE for ; Sun, 1 Feb 2004 09:42:28 -0800 (PST) Received: from duke.cs.duke.edu (duke.cs.duke.edu [152.3.140.1]) by mx1.FreeBSD.org (Postfix) with ESMTP id 45FCC43D54 for ; Sun, 1 Feb 2004 09:42:26 -0800 (PST) (envelope-from gallatin@cs.duke.edu) Received: from grasshopper.cs.duke.edu (grasshopper.cs.duke.edu [152.3.145.30]) by duke.cs.duke.edu (8.12.10/8.12.10) with ESMTP id i11HgO5P025437 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 1 Feb 2004 12:42:24 -0500 (EST) Received: (from gallatin@localhost) by grasshopper.cs.duke.edu (8.12.9p2/8.12.9/Submit) id i11HgI7G022063; Sun, 1 Feb 2004 12:42:18 -0500 (EST) (envelope-from gallatin) From: Andrew Gallatin MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <16413.14970.439194.139148@grasshopper.cs.duke.edu> Date: Sun, 1 Feb 2004 12:42:18 -0500 (EST) To: Tom Ponsford In-Reply-To: <4019D382.4090003@theriver.com> References: <40196F20.3000102@theriver.com> <16410.50024.301271.366647@grasshopper.cs.duke.edu> <4019D382.4090003@theriver.com> X-Mailer: VM 6.75 under 21.1 (patch 12) "Channel Islands" XEmacs Lucid cc: freebsd-alpha@FreeBSD.ORG Subject: Re: AS2100A machine checks X-BeenThere: freebsd-alpha@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Porting FreeBSD to the Alpha List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Feb 2004 17:42:28 -0000 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