summaryrefslogtreecommitdiffstats
path: root/src/core
diff options
context:
space:
mode:
authorMichael Brown2025-05-25 13:06:53 +0200
committerMichael Brown2025-05-25 13:06:53 +0200
commit09140ab2c1a14b77d1e8beb407e500cb4deeb0ae (patch)
treef6ad7540a580a3b62541195ed1cedc5acceafa56 /src/core
parent[riscv] Support older SBI implementations (diff)
downloadipxe-09140ab2c1a14b77d1e8beb407e500cb4deeb0ae.tar.gz
ipxe-09140ab2c1a14b77d1e8beb407e500cb4deeb0ae.tar.xz
ipxe-09140ab2c1a14b77d1e8beb407e500cb4deeb0ae.zip
[memmap] Allow explicit colour selection for memory map debug messages
Provide DBGC_MEMMAP() as a replacement for memmap_dump(), allowing the colour used to match other messages within the same message group. Retain a dedicated colour for output from memmap_dump_all(), on the basis that it is generally most useful to visually compare full memory dumps against previous full memory dumps. Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/core')
-rw-r--r--src/core/fdtmem.c8
-rw-r--r--src/core/memmap.c2
2 files changed, 5 insertions, 5 deletions
diff --git a/src/core/fdtmem.c b/src/core/fdtmem.c
index bb8786d3c..fb44397af 100644
--- a/src/core/fdtmem.c
+++ b/src/core/fdtmem.c
@@ -273,7 +273,7 @@ physaddr_t fdtmem_relocate ( struct fdt_header *hdr, physaddr_t max ) {
/* Parse FDT */
if ( ( rc = fdt_parse ( &fdt, hdr, -1UL ) ) != 0 ) {
- DBGC ( &region, "FDTMEM could not parse FDT: %s\n",
+ DBGC ( hdr, "FDTMEM could not parse FDT: %s\n",
strerror ( rc ) );
/* Refuse relocation if we have no FDT */
return old;
@@ -282,7 +282,7 @@ physaddr_t fdtmem_relocate ( struct fdt_header *hdr, physaddr_t max ) {
/* Determine required length */
len = fdtmem_len ( &fdt );
assert ( len > 0 );
- DBGC ( &region, "FDTMEM requires %#zx + %#zx => %#zx bytes for "
+ DBGC ( hdr, "FDTMEM requires %#zx + %#zx => %#zx bytes for "
"relocation\n", memsz, fdt.len, len );
/* Construct memory map and choose a relocation address */
@@ -297,7 +297,7 @@ physaddr_t fdtmem_relocate ( struct fdt_header *hdr, physaddr_t max ) {
next = ( region.max + 1 );
/* Dump region descriptor (for debugging) */
- memmap_dump ( &region );
+ DBGC_MEMMAP ( hdr, &region );
assert ( region.max >= region.min );
/* Use highest possible region */
@@ -313,7 +313,7 @@ physaddr_t fdtmem_relocate ( struct fdt_header *hdr, physaddr_t max ) {
}
}
- DBGC ( &region, "FDTMEM relocating %#08lx => [%#08lx,%#08lx]\n",
+ DBGC ( hdr, "FDTMEM relocating %#08lx => [%#08lx,%#08lx]\n",
old, new, ( ( physaddr_t ) ( new + len - 1 ) ) );
return new;
}
diff --git a/src/core/memmap.c b/src/core/memmap.c
index 2939e855b..4a96055e6 100644
--- a/src/core/memmap.c
+++ b/src/core/memmap.c
@@ -127,7 +127,7 @@ size_t memmap_largest ( physaddr_t *start ) {
*start = 0;
largest = 0;
for_each_memmap ( &region, 1 ) {
- memmap_dump ( &region );
+ DBGC_MEMMAP ( &region, &region );
if ( ! memmap_is_usable ( &region ) )
continue;
size = memmap_size ( &region );