if (ACPI_VALIDATE_RSDP_SIG(table->signature)) { /* *ChecksumforRSDP. *Note:Otherchecksumsarecomputedduringthetabledump.
*/
rsdp = ACPI_CAST_PTR(struct acpi_table_rsdp, table);
status = acpi_tb_validate_rsdp(rsdp);
} else { /* We don't have to check for a CDAT here, since CDAT is not in the RSDT/XSDT */
status = acpi_ut_verify_checksum(table, table->length);
}
if (ACPI_FAILURE(status)) {
fprintf(stderr, "%4.4s: Warning: wrong checksum in table\n",
table->signature);
}
int ap_dump_all_tables(void)
{ struct acpi_table_header *table;
u32 instance = 0;
acpi_physical_address address;
acpi_status status; int table_status;
u32 i;
/* Get and dump all available ACPI tables */
for (i = 0; i < AP_MAX_ACPI_FILES; i++) {
status =
acpi_os_get_table_by_index(i, &table, &instance, &address); if (ACPI_FAILURE(status)) {
/* AE_LIMIT means that no more tables are available */
if (status == AE_LIMIT) { return (0);
} elseif (i == 0) {
fprintf(stderr, "Could not get ACPI tables, %s\n",
acpi_format_exception(status)); return (-1);
} else {
fprintf(stderr, "Could not get ACPI table at index %u, %s\n",
i, acpi_format_exception(status)); continue;
}
}
int ap_dump_table_by_address(char *ascii_address)
{
acpi_physical_address address; struct acpi_table_header *table;
acpi_status status; int table_status;
u64 long_address;
/* Convert argument to an integer physical address */
status = acpi_ut_strtoul64(ascii_address, &long_address); if (ACPI_FAILURE(status)) {
fprintf(stderr, "%s: Could not convert to a physical address\n",
ascii_address); return (-1);
}
address = (acpi_physical_address)long_address;
status = acpi_os_get_table_by_address(address, &table); if (ACPI_FAILURE(status)) {
fprintf(stderr, "Could not get table at 0x%8.8X%8.8X, %s\n",
ACPI_FORMAT_UINT64(address),
acpi_format_exception(status)); return (-1);
}
int ap_dump_table_from_file(char *pathname)
{ struct acpi_table_header *table;
u32 file_size = 0; int table_status = -1;
/* Get the entire ACPI table from the file */
table = ap_get_table_from_file(pathname, &file_size); if (!table) { return (-1);
}
if (!acpi_ut_valid_nameseg(table->signature)) {
fprintf(stderr, "No valid ACPI signature was found in input file %s\n",
pathname);
}
/* File must be at least as long as the table length */
if (table->length > file_size) {
fprintf(stderr, "Table length (0x%X) is too large for input file (0x%X) %s\n",
table->length, file_size, pathname); gotoexit;
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.