iPXE
memsizes.h File Reference
#include <basemem.h>

Go to the source code of this file.

Functions

 FILE_LICENCE (GPL2_OR_LATER_OR_UBDL)
static unsigned int basememsize (void)
 Get size of base memory from BIOS free base memory counter.
unsigned int extmemsize (void)
 Get size of extended memory.

Function Documentation

◆ FILE_LICENCE()

FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL )

◆ basememsize()

unsigned int basememsize ( void )
inlinestatic

Get size of base memory from BIOS free base memory counter.

Return values
basememBase memory size, in kB

Definition at line 13 of file memsizes.h.

13 {
14 return get_fbms();
15}
static unsigned int get_fbms(void)
Read the BIOS free base memory counter.
Definition basemem.h:21

References get_fbms().

Referenced by int15_describe().

◆ extmemsize()

unsigned int extmemsize ( void )
extern

Get size of extended memory.

Return values
extmemExtended memory size, in kB

Note that this is only an approximation; for an accurate picture, use the E820 memory map obtained via memmap_describe();

Definition at line 159 of file int15.c.

159 {
160 unsigned int extmem_e801;
161 unsigned int extmem_88;
162
163 /* Try INT 15,e801 first, then fall back to INT 15,88 */
164 extmem_88 = extmemsize_88();
165 extmem_e801 = extmemsize_e801();
166 return ( extmem_e801 ? extmem_e801 : extmem_88 );
167}
static unsigned int extmemsize_e801(void)
Get size of extended memory via INT 15,e801.
Definition int15.c:82
static unsigned int extmemsize_88(void)
Get size of extended memory via INT 15,88.
Definition int15.c:139

References extmemsize_88(), and extmemsize_e801().

Referenced by int15_describe(), and nbi_process_segments().