diff options
| author | Michael Brown | 2025-05-15 18:09:35 +0200 |
|---|---|---|
| committer | Michael Brown | 2025-05-16 17:18:36 +0200 |
| commit | a353e70800e5416c94af42f9abbf0a3b0f8564f5 (patch) | |
| tree | fde72cdae6756d65fd9835cb8ff6dd5b4d2c7d2e /src | |
| parent | [bios] Describe umalloc() heap as an in-use memory area (diff) | |
| download | ipxe-a353e70800e5416c94af42f9abbf0a3b0f8564f5.tar.gz ipxe-a353e70800e5416c94af42f9abbf0a3b0f8564f5.tar.xz ipxe-a353e70800e5416c94af42f9abbf0a3b0f8564f5.zip | |
[memmap] Use memmap_dump_all() to dump debug memory maps
There are several places where get_memmap() is called solely to
produce debug output. Replace these with calls to memmap_dump_all()
(which will be a no-op unless debugging is enabled).
Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src')
| -rw-r--r-- | src/arch/x86/interface/pcbios/hidemem.c | 10 | ||||
| -rw-r--r-- | src/arch/x86/interface/pcbios/int13.c | 5 |
2 files changed, 6 insertions, 9 deletions
diff --git a/src/arch/x86/interface/pcbios/hidemem.c b/src/arch/x86/interface/pcbios/hidemem.c index d00c02fb6..4b80de076 100644 --- a/src/arch/x86/interface/pcbios/hidemem.c +++ b/src/arch/x86/interface/pcbios/hidemem.c @@ -164,20 +164,19 @@ void int15_intercept ( int intercept ) { * returned by the BIOS. */ static void hide_etherboot ( void ) { - struct memory_map memmap; unsigned int rm_ds_top; unsigned int rm_cs_top; unsigned int fbms; /* Dump memory map before mangling */ DBG ( "Hiding iPXE from system memory map\n" ); - get_memmap ( &memmap ); + memmap_dump_all ( 1 ); /* Hook in fake E820 map, if we're testing one */ if ( FAKE_E820 ) { DBG ( "Hooking in fake E820 map\n" ); fake_e820(); - get_memmap ( &memmap ); + memmap_dump_all ( 1 ); } /* Initialise the hidden regions */ @@ -210,7 +209,7 @@ static void hide_etherboot ( void ) { /* Dump memory map after mangling */ DBG ( "Hidden iPXE from system memory map\n" ); - get_memmap ( &memmap ); + memmap_dump_all ( 1 ); } /** @@ -220,7 +219,6 @@ static void hide_etherboot ( void ) { * possible. */ static void unhide_etherboot ( int flags __unused ) { - struct memory_map memmap; int rc; /* If we have more than one hooked interrupt at this point, it @@ -251,7 +249,7 @@ static void unhide_etherboot ( int flags __unused ) { /* Dump memory map after unhiding */ DBG ( "Unhidden iPXE from system memory map\n" ); - get_memmap ( &memmap ); + memmap_dump_all ( 1 ); } /** Hide Etherboot startup function */ diff --git a/src/arch/x86/interface/pcbios/int13.c b/src/arch/x86/interface/pcbios/int13.c index 045d78e8d..3fb25d261 100644 --- a/src/arch/x86/interface/pcbios/int13.c +++ b/src/arch/x86/interface/pcbios/int13.c @@ -31,12 +31,12 @@ FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL ); #include <errno.h> #include <assert.h> #include <ipxe/blockdev.h> -#include <ipxe/io.h> #include <ipxe/acpi.h> #include <ipxe/sanboot.h> #include <ipxe/device.h> #include <ipxe/pci.h> #include <ipxe/eltorito.h> +#include <ipxe/memmap.h> #include <realmode.h> #include <bios.h> #include <biosint.h> @@ -1523,7 +1523,6 @@ static int int13_load_eltorito ( unsigned int drive, struct segoff *address ) { */ static int int13_boot ( unsigned int drive, struct san_boot_config *config __unused ) { - struct memory_map memmap; struct segoff address; int rc; @@ -1537,7 +1536,7 @@ static int int13_boot ( unsigned int drive, * many problems that turn out to be memory-map related that * it's worth doing. */ - get_memmap ( &memmap ); + memmap_dump_all ( 1 ); /* Jump to boot sector */ if ( ( rc = call_bootsector ( address.segment, address.offset, |
