]> git.ipfire.org Git - thirdparty/ipxe.git/commitdiff
[memmap] Remove now-obsolete get_memmap()
authorMichael Brown <mcb30@ipxe.org>
Fri, 16 May 2025 17:13:38 +0000 (18:13 +0100)
committerMichael Brown <mcb30@ipxe.org>
Fri, 16 May 2025 17:16:41 +0000 (18:16 +0100)
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 <mcb30@ipxe.org>
src/core/memmap.c
src/include/ipxe/io.h

index a6ba5205e47dbc7bc7e03a182c80f66f8a75f395..5d81d99847652fc45b05ad70e0931f8551192751 100644 (file)
@@ -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 ( &region, 1 ) {
-               if ( memmap_is_usable ( &region ) ) {
-                       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 );
index fe138819104728a7ea12ce2a7205294a477fb70a..41ee48ffb8933713ef6a681c5899b089d3f6eef7 100644 (file)
@@ -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 */