From owner-freebsd-acpi@FreeBSD.ORG Tue Nov 16 23:38:54 2004 Return-Path: Delivered-To: freebsd-acpi@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 01ACD16A4CE; Tue, 16 Nov 2004 23:38:54 +0000 (GMT) Received: from www.cryptography.com (li-22.members.linode.com [64.5.53.22]) by mx1.FreeBSD.org (Postfix) with ESMTP id B8F6643D2F; Tue, 16 Nov 2004 23:38:53 +0000 (GMT) (envelope-from nate@root.org) Received: from [10.0.0.34] (adsl-67-119-74-222.dsl.sntc01.pacbell.net [67.119.74.222]) by www.cryptography.com (8.12.8/8.12.8) with ESMTP id iAGNcqC4006654 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Tue, 16 Nov 2004 15:38:52 -0800 Message-ID: <419A8F8B.3050206@root.org> Date: Tue, 16 Nov 2004 15:38:51 -0800 From: Nate Lawson User-Agent: Mozilla Thunderbird 0.9 (Windows/20041103) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Andrew Gallatin References: <200411111737.00537.jhb@FreeBSD.org> <200411161339.13818.jhb@FreeBSD.org> <16794.28367.159895.3565@grasshopper.cs.duke.edu> <200411161647.14543.jhb@FreeBSD.org> <16794.33094.416989.88341@grasshopper.cs.duke.edu> <419A8B75.4060000@root.org> <16794.36113.628156.440391@grasshopper.cs.duke.edu> In-Reply-To: <16794.36113.628156.440391@grasshopper.cs.duke.edu> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit cc: freebsd-acpi@FreeBSD.org cc: scottl@FreeBSD.org cc: John Baldwin Subject: Re: New ACPI PCI Link Routing code X-BeenThere: freebsd-acpi@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: ACPI and power management development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Nov 2004 23:38:54 -0000 Andrew Gallatin wrote: > Nate Lawson writes: > > > > You'll need ASL to debug this, acpidump -t -d > trinity.asl > > It seems very surprising that _CRS would return 3 interrupts. I'm > > guessing the first is the active one? > > http://people.freebsd.org/~gallatin/trinity.asl Name (IRTP, ResourceTemplate () { IRQ (Level, ActiveLow, Shared) {0} }) CreateWordField (IRTP, 0x01, INTP) Name (IRTA, ResourceTemplate () { Interrupt (ResourceConsumer, Level, ActiveLow, Exclusive) { 0x00000000, } }) CreateDWordField (IRTA, 0x05, INTA) Method (GETI, 1, NotSerialized) { If (And (Arg0, 0x0F, Local0)) { Return (Local0) } Else { Return (\MLIB.CNV2 (And (Arg0, 0x0F))) } } Device (LN00) { Method (_CRS, 0, NotSerialized) { Store (GETI (PI00), INTP) Return (IRTP) } Um, what a weird system. This link is used for both APIC and PIC mode but only returns the PIC settings via _CRS (IRTP). To generate the _CRS result, it creates a word field (2 bytes) at the start of IRTP + 2 bytes. It then overwrites this IRQ template with the current setting, retrieved from an IO port specified by PI00. Still, IRTP only has one IRQ template so the KASSERT should be incorrect. It may make sense to hexdump the interrupt object returned. Perhaps the Word field is at the wrong offset or wrong size and so it overwrites the IRQ template with some bogus value. -- Nate