From owner-cvs-all Wed Mar 20 10: 5:35 2002 Delivered-To: cvs-all@freebsd.org Received: from mail12.speakeasy.net (mail12.speakeasy.net [216.254.0.212]) by hub.freebsd.org (Postfix) with ESMTP id B1C2E37B416 for ; Wed, 20 Mar 2002 10:05:23 -0800 (PST) Received: (qmail 1489 invoked from network); 20 Mar 2002 18:05:22 -0000 Received: from unknown (HELO server.baldwin.cx) ([216.27.160.63]) (envelope-sender ) by mail12.speakeasy.net (qmail-ldap-1.03) with DES-CBC3-SHA encrypted SMTP for ; 20 Mar 2002 18:05:22 -0000 Received: from laptop.baldwin.cx (gw1.twc.weather.com [216.133.140.1]) by server.baldwin.cx (8.11.6/8.11.6) with ESMTP id g2KI5rv62825; Wed, 20 Mar 2002 13:05:53 -0500 (EST) (envelope-from jhb@FreeBSD.org) Message-ID: X-Mailer: XFMail 1.5.2 on FreeBSD X-Priority: 3 (Normal) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit MIME-Version: 1.0 In-Reply-To: Date: Wed, 20 Mar 2002 13:05:21 -0500 (EST) From: John Baldwin To: Doug Rabson Subject: RE: cvs commit: src/sys/contrib/dev/acpica - Imported sources Cc: Mike Smith , cvs-all@FreeBSD.org, cvs-committers@FreeBSD.org Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On 20-Mar-2002 Doug Rabson wrote: > On Wed, 20 Mar 2002, John Baldwin wrote: > >> >> On 20-Mar-2002 Doug Rabson wrote: >> > On Tue, 19 Mar 2002, John Baldwin wrote: >> > >> >> >> >> On 16-Mar-2002 Mike Smith wrote: >> >> > msmith 2002/03/15 18:18:15 PST >> >> > >> >> > src/sys/contrib/dev/acpica - Imported sources >> >> > Update of /home/ncvs/src/sys/contrib/dev/acpica >> >> > In directory freefall.freebsd.org:/d/home/msmith/acpi_ca_destination >> >> > >> >> > Log Message: >> >> > Import of the 20020308 Intel ACPI CA update. >> >> >> >> Still doesn't work for a machine with multiple PCI busses as reported >> >> earlier >> >> on the ACPI list: >> >> >> >> pci0: at device 12.0 (no driver attached) >> >> acpi_pcib1: on acpi0 >> > >> > It does at least partly work with multiple host-pci bridges since this >> > ia64 box has about four (!). Something "special" about your machine? >> >> Not sure. My guess is that since %bp is getting zero'd and since it is >> saved >> on the stack just above local variables on the i386, there is a buffer >> overflow >> in the ACPI code somewhere that is trashing the stack. :( > > Oops. Unfortunately I don't have an i386 machine with more than one host > birdge to look at it with. Well, it blows up with a hosed frame pointer here: (kgdb) l *acpi_pcib_attach+0x1c0 0xc015aec4 is in acpi_pcib_attach (../../../dev/acpica/acpi_pcib.c:208). 205 /* 206 * Attach the PCI bus proper. 207 */ 208 if ((child = device_add_child(dev, "pci", sc->ap_bus)) == NULL) { 209 device_printf(device_get_parent(dev), "couldn't attach pci bus"); Just before this is: /* * Get the PCI interrupt routing table for this bus. */ sc->ap_prt.Length = ACPI_ALLOCATE_BUFFER; if (ACPI_FAILURE(status = AcpiGetIrqRoutingTable(sc->ap_handle, &sc->ap_prt) )) { device_printf(dev, "could not get PCI interrupt routing table - %s\n", A cpiFormatException(status)); /* this is not an error, but it may reduce functionality */ } Thus, the likely candidate is AcpiGetIrqRoutingTable(). The only changes in the last import were to use AcpiUtValidateBuffer() rather than testing the result buffer to see if it was null. I don't see how that function could be a problem though. Hmm, looking at AcpiGetPrtMethodData(), it seems that the code changed to no longer check that the destination buffer was long enough assuming that the caller does that. Except that AcpiUtBufferValidate() doesn't do that AFAICT, so now nothing checks to see if the buffer is long enough. I'll play around with reverting part of that and see if it works ok. FWIW, here's the _PRT for the PCI busses in this machine: Err, actually, it's a bit long, so only if someone asks for it. :) -- John Baldwin <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve!" - http://www.FreeBSD.org/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message