Skip to contentSkip to conversation

Patching tables osl.c doesn't work as advertised ... (was 2.4.19 & latest acpi & patched dsdt (tosh3k))

DISCUSSION Huw H 2 participants 2 messages Aug 11, 2002 – Aug 12, 2002 1 message not in the archive ACPI

lore
Share & tools
lore

Huw H

author
#0 lore raw

Heya all again,
I've found the cause of my troubles!

In the file linux/drivers/acpi/osl.c the function acpi_os_table_override()
isn't properly implimented. The patch on ftp.poupinou.org needs to check which table is being overriden, otherwise all tables get replaced... Maybe it should be something like:

-------------------------------

acpi_status
acpi_os_table_override (acpi_table_header *existing_table,
acpi_table_header **new_table)

{
        if (!existing_table || !new_table)
                return AE_BAD_PARAMETER;

        *new_table = (ACPI_TBLPTR *) AmlCode;

        if (ACPI_STRNCMP ((char *) existing_table,
                          (char *) *new_table, sizeof (XSDT_SIG) -1))
                {
                        *new_table = NULL;
                };

        return AE_OK;
}

------------------------

Ideally though I think the override belongs in linux/drivers/acpi/tables/tbget.c and the acpi_os_table_override() function should just return the AE_OK if the signatures match, or set the new table pointer to NULL otherwise and/or return the appropriate errwor code. This is I believe the expected behaviour of this function.

Bruno, your patched dsdt works brilliantly so far. THANKS!!

Huw

-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf

#2 lore raw
In reply to a message not in the archive
Quoted 28 lines · Huw H

Heya all again,
I've found the cause of my troubles!

In the file linux/drivers/acpi/osl.c the function acpi_os_table_override()
isn't properly implimented. The patch on ftp.poupinou.org needs to check which table is being overriden, otherwise all tables get replaced... Maybe it should be something like:

-------------------------------

acpi_status
acpi_os_table_override (acpi_table_header *existing_table,
acpi_table_header **new_table)

{
        if (!existing_table || !new_table)
                return AE_BAD_PARAMETER;

        *new_table = (ACPI_TBLPTR *) AmlCode;

        if (ACPI_STRNCMP ((char *) existing_table,
                          (char *) *new_table, sizeof (XSDT_SIG) -1))
                {
                        *new_table = NULL;
                };

        return AE_OK;
}
Quoted 7 lines

------------------------

Ideally though I think the override belongs in linux/drivers/acpi/tables/tbget.c and the acpi_os_table_override() function should just return the AE_OK if the signatures match, or set the new table pointer to NULL otherwise and/or return the appropriate errwor code. This is I believe the expected behaviour of this function.

Actually, I have not checked the latest release of ACPI, and I don't have time to code in my sparse time.. I think I can do something in that area in 2 or 3 weeks.

Signature · 9 lines
Ducrot Bruno
http://www.poupinou.org        Page profaissionelle
http://toto.tu-me-saoules.com  Haume page


-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf