iPXE
arch
x86
include
basemem.h
Go to the documentation of this file.
1
#ifndef _BASEMEM_H
2
#define _BASEMEM_H
3
4
/** @file
5
*
6
* Base memory allocation
7
*
8
*/
9
10
FILE_LICENCE
( GPL2_OR_LATER_OR_UBDL );
11
12
#include <
stdint.h
>
13
#include <
realmode.h
>
14
#include <
bios.h
>
15
16
/**
17
* Read the BIOS free base memory counter
18
*
19
* @ret fbms Free base memory counter (in kB)
20
*/
21
static
inline
unsigned
int
get_fbms
(
void
) {
22
uint16_t
fbms;
23
24
get_real
( fbms,
BDA_SEG
,
BDA_FBMS
);
25
return
fbms;
26
}
27
28
extern
void
set_fbms
(
unsigned
int
new_fbms );
29
30
#endif
/* _BASEMEM_H */
uint16_t
unsigned short uint16_t
Definition:
stdint.h:11
FILE_LICENCE
FILE_LICENCE(GPL2_OR_LATER_OR_UBDL)
get_fbms
static unsigned int get_fbms(void)
Read the BIOS free base memory counter.
Definition:
basemem.h:21
BDA_FBMS
#define BDA_FBMS
Definition:
bios.h:14
get_real
#define get_real
Definition:
libkir.h:151
realmode.h
set_fbms
void set_fbms(unsigned int new_fbms)
Set the BIOS free base memory counter.
Definition:
basemem.c:43
BDA_SEG
#define BDA_SEG
Definition:
bios.h:6
stdint.h
bios.h
Generated by
1.8.15