iPXE
basemem.h
Go to the documentation of this file.
00001 #ifndef _BASEMEM_H
00002 #define _BASEMEM_H
00003 
00004 /** @file
00005  *
00006  * Base memory allocation
00007  *
00008  */
00009 
00010 FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
00011 
00012 #include <stdint.h>
00013 #include <realmode.h>
00014 #include <bios.h>
00015 
00016 /**
00017  * Read the BIOS free base memory counter
00018  *
00019  * @ret fbms            Free base memory counter (in kB)
00020  */
00021 static inline unsigned int get_fbms ( void ) {
00022         uint16_t fbms;
00023 
00024         get_real ( fbms, BDA_SEG, BDA_FBMS );
00025         return fbms;
00026 }
00027 
00028 extern void set_fbms ( unsigned int new_fbms );
00029 
00030 /* Actually in hidemem.c, but putting it here avoids polluting the
00031  * architecture-independent include/hidemem.h.
00032  */
00033 extern void hide_basemem ( void );
00034 
00035 #endif /* _BASEMEM_H */