[PATCH] Dump ACPI table addresses with correct address length (LP: #1260482)
Colin King
colin.king at canonical.com
Thu Dec 12 20:37:15 UTC 2013
From: Colin Ian King <colin.king at canonical.com>
When fwts was first written it was dealing with traditional BIOS
where ACPI tables were always in the lower 32 bits of memory. This
is wrong for 64 bit systems. So fix the address dumping of the
tables in acpidump and the ACPI table --dump option.
Signed-off-by: Colin Ian King <colin.king at canonical.com>
---
src/acpi/acpidump/acpidump.c | 5 +++--
src/lib/src/fwts_dump.c | 2 +-
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/src/acpi/acpidump/acpidump.c b/src/acpi/acpidump/acpidump.c
index c89690d..6a491f2 100644
--- a/src/acpi/acpidump/acpidump.c
+++ b/src/acpi/acpidump/acpidump.c
@@ -1936,8 +1936,9 @@ static int acpidump_test1(fwts_framework *fw)
fwts_infoonly(fw);
for (i = 0; (fwts_acpi_get_table(fw, i, &table) == FWTS_OK) && (table !=NULL); i++) {
- fwts_log_info_verbatum(fw, "%s @ %4.4" PRIx32 " (%zd bytes)", table->name, (uint32_t)table->addr, table->length);
- fwts_log_info_verbatum(fw, "---------------");
+ fwts_log_info_verbatum(fw, "%s @ %lx (%zd bytes)",
+ table->name, (unsigned long)table->addr, table->length);
+ fwts_log_info_verbatum(fw, "----");
acpidump_table(fw, table);
fwts_log_nl(fw);
}
diff --git a/src/lib/src/fwts_dump.c b/src/lib/src/fwts_dump.c
index 9cbe936..c92f98c 100644
--- a/src/lib/src/fwts_dump.c
+++ b/src/lib/src/fwts_dump.c
@@ -143,7 +143,7 @@ static int dump_acpi_table(fwts_acpi_table_info *table, FILE *fp)
char buffer[128];
size_t n;
- fprintf(fp, "%s @ 0x%x\n", table->name, (uint32_t)table->addr);
+ fprintf(fp, "%s @ 0x%lx\n", table->name, (unsigned long)table->addr);
for (n = 0; n < table->length; n+=16) {
int left = table->length - n;
--
1.8.5.1
More information about the fwts-devel
mailing list