示例#1
0
文件: oswinxf.c 项目: liangqi/acpica
ACPI_STATUS
AcpiOsTableOverride (
    ACPI_TABLE_HEADER       *ExistingTable,
    ACPI_TABLE_HEADER       **NewTable)
{
#ifdef ACPI_ASL_COMPILER
    ACPI_STATUS             Status;
    ACPI_PHYSICAL_ADDRESS   Address;
#endif

    if (!ExistingTable || !NewTable)
    {
        return (AE_BAD_PARAMETER);
    }

    *NewTable = NULL;


#ifdef ACPI_EXEC_APP

    /* Call back up to AcpiExec */

    AeTableOverride (ExistingTable, NewTable);
#endif


#ifdef ACPI_ASL_COMPILER

    /* Attempt to get the table from the registry */

    /* Construct a null-terminated string from table signature */

    ACPI_MOVE_NAME (TableName, ExistingTable->Signature);
    TableName[ACPI_NAME_SIZE] = 0;

    Status = AcpiOsGetTableByName (TableName, 0, NewTable, &Address);
    if (ACPI_SUCCESS (Status))
    {
        AcpiOsPrintf ("Table [%s] obtained from registry, %u bytes\n",
            TableName, (*NewTable)->Length);
    }
    else
    {
        AcpiOsPrintf ("Could not read table %s from registry (%s)\n",
            TableName, AcpiFormatException (Status));
    }
#endif

    return (AE_OK);
}
示例#2
0
ACPI_STATUS
AcpiOsTableOverride (
    ACPI_TABLE_HEADER       *ExistingTable,
    ACPI_TABLE_HEADER       **NewTable)
{

    if (!ExistingTable || !NewTable)
    {
        return (AE_BAD_PARAMETER);
    }

    *NewTable = NULL;


#ifdef ACPI_EXEC_APP

    /* Call back up to AcpiExec */

    AeTableOverride (ExistingTable, NewTable);
#endif


#ifdef ACPI_ASL_COMPILER

    /* Attempt to get the table from the registry */

    /* Construct a null-terminated string from table signature */

    TableName[ACPI_NAME_SIZE] = 0;
    ACPI_STRNCPY (TableName, ExistingTable->Signature, ACPI_NAME_SIZE);

    *NewTable = OsGetTable (TableName);
    if (*NewTable)
    {
        AcpiOsPrintf ("Table [%s] obtained from registry, %u bytes\n",
            TableName, (*NewTable)->Length);
    }
    else
    {
        AcpiOsPrintf ("Could not read table %s from registry\n", TableName);
    }
#endif

    return (AE_OK);
}
示例#3
0
ACPI_STATUS
AcpiOsTableOverride (
    ACPI_TABLE_HEADER       *ExistingTable,
    ACPI_TABLE_HEADER       **NewTable)
{

    if (!ExistingTable || !NewTable)
    {
        return (AE_BAD_PARAMETER);
    }

    *NewTable = NULL;

#ifdef ACPI_EXEC_APP

    AeTableOverride (ExistingTable, NewTable);
    return (AE_OK);
#else

    return (AE_NO_ACPI_TABLES);
#endif
}
示例#4
0
ACPI_STATUS
AcpiOsTableOverride (
    ACPI_TABLE_HEADER       *ExistingTable,
    ACPI_TABLE_HEADER       **NewTable)
{

    if (!ExistingTable || !NewTable)
    {
        return (AE_BAD_PARAMETER);
    }

    *NewTable = NULL;


#ifdef ACPI_EXEC_APP

    /* Call back up to AcpiExec */

    AeTableOverride (ExistingTable, NewTable);
#endif

    return (AE_OK);
}