From 83449702e09236dccebd4913d5823d5e00b643e0 Mon Sep 17 00:00:00 2001 From: Michael Brown Date: Fri, 16 May 2025 18:13:38 +0100 Subject: [PATCH] [memmap] Remove now-obsolete get_memmap() All memory map users have been updated to use the new system memory map API. Remove get_memmap() and its associated definitions. Signed-off-by: Michael Brown --- src/core/memmap.c | 24 ------------------------ src/include/ipxe/io.h | 26 -------------------------- 2 files changed, 50 deletions(-) diff --git a/src/core/memmap.c b/src/core/memmap.c index a6ba5205e..5d81d9984 100644 --- a/src/core/memmap.c +++ b/src/core/memmap.c @@ -111,29 +111,5 @@ void memmap_update_used ( struct memmap_region *region ) { } } -/** - * Get legacy system memory map - * - * @v memmap Legacy memory map to fill in - */ -void get_memmap ( struct memory_map *memmap ) { - struct memmap_region region; - struct memory_region *usable; - - /* Clear legacy memory map */ - memmap->count = 0; - - /* Populate legacy memory map */ - for_each_memmap ( ®ion, 1 ) { - if ( memmap_is_usable ( ®ion ) ) { - usable = &memmap->regions[memmap->count++]; - usable->start = region.addr; - usable->end = ( region.last + 1 ); - if ( memmap->count == MAX_MEMORY_REGIONS ) - break; - } - } -} - PROVIDE_MEMMAP_INLINE ( null, memmap_describe ); PROVIDE_MEMMAP_INLINE ( null, memmap_sync ); diff --git a/src/include/ipxe/io.h b/src/include/ipxe/io.h index fe1388191..41ee48ffb 100644 --- a/src/include/ipxe/io.h +++ b/src/include/ipxe/io.h @@ -484,30 +484,4 @@ void mb ( void ); #define rmb() mb() #define wmb() mb() -/** A usable memory region */ -struct memory_region { - /** Physical start address */ - uint64_t start; - /** Physical end address */ - uint64_t end; -}; - -/** Maximum number of memory regions we expect to encounter */ -#define MAX_MEMORY_REGIONS 8 - -/** A memory map */ -struct memory_map { - /** Memory regions */ - struct memory_region regions[MAX_MEMORY_REGIONS]; - /** Number of used regions */ - unsigned int count; -}; - -/** - * Get memory map - * - * @v memmap Memory map to fill in - */ -void get_memmap ( struct memory_map *memmap ); - #endif /* _IPXE_IO_H */