aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Brown <mcb30@ipxe.org>2021-02-28 23:58:06 +0000
committerMichael Brown <mcb30@ipxe.org>2021-02-28 23:58:06 +0000
commit0956fb52c4d435701749bf2eff0d1b171361e0f1 (patch)
tree29ace2fc979467caa2d4f9a9024906be585e08ed
parentf309d7a7b78eec10621bc71f9401d5b9257f9f39 (diff)
downloadipxe-0956fb52c4d435701749bf2eff0d1b171361e0f1.zip
ipxe-0956fb52c4d435701749bf2eff0d1b171361e0f1.tar.gz
ipxe-0956fb52c4d435701749bf2eff0d1b171361e0f1.tar.bz2
[acpi] Use a fixed colour for debug messages
Signed-off-by: Michael Brown <mcb30@ipxe.org>
-rw-r--r--src/core/acpi.c21
1 files changed, 12 insertions, 9 deletions
diff --git a/src/core/acpi.c b/src/core/acpi.c
index e6912af..19b7082 100644
--- a/src/core/acpi.c
+++ b/src/core/acpi.c
@@ -35,6 +35,9 @@ FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
*
*/
+/** Colour for debug messages */
+#define colour FADT_SIGNATURE
+
/******************************************************************************
*
* Utility functions
@@ -106,17 +109,17 @@ userptr_t acpi_find ( uint32_t signature, unsigned int index ) {
/* Read RSDT header */
copy_from_user ( &acpi, rsdt, 0, sizeof ( acpi ) );
if ( acpi.signature != cpu_to_le32 ( RSDT_SIGNATURE ) ) {
- DBGC ( rsdt, "RSDT %#08lx has invalid signature:\n",
+ DBGC ( colour, "RSDT %#08lx has invalid signature:\n",
user_to_phys ( rsdt, 0 ) );
- DBGC_HDA ( rsdt, user_to_phys ( rsdt, 0 ), &acpi,
+ DBGC_HDA ( colour, user_to_phys ( rsdt, 0 ), &acpi,
sizeof ( acpi ) );
return UNULL;
}
len = le32_to_cpu ( acpi.length );
if ( len < sizeof ( rsdtab->acpi ) ) {
- DBGC ( rsdt, "RSDT %#08lx has invalid length:\n",
+ DBGC ( colour, "RSDT %#08lx has invalid length:\n",
user_to_phys ( rsdt, 0 ) );
- DBGC_HDA ( rsdt, user_to_phys ( rsdt, 0 ), &acpi,
+ DBGC_HDA ( colour, user_to_phys ( rsdt, 0 ), &acpi,
sizeof ( acpi ) );
return UNULL;
}
@@ -147,20 +150,20 @@ userptr_t acpi_find ( uint32_t signature, unsigned int index ) {
/* Check table integrity */
if ( acpi_checksum ( table ) != 0 ) {
- DBGC ( rsdt, "RSDT %#08lx found %s with bad checksum "
- "at %08lx\n", user_to_phys ( rsdt, 0 ),
+ DBGC ( colour, "RSDT %#08lx found %s with bad "
+ "checksum at %08lx\n", user_to_phys ( rsdt, 0 ),
acpi_name ( signature ),
user_to_phys ( table, 0 ) );
break;
}
- DBGC ( rsdt, "RSDT %#08lx found %s at %08lx\n",
+ DBGC ( colour, "RSDT %#08lx found %s at %08lx\n",
user_to_phys ( rsdt, 0 ), acpi_name ( signature ),
user_to_phys ( table, 0 ) );
return table;
}
- DBGC ( rsdt, "RSDT %#08lx could not find %s\n",
+ DBGC ( colour, "RSDT %#08lx could not find %s\n",
user_to_phys ( rsdt, 0 ), acpi_name ( signature ) );
return UNULL;
}
@@ -288,7 +291,7 @@ int acpi_sx ( uint32_t signature ) {
return sx;
}
- DBGC ( rsdt, "RSDT %#08lx could not find \\_Sx \"%s\"\n",
+ DBGC ( colour, "RSDT %#08lx could not find \\_Sx \"%s\"\n",
user_to_phys ( rsdt, 0 ), acpi_name ( signature ) );
return -ENOENT;
}