L4Re - L4 Runtime Environment
L4::Kip::Mem_desc Class Reference

Memory descriptors stored in the kernel interface page. More...

+ Collaboration diagram for L4::Kip::Mem_desc:

Public Types

enum  Mem_type {
  Undefined = 0x0, Conventional = 0x1, Reserved = 0x2, Dedicated = 0x3,
  Shared = 0x4, Info = 0xd, Bootloader = 0xe, Arch = 0xf
}
 Memory types. More...
 
enum  Info_sub_type { Info_acpi_rsdp = 0 }
 Memory sub types for the Mem_type::Info type. More...
 

Public Member Functions

 Mem_desc (unsigned long start, unsigned long end, Mem_type t, unsigned char st=0, bool virt=false) throw ()
 Initialize memory descriptor. More...
 
unsigned long start () const throw ()
 Return start address of memory descriptor. More...
 
unsigned long end () const throw ()
 Return end address of memory descriptor. More...
 
unsigned long size () const throw ()
 Return size of region described by the memory descriptor. More...
 
Mem_type type () const throw ()
 Return type of the memory descriptor. More...
 
unsigned char sub_type () const throw ()
 Return sub-type of the memory descriptor. More...
 
unsigned is_virtual () const throw ()
 Return whether the memory descriptor describes a virtual or physical region. More...
 
void set (unsigned long start, unsigned long end, Mem_type t, unsigned char st=0, bool virt=false) throw ()
 Set values of a memory descriptor. More...
 

Static Public Member Functions

static Mem_descfirst (void *kip) throw ()
 Get first memory descriptor. More...
 
static unsigned long count (void const *kip) throw ()
 Return number of memory descriptors stored in the kernel info page. More...
 
static void count (void *kip, unsigned count) throw ()
 Set number of memory descriptors. More...
 
static cxx::static_vector< Mem_desc const > all (void const *kip)
 Return enumerable list of memory descriptors. More...
 
static cxx::static_vector< Mem_descall (void *kip)
 Return enumerable list of memory descriptors. More...
 

Detailed Description

Memory descriptors stored in the kernel interface page.

Include File
#include <l4/sys/kip>

Definition at line 53 of file kip.

Member Enumeration Documentation

◆ Info_sub_type

Memory sub types for the Mem_type::Info type.

Enumerator
Info_acpi_rsdp 

Physical address of the ACPI root pointer.

Definition at line 75 of file kip.

◆ Mem_type

Memory types.

Enumerator
Undefined 

Undefined memory.

Conventional 

Conventional memory.

Reserved 

Reserved region, do not use this memory.

Dedicated 

Dedicated.

Shared 

Shared.

Info 

Info by boot loader.

Bootloader 

Memory belongs to the boot loader.

Arch 

Architecture specific memory.

Definition at line 59 of file kip.

Constructor & Destructor Documentation

◆ Mem_desc()

L4::Kip::Mem_desc::Mem_desc ( unsigned long  start,
unsigned long  end,
Mem_type  t,
unsigned char  st = 0,
bool  virt = false 
)
throw (
)
inline

Initialize memory descriptor.

Parameters
startStart address
endEnd address
tMemory type
stMemory subtype, defaults to 0
virtTrue for virtual memory, false for physical memory, defaults to physical

Definition at line 166 of file kip.

Member Function Documentation

◆ all() [1/2]

static cxx::static_vector<Mem_desc const> L4::Kip::Mem_desc::all ( void const *  kip)
inlinestatic

Return enumerable list of memory descriptors.

Parameters
kipPointer to the kernel info page.

Definition at line 139 of file kip.

◆ all() [2/2]

static cxx::static_vector<Mem_desc> L4::Kip::Mem_desc::all ( void *  kip)
inlinestatic

Return enumerable list of memory descriptors.

Parameters
kipPointer to the kernel info page.

Definition at line 150 of file kip.

◆ count() [1/2]

static unsigned long L4::Kip::Mem_desc::count ( void const *  kip)
throw (
)
inlinestatic

Return number of memory descriptors stored in the kernel info page.

Parameters
kipPointer to the kernel info page
Returns
Number of memory descriptors in the kernel info page.

Definition at line 116 of file kip.

◆ count() [2/2]

static void L4::Kip::Mem_desc::count ( void *  kip,
unsigned  count 
)
throw (
)
inlinestatic

Set number of memory descriptors.

Parameters
kipPointer to the kernel info page
countNumber of memory descriptors

Definition at line 128 of file kip.

◆ end()

unsigned long L4::Kip::Mem_desc::end ( ) const
throw (
)
inline

Return end address of memory descriptor.

Returns
End address of memory descriptor

Definition at line 184 of file kip.

◆ first()

static Mem_desc* L4::Kip::Mem_desc::first ( void *  kip)
throw (
)
inlinestatic

Get first memory descriptor.

Parameters
kipPointer to the kernel info page
Returns
First memory descriptor stored in the kernel info page

Definition at line 97 of file kip.

◆ is_virtual()

unsigned L4::Kip::Mem_desc::is_virtual ( ) const
throw (
)
inline

Return whether the memory descriptor describes a virtual or physical region.

Returns
True for virtual region, false for physical region.

Definition at line 213 of file kip.

◆ set()

void L4::Kip::Mem_desc::set ( unsigned long  start,
unsigned long  end,
Mem_type  t,
unsigned char  st = 0,
bool  virt = false 
)
throw (
)
inline

Set values of a memory descriptor.

Parameters
startStart address
endEnd address
tMemory type
stSub-type, defaults to 0
virtVirtual or physical memory region, defaults to physical

Definition at line 224 of file kip.

◆ size()

unsigned long L4::Kip::Mem_desc::size ( ) const
throw (
)
inline

Return size of region described by the memory descriptor.

Returns
Size of the region described by the memory descriptor

Definition at line 191 of file kip.

◆ start()

unsigned long L4::Kip::Mem_desc::start ( ) const
throw (
)
inline

Return start address of memory descriptor.

Returns
Start address of memory descriptor

Definition at line 177 of file kip.

◆ sub_type()

unsigned char L4::Kip::Mem_desc::sub_type ( ) const
throw (
)
inline

Return sub-type of the memory descriptor.

Returns
Sub-type of the memory descriptor

Definition at line 205 of file kip.

◆ type()

Mem_type L4::Kip::Mem_desc::type ( ) const
throw (
)
inline

Return type of the memory descriptor.

Returns
Type of the memory descriptor

Definition at line 198 of file kip.


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