FreeBSD/sys/contrib/dev/acpica/components/tables/tbdata.c
/******************************************************************************
 *
 * FUNCTION:    AcpiTbVerifyTempTable
 *
 * PARAMETERS:  TableDesc           - Table descriptor
 *              Signature           - Table signature to verify
 *
 * RETURN:      Status
 *
 * DESCRIPTION: This function is called to validate and verify the table, the
 *              returned table descriptor is in "VALIDATED" state.
 *
 *****************************************************************************/
AcpiTbVerifyTempTable
PARAMETERS:  TableDesc           - Table descriptor
Signature           - Table signature to verify

Status

This function is called to validate and verify the table, the
returned table descriptor is in "VALIDATED" state.
AcpiTbVerifyTempTable PARAMETERS : TableDesc - Table descriptor Signature - Table signature to verify Status This function is called to validate and verify the table the returned table descriptor is in " VALIDATED " state .
ACPI_STATUS
AcpiTbVerifyTempTable (
    ACPI_TABLE_DESC         *TableDesc,
    char                    *Signature)
{
    ACPI_STATUS             Status = AE_OK;
    ACPI_FUNCTION_TRACE (TbVerifyTempTable);
    Status = AcpiTbValidateTempTable (TableDesc);
    if (ACPI_FAILURE (Status))
    {
        return_ACPI_STATUS (AE_NO_MEMORY);
    }
    if (Signature &&
        !ACPI_COMPARE_NAME (&TableDesc->Signature, Signature))
    {
        ACPI_BIOS_ERROR ((AE_INFO,
            "Invalid signature 0x%X for ACPI table, expected [%s]",
            TableDesc->Signature.Integer, Signature));
        Status = AE_BAD_SIGNATURE;
        goto InvalidateAndExit;
    }
    if (AcpiGbl_VerifyTableChecksum)
    {
        Status = AcpiTbVerifyChecksum (TableDesc->Pointer, TableDesc->Length);
        if (ACPI_FAILURE (Status))
        {
            ACPI_EXCEPTION ((AE_INFO, AE_NO_MEMORY,
                "%4.4s 0x%8.8X%8.8X"
                " Attempted table install failed",
                AcpiUtValidNameseg (TableDesc->Signature.Ascii) ?
                    TableDesc->Signature.Ascii : "????",
                ACPI_FORMAT_UINT64 (TableDesc->Address)));
            goto InvalidateAndExit;
        }
    }
    return_ACPI_STATUS (AE_OK);
InvalidateAndExit:
    AcpiTbInvalidateTable (TableDesc);
    return_ACPI_STATUS (Status);
}
ACPI_STATUS AcpiTbVerifyTempTable ( ACPI_TABLE_DESC * TableDesc , char * Signature ) { ACPI_STATUS Status = AE_OK ; ACPI_FUNCTION_TRACE ( TbVerifyTempTable ) ; Status = AcpiTbValidateTempTable ( TableDesc ) ; if ( ACPI_FAILURE ( Status ) ) { return_ACPI_STATUS ( AE_NO_MEMORY ) ; } if ( Signature && ! ACPI_COMPARE_NAME ( & TableDesc -> Signature , Signature ) ) { ACPI_BIOS_ERROR ( ( AE_INFO , " " , TableDesc -> Signature . Integer , Signature ) ) ; Status = AE_BAD_SIGNATURE ; goto InvalidateAndExit ; } if ( AcpiGbl_VerifyTableChecksum ) { Status = AcpiTbVerifyChecksum ( TableDesc -> Pointer , TableDesc -> Length ) ; if ( ACPI_FAILURE ( Status ) ) { ACPI_EXCEPTION ( ( AE_INFO , AE_NO_MEMORY , " " " " , AcpiUtValidNameseg ( TableDesc -> Signature . Ascii ) ? TableDesc -> Signature . Ascii : " " , ACPI_FORMAT_UINT64 ( TableDesc -> Address ) ) ) ; goto InvalidateAndExit ; } } return_ACPI_STATUS ( AE_OK ) ; InvalidateAndExit : AcpiTbInvalidateTable ( TableDesc ) ; return_ACPI_STATUS ( Status ) ; }
FUNCTION:    AcpiTbVerifyTempTable
 PARAMETERS:  TableDesc           - Table descriptor
              Signature           - Table signature to verify
FUNCTION : AcpiTbVerifyTempTable PARAMETERS : TableDesc - Table descriptor Signature - Table signature to verify
/* Validate the table */ /* If a particular signature is expected (DSDT/FACS), it must match */ /* Verify the checksum */