summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorEdward O'Callaghan <eocallaghan@alterapraxis.com>2014-04-06 20:18:27 +1000
committerAlexandru Gagniuc <mr.nuke.me@gmail.com>2014-04-14 06:59:38 +0200
commit5188d4008b540f4dcda64ce3c7dabbfa0b26dbe7 (patch)
treed93aef7e373540e2925bd2c6ff17ec824df0f243 /src
parentcd96e829f1212e3736a23e81ae48bf0109da64cd (diff)
downloadcoreboot-5188d4008b540f4dcda64ce3c7dabbfa0b26dbe7.tar.xz
jetway/nf81-t56n-lf: Use hexdump() for dumping ACPI tables
Use hexdump() instead of a local implementation for dumping ACPI_TABLES. Change-Id: I20354a4f9dff4105de5af696bb9da4a4f6cca788 Signed-off-by: Edward O'Callaghan <eocallaghan@alterapraxis.com> Reviewed-on: http://review.coreboot.org/5466 Reviewed-by: Alexandru Gagniuc <mr.nuke.me@gmail.com> Tested-by: build bot (Jenkins)
Diffstat (limited to 'src')
-rw-r--r--src/mainboard/jetway/nf81-t56n-lf/acpi_tables.c40
1 files changed, 12 insertions, 28 deletions
diff --git a/src/mainboard/jetway/nf81-t56n-lf/acpi_tables.c b/src/mainboard/jetway/nf81-t56n-lf/acpi_tables.c
index 90f556b062..2096ab3226 100644
--- a/src/mainboard/jetway/nf81-t56n-lf/acpi_tables.c
+++ b/src/mainboard/jetway/nf81-t56n-lf/acpi_tables.c
@@ -29,23 +29,7 @@
#include <string.h>
#define DUMP_ACPI_TABLES 0
-
-#if DUMP_ACPI_TABLES == 1
-
-static void dump_mem(u32 start, u32 end)
-{
-
- u32 i;
- print_debug("dump_mem:");
- for (i = start; i < end; i++) {
- if ((i & 0xf) == 0) {
- printk(BIOS_DEBUG, "\n%08x:", i);
- }
- printk(BIOS_DEBUG, " %02x", (u8)*((u8 *)i));
- }
- print_debug("\n");
-}
-#endif
+#include <lib.h> /* used for hexdump for DUMP_ACPI_TABLES */
extern const unsigned char AmlCode[];
@@ -285,35 +269,35 @@ unsigned long write_acpi_tables(unsigned long start)
#if DUMP_ACPI_TABLES == 1
printk(BIOS_DEBUG, "rsdp\n");
- dump_mem(rsdp, ((void *)rsdp) + sizeof(acpi_rsdp_t));
+ hexdump(rsdp, sizeof(acpi_rsdp_t));
printk(BIOS_DEBUG, "rsdt\n");
- dump_mem(rsdt, ((void *)rsdt) + sizeof(acpi_rsdt_t));
+ hexdump(rsdt, sizeof(acpi_rsdt_t));
printk(BIOS_DEBUG, "madt\n");
- dump_mem(madt, ((void *)madt) + madt->header.length);
+ hexdump(madt, madt->header.length);
printk(BIOS_DEBUG, "srat\n");
- dump_mem(srat, ((void *)srat) + srat->header.length);
+ hexdump(srat, srat->header.length);
printk(BIOS_DEBUG, "slit\n");
- dump_mem(slit, ((void *)slit) + slit->header.length);
+ hexdump(slit, slit->header.length);
printk(BIOS_DEBUG, "alib\n");
- dump_mem(ssdt, ((void *)alib) + alib->length);
+ hexdump(ssdt, alib->length);
printk(BIOS_DEBUG, "ssdt\n");
- dump_mem(ssdt, ((void *)ssdt) + ssdt->length);
+ hexdump(ssdt, ssdt->length);
printk(BIOS_DEBUG, "ssdt2\n");
- dump_mem(ssdt2, ((void *)ssdt2) + ssdt2->length);
+ hexdump(ssdt2, ssdt2->length);
printk(BIOS_DEBUG, "fadt\n");
- dump_mem(fadt, ((void *)fadt) + fadt->header.length);
+ hexdump(fadt, fadt->header.length);
printk(BIOS_DEBUG, "hest\n");
- dump_mem(hest, ((void *)hest) + hest->header.length);
-#endif
+ hexdump(hest, hest->header.length);
+#endif /* DUMP_ACPI_TABLES */
printk(BIOS_INFO, "ACPI: done.\n");
return current;