david/ipxe
Archived
1
0
This repository has been archived on 2020-12-06. You can view files and clone it, but cannot push or open issues or pull requests.
ipxe/src/arch/i386/include/basemem.h
Michael Brown 0b0e34e667 Provide {get,set}_fbms() in basemem.h.
set_fbms() will also update the E820 hidden region.
2007-01-13 23:57:31 +00:00

34 lines
594 B
C

#ifndef _BASEMEM_H
#define _BASEMEM_H
/** @file
*
* Base memory allocation
*
*/
#include <stdint.h>
#include <realmode.h>
#include <bios.h>
/**
* Read the BIOS free base memory counter
*
* @ret fbms Free base memory counter (in kB)
*/
static inline unsigned int get_fbms ( void ) {
uint16_t fbms;
get_real ( fbms, BDA_SEG, BDA_FBMS );
return fbms;
}
extern void set_fbms ( unsigned int new_fbms );
/* Actually in hidemem.c, but putting it here avoids polluting the
* architecture-independent include/hidemem.h.
*/
extern void hide_basemem ( void );
#endif /* _BASEMEM_H */