From owner-freebsd-acpi@FreeBSD.ORG Sat May 8 09:43:35 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 7E0AA16A4CE; Sat, 8 May 2004 09:43:35 -0700 (PDT) Received: from ns1.xcllnt.net (209-128-86-226.BAYAREA.NET [209.128.86.226]) by mx1.FreeBSD.org (Postfix) with ESMTP id AF6E443D1F; Sat, 8 May 2004 09:43:34 -0700 (PDT) (envelope-from marcel@xcllnt.net) Received: from dhcp01.pn.xcllnt.net (dhcp01.pn.xcllnt.net [192.168.4.201]) by ns1.xcllnt.net (8.12.11/8.12.11) with ESMTP id i48GhY6D027241; Sat, 8 May 2004 09:43:34 -0700 (PDT) (envelope-from marcel@piii.pn.xcllnt.net) Received: from dhcp01.pn.xcllnt.net (localhost [127.0.0.1]) i48GhYSa003257; Sat, 8 May 2004 09:43:34 -0700 (PDT) (envelope-from marcel@dhcp01.pn.xcllnt.net) Received: (from marcel@localhost) by dhcp01.pn.xcllnt.net (8.12.11/8.12.11/Submit) id i48GhYuP003256; Sat, 8 May 2004 09:43:34 -0700 (PDT) (envelope-from marcel) Date: Sat, 8 May 2004 09:43:34 -0700 From: Marcel Moolenaar To: Nate Lawson Message-ID: <20040508164334.GA3217@dhcp01.pn.xcllnt.net> References: <20040507231846.F52653@root.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040507231846.F52653@root.org> User-Agent: Mutt/1.4.2.1i cc: acpi@freebsd.org cc: arch@freebsd.org Subject: Re: New ACPI blacklist format 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: Sat, 08 May 2004 16:43:35 -0000 On Fri, May 07, 2004 at 11:28:15PM -0700, Nate Lawson wrote: *snip* > static struct acpi_table_desc Abit_BP6[] = { > { "FACP", "AWARD", "AWRDACPI", "<=", "30302e31", "", "", "" }, > }; > static struct acpi_table_desc AMI_INT[] = { /* 01/18/00 */ > { "FACP", "AWARD", "", "<=", "10", "", "", "" }, > { "DSDT", "", "", "<=", "5", "", "", "" }, > }; > static struct acpi_table_desc Compaq_ViperII[] = { > { "FACP", "COMPAQ", "VIPER II", "<=", "06040000", "PTL", "<=", "000F4240" }, > }; *snip* > Each entry in acpi_table_desc lists a table ID and then a set of strings > to match against the table. Multiple tables may be matched for a given > system (i.e. AMI_INT above). The op values will be "<=", "=", and ">=". > The quirk associated with each system will be a bitmask returned from the > quirk matching function. > > In English, the last entry means, "Check the table named 'FACP' for an OEM > ID of 'COMPAQ' and table ID of 'VIPER II' and OEM revision <= '06040000' > ..." Substring matches will work too (e.g., "COMPA"). > > Is there any better way to compact this? If space is a concern, you can enable (i.e. compile-in) quirks by using kernel options, like: options ACPI_QUIRK_ABIT_BP6 and #ifdef ACPI_QUIRK_ABIT_BP6 static struct acpi_table_desc Abit_BP6[] = { { "FACP", "AWARD", "AWRDACPI", "<=", "30302e31", "", "", "" }, }; #endif You put all three of them in GENERIC and people can add or remove them from their own kernel configuration to fit their needs (and save space). If the quirks are in MI files, then this also avoids that i386 quirks end up in amd64 or ia64 kernels. Just a thought, -- Marcel Moolenaar USPA: A-39004 marcel@xcllnt.net