iPXE
basemem.c File Reference

Base memory allocation. More...

#include <stdint.h>
#include <realmode.h>
#include <bios.h>
#include <basemem.h>
#include <ipxe/memmap.h>

Go to the source code of this file.

Functions

 FILE_LICENCE (GPL2_OR_LATER_OR_UBDL)
void set_fbms (unsigned int new_fbms)
 Set the BIOS free base memory counter.

Detailed Description

Base memory allocation.

Definition in file basemem.c.

Function Documentation

◆ FILE_LICENCE()

FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL )

◆ set_fbms()

void set_fbms ( unsigned int new_fbms)

Set the BIOS free base memory counter.

Parameters
new_fbmsNew free base memory counter (in kB)

Definition at line 43 of file basemem.c.

43 {
44 uint16_t fbms = new_fbms;
45
46 /* Update the BIOS memory counter */
47 put_real ( fbms, BDA_SEG, BDA_FBMS );
48
49 /* Update our hidden memory region map */
51}
unsigned short uint16_t
Definition stdint.h:11
#define BDA_SEG
Definition bios.h:6
#define BDA_FBMS
Definition bios.h:14
void hide_basemem(void)
Hide used base memory.
Definition hidemem.c:113
#define put_real
Definition libkir.h:150

References BDA_FBMS, BDA_SEG, hide_basemem(), and put_real.

Referenced by undi_load(), and undi_unload().