diff options
author | Michael Brown <mcb30@etherboot.org> | 2007-01-14 15:32:25 +0000 |
---|---|---|
committer | Michael Brown <mcb30@etherboot.org> | 2007-01-14 15:32:25 +0000 |
commit | b9f99858ab4d4addd79587ac9ea0e50f818986d4 (patch) | |
tree | f6e22f0d18c03313b34f43ddbe53dceafb3ac78a /src/arch/i386/firmware | |
parent | c1fd6e8dc732b5150b970684612efe0e40cc4253 (diff) | |
download | ipxe-b9f99858ab4d4addd79587ac9ea0e50f818986d4.tar.gz |
Make the getmemsize() prototype available in memsizes.h, for code that
doesn't want to go to the hassle of processing a full memory map.
Diffstat (limited to 'src/arch/i386/firmware')
-rw-r--r-- | src/arch/i386/firmware/pcbios/memmap.c | 19 |
1 files changed, 5 insertions, 14 deletions
diff --git a/src/arch/i386/firmware/pcbios/memmap.c b/src/arch/i386/firmware/pcbios/memmap.c index 6bbb22ac..7c1f3602 100644 --- a/src/arch/i386/firmware/pcbios/memmap.c +++ b/src/arch/i386/firmware/pcbios/memmap.c @@ -20,6 +20,7 @@ #include <errno.h> #include <realmode.h> #include <bios.h> +#include <memsizes.h> #include <gpxe/memmap.h> /** @@ -52,19 +53,6 @@ static struct e820_entry __data16 ( e820buf ); #define e820buf __use_data16 ( e820buf ) /** - * Get size of base memory from BIOS free base memory counter - * - * @ret basemem Base memory size, in kB - */ -static unsigned int basememsize ( void ) { - uint16_t basemem; - - get_real ( basemem, BDA_SEG, 0x0013 ); - DBG ( "Base memory size %dkB\n", basemem ); - return basemem; -} - -/** * Get size of extended memory via INT 15,e801 * * @ret extmem Extended memory size, in kB, or 0 @@ -120,8 +108,11 @@ static unsigned int extmemsize_88 ( void ) { * Get size of extended memory * * @ret extmem Extended memory size, in kB + * + * Note that this is only an approximation; for an accurate picture, + * use the E820 memory map obtained via get_memmap(); */ -static unsigned int extmemsize ( void ) { +unsigned int extmemsize ( void ) { unsigned int extmem; /* Try INT 15,e801 first, then fall back to INT 15,88 */ |