aboutsummaryrefslogtreecommitdiffstats
path: root/gpxe/src/arch/i386/include/basemem.h
blob: cd5668e01ea0b567713bb7a506753b87b2602824 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#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 */