iPXE
Functions
basemem.c File Reference

Base memory allocation. More...

#include <stdint.h>
#include <realmode.h>
#include <bios.h>
#include <basemem.h>
#include <ipxe/hidemem.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 ( GPL2_OR_LATER_OR_UBDL  )
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.

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

Referenced by undi_load(), and undi_unload().

                                        {
        uint16_t fbms = new_fbms;

        /* Update the BIOS memory counter */
        put_real ( fbms, BDA_SEG, BDA_FBMS );

        /* Update our hidden memory region map */
        hide_basemem();
}