2
0
mirror of https://github.com/xcat2/xNBA.git synced 2024-12-16 00:01:34 +00:00
xNBA/src/arch/i386/include/basemem.h

34 lines
594 B
C
Raw Normal View History

#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 */