summaryrefslogtreecommitdiff
path: root/src/mainboard/hp
diff options
context:
space:
mode:
authorEdward O'Callaghan <eocallaghan@alterapraxis.com>2014-04-15 19:43:05 +1000
committerAlexandru Gagniuc <mr.nuke.me@gmail.com>2014-04-15 17:21:53 +0200
commit00b61460301514ea44d847f6b6617e5f9091a8cb (patch)
treeb3978a6bbc4b20c207978139ac893a951c12ccae /src/mainboard/hp
parentef4dcc09bbfbd7bb610ad51d6080fe01ace66dcc (diff)
downloadcoreboot-00b61460301514ea44d847f6b6617e5f9091a8cb.tar.xz
hp/pavilion_m6_1035dx: Use hexdump() for dumping ACPI tables
Following the rational of: 5188d40 jetway/nf81-t56n-lf: Use hexdump() for dumping ACPI tables Use "Debugging -> Output verbose ACPI debug messages" in menuconfig to toggle. Change-Id: Ibf03ef916a789d0f049190755213ba93191d4662 Signed-off-by: Edward O'Callaghan <eocallaghan@alterapraxis.com> Reviewed-on: http://review.coreboot.org/5507 Tested-by: build bot (Jenkins) Reviewed-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
Diffstat (limited to 'src/mainboard/hp')
-rw-r--r--src/mainboard/hp/pavilion_m6_1035dx/acpi_tables.c38
1 files changed, 11 insertions, 27 deletions
diff --git a/src/mainboard/hp/pavilion_m6_1035dx/acpi_tables.c b/src/mainboard/hp/pavilion_m6_1035dx/acpi_tables.c
index 1c1d94bdfa..63221ef981 100644
--- a/src/mainboard/hp/pavilion_m6_1035dx/acpi_tables.c
+++ b/src/mainboard/hp/pavilion_m6_1035dx/acpi_tables.c
@@ -28,23 +28,7 @@
#include <device/pci_ids.h>
#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 CONFIG_DEBUG_ACPI */
extern const unsigned char AmlCode[];
@@ -295,31 +279,31 @@ unsigned long write_acpi_tables(unsigned long start)
current += ssdt->length;
acpi_add_table(rsdp, ssdt);
-#if DUMP_ACPI_TABLES == 1
+#if defined(CONFIG_DEBUG_ACPI)
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, "ssdt\n");
- dump_mem(ssdt, ((void *)ssdt) + ssdt->length);
+ hexdump(ssdt, ssdt->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 /* CONFIG_DEBUG_ACPI */
printk(BIOS_INFO, "ACPI: done.\n");
return current;