mirror of
https://github.com/ipxe/ipxe
synced 2026-01-28 20:12:28 +03:00
[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>
This commit is contained in:
@@ -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 ( ®ion, "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 ( ®ion, "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 ( ®ion );
|
||||
DBGC_MEMMAP ( hdr, ®ion );
|
||||
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 ( ®ion, "FDTMEM relocating %#08lx => [%#08lx,%#08lx]\n",
|
||||
DBGC ( hdr, "FDTMEM relocating %#08lx => [%#08lx,%#08lx]\n",
|
||||
old, new, ( ( physaddr_t ) ( new + len - 1 ) ) );
|
||||
return new;
|
||||
}
|
||||
|
||||
@@ -127,7 +127,7 @@ size_t memmap_largest ( physaddr_t *start ) {
|
||||
*start = 0;
|
||||
largest = 0;
|
||||
for_each_memmap ( ®ion, 1 ) {
|
||||
memmap_dump ( ®ion );
|
||||
DBGC_MEMMAP ( ®ion, ®ion );
|
||||
if ( ! memmap_is_usable ( ®ion ) )
|
||||
continue;
|
||||
size = memmap_size ( ®ion );
|
||||
|
||||
Reference in New Issue
Block a user