summaryrefslogtreecommitdiffstats
path: root/src/image
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/image
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/image')
-rw-r--r--src/image/lkrn.c2
-rw-r--r--src/image/segment.c10
2 files changed, 6 insertions, 6 deletions
diff --git a/src/image/lkrn.c b/src/image/lkrn.c
index 8a7c577cd..a2044cb82 100644
--- a/src/image/lkrn.c
+++ b/src/image/lkrn.c
@@ -102,7 +102,7 @@ static int lkrn_ram ( struct image *image, struct lkrn_context *ctx ) {
/* Locate start of RAM */
for_each_memmap ( &region, 0 ) {
- memmap_dump ( &region );
+ DBGC_MEMMAP ( image, &region );
if ( ! ( region.flags & MEMMAP_FL_MEMORY ) )
continue;
ctx->ram = region.min;
diff --git a/src/image/segment.c b/src/image/segment.c
index 469a66321..d90da709c 100644
--- a/src/image/segment.c
+++ b/src/image/segment.c
@@ -65,11 +65,11 @@ int prep_segment ( void *segment, size_t filesz, size_t memsz ) {
physaddr_t end = ( start + memsz );
physaddr_t max;
- DBGC ( &region, "SEGMENT [%#08lx,%#08lx,%#08lx)\n", start, mid, end );
+ DBGC ( segment, "SEGMENT [%#08lx,%#08lx,%#08lx)\n", start, mid, end );
/* Check for malformed lengths */
if ( filesz > memsz ) {
- DBGC ( &region, "SEGMENT [%#08lx,%#08lx,%#08lx) is "
+ DBGC ( segment, "SEGMENT [%#08lx,%#08lx,%#08lx) is "
"malformed\n", start, mid, end );
return -EINVAL;
}
@@ -81,18 +81,18 @@ int prep_segment ( void *segment, size_t filesz, size_t memsz ) {
/* Check for address space overflow */
if ( max < start ) {
- DBGC ( &region, "SEGMENT [%#08lx,%#08lx,%#08lx) wraps "
+ DBGC ( segment, "SEGMENT [%#08lx,%#08lx,%#08lx) wraps "
"around\n", start, mid, end );
return -EINVAL;
}
/* Describe region containing this segment */
memmap_describe ( start, 1, &region );
- memmap_dump ( &region );
+ DBGC_MEMMAP ( segment, &region );
/* Fail unless region is usable and sufficiently large */
if ( ( ! memmap_is_usable ( &region ) ) || ( region.max < max ) ) {
- DBGC ( &region, "SEGMENT [%#08lx,%#08lx,%#08lx) does not fit "
+ DBGC ( segment, "SEGMENT [%#08lx,%#08lx,%#08lx) does not fit "
"into available memory\n", start, mid, end );
return -ERANGE_SEGMENT;
}