[pcbios] Always show INT 15,88 result under DEBUG=memmap
authorMichael Brown <mcb30@ipxe.org>
Sat, 24 Apr 2010 20:52:48 +0000 (21:52 +0100)
committerStefan Hajnoczi <stefanha@gmail.com>
Wed, 7 Jul 2010 19:14:36 +0000 (20:14 +0100)
Always call INT 15,88 even if we don't use the result.  This allows
DEBUG=memmap to show the complete result set returned by all of the
INT 15 memory-map calls.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com>
src/arch/i386/firmware/pcbios/memmap.c

index 8a30dba..fcb501d 100644 (file)
@@ -139,13 +139,13 @@ static unsigned int extmemsize_88 ( void ) {
  * use the E820 memory map obtained via get_memmap();
  */
 unsigned int extmemsize ( void ) {
-       unsigned int extmem;
+       unsigned int extmem_e801;
+       unsigned int extmem_88;
 
        /* Try INT 15,e801 first, then fall back to INT 15,88 */
-       extmem = extmemsize_e801();
-       if ( ! extmem )
-               extmem = extmemsize_88();
-       return extmem;
+       extmem_88 = extmemsize_88();
+       extmem_e801 = extmemsize_e801();
+       return ( extmem_e801 ? extmem_e801 : extmem_88 );
 }
 
 /**