--- qemu/roms/seabios/src/memmap.c 2018/04/24 17:36:47 1.1 +++ qemu/roms/seabios/src/memmap.c 2018/04/24 18:27:27 1.1.1.3 @@ -27,7 +27,7 @@ static void insert_e820(int i, u64 start, u64 size, u32 type) { if (e820_count >= CONFIG_MAX_E820) { - dprintf(1, "Overflowed e820 list!\n"); + warn_noalloc(); return; } @@ -42,7 +42,7 @@ insert_e820(int i, u64 start, u64 size, // Show the current e820_list. static void -dump_map() +dump_map(void) { dprintf(1, "e820 map has %d items:\n", e820_count); int i; @@ -119,33 +119,16 @@ add_e820(u64 start, u64 size, u32 type) //dump_map(); } -// Find highest area of 32bit memory that can hold the given size. -struct e820entry * -find_high_area(u32 size) -{ - int i; - for (i=e820_count-1; i>=0; i--) { - struct e820entry *e = &e820_list[i]; - u64 end = e->start + e->size; - if (e->type != E820_RAM || end > 0xffffffff || e->size < size) - continue; - if (end < 1024*1024 + size) - break; - return e; - } - return NULL; -} - // Prep for memmap stuff - init bios table locations. void -memmap_setup() +memmap_setup(void) { e820_count = 0; } // Report on final memory locations. void -memmap_finalize() +memmap_finalize(void) { dump_map(); }