Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 7 May 2004 23:28:15 -0700 (PDT)
From:      Nate Lawson <nate@root.org>
To:        arch@freebsd.org
Cc:        acpi@freebsd.org
Subject:   New ACPI blacklist format
Message-ID:  <20040507231846.F52653@root.org>

next in thread | raw e-mail | index | archive | help
I have extracted a set of known-broken tables/versions from various
sources.  Since. as far as I know, C does not allow variable length
initializers, I've settled on the following format:

struct acpi_table_desc {
    char        *signature;
    char        *oem_id;
    char        *oem_table_id;
    char        *oem_rev_op;
    char        *oem_revision;
    char        *creator_id;
    char        *creator_rev_op;
    char        *creator_revision;
};

struct acpi_blacklist {
    int         quirk;
    struct      acpi_table_desc *match;
};

#define ACPI_BROKEN     0x1

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" },
};

static struct acpi_blacklist acpi_blacklist_table[] = {
    { ACPI_BROKEN, Abit_BP6 },
    { ACPI_BROKEN, AMI_INT },
    { ACPI_BROKEN, Compaq_ViperII },
};

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?

-Nate



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