Multiboot::Memory Class Reference

Memory Map. More...

#include <data.h>

Public Member Functions

void * getStartAddress () const
 Get start of this memory area. More...
void * getEndAddress () const
 Get end of this memory area. More...
bool isAvailable () const
 Is the memory marked as usable. More...
MemorygetNext () const
 Get the next memory area. More...

Private Types

enum  Type : uint32_t {
  AVAILABLE = 1 , RESERVED = 2 , ACPI = 3 , NVS = 4 ,
  BADRAM = 5
 Usage Type. More...

Private Attributes

uint32_t size
 Size of this entry (can exceed size of the class, rest will be padding bits)
uint64_t addr
 Begin of memory area.
uint64_t len
 length of the memory area

Detailed Description

Memory Map.

The boot loader queries the BIOS for a memory map and stores its result in (something like) a linked list. However, this list may not be complete, can have contradictory entries and does not take the location of your kernel or any boot modules into account. (Anyways, it is still the best memory map you will have in StuBS...)

Needs to be enabled explicitly by setting the MULTIBOOT_MEMORY_INFO flag in the multiboot header (see boot/multiboot/!
See also
Detecting Memory

Member Enumeration Documentation

◆ Type

enum Multiboot::Memory::Type : uint32_t

Usage Type.


Memory is available and usable in kernel.


Memory is reserved (without further explanation)


Memory may be reclaimed by ACPI.


Memory is non volatile storage for ACPI.


Area contains bad memory.

Member Function Documentation

◆ getEndAddress()

void * Multiboot::Memory::getEndAddress ( ) const

Get end of this memory area.

Pointer beyond the physical address of this memory area

◆ getNext()

Memory * Multiboot::Memory::getNext ( ) const

Get the next memory area.

pointer to the next memory area entry

◆ getStartAddress()

void * Multiboot::Memory::getStartAddress ( ) const

Get start of this memory area.

Pointer to begin of the physical address of the memory area

◆ isAvailable()

bool Multiboot::Memory::isAvailable ( ) const

Is the memory marked as usable.

true if available, false if not usable.

The documentation for this class was generated from the following files: