Loading...
Searching...
No Matches
L4::Kip::Mem_desc Class Reference
Base API » Kernel Interface Page

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

`#include <kip>`

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...
enum | Arch_sub_type_common { Arch_acpi_tables = 3 , Arch_acpi_nvs = 4 }
| Common sub types across all architectures for the Mem_type::Arch type. More...

## Public Member Functions

| Mem_desc (unsigned long start, unsigned long end, Mem_type t, unsigned char st=0, bool virt=false, bool eager=false) noexcept
| Initialize memory descriptor.
unsigned long | start () const noexcept
| Return start address of memory descriptor.
unsigned long | end () const noexcept
| Return end address of memory descriptor.
unsigned long | size () const noexcept
| Return size of region described by the memory descriptor.
Mem_type | type () const noexcept
| Return type of the memory descriptor.
unsigned char | sub_type () const noexcept
| Return sub-type of the memory descriptor.
unsigned | is_virtual () const noexcept
| Return whether the memory descriptor describes a virtual or physical region.
unsigned | eager_map () const noexcept
| Return whether the region shall be eligible for eager mapping in sigma0 or the root task.
void | set (unsigned long start, unsigned long end, Mem_type t, unsigned char st=0, bool virt=false, bool eager=false) noexcept
| Set values of a memory descriptor.

## Static Public Member Functions

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

## Detailed Description

Memory descriptors stored in the kernel interface page.

Include File
  #include <l4/sys/kip>
  kip

Definition at line 42 of file kip.

## Member Enumeration Documentation

## Arch_sub_type_common

enum L4::Kip::Mem_desc::Arch_sub_type_common

Common sub types across all architectures for the Mem_type::Arch type.

Enumerator
Arch_acpi_tables | Firmware ACPI tables.
Arch_acpi_nvs | Firmware reserved address space.

Definition at line 72 of file kip.

## Info_sub_type

enum L4::Kip::Mem_desc::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 64 of file kip.

## Mem_type

enum L4::Kip::Mem_desc::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 48 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,
|  | bool | eager = false )

inlinenoexcept

Initialize memory descriptor.

Parameters

  start | Start address
  end | End address
  t | Memory type
  st | Memory subtype, defaults to 0
  virt | True for virtual memory, false for physical memory, defaults to physical
  eager | The region shall be eligible for eager mapping in sigma0 or the root task. This is just an optimization to prevent on-demand paging.

Definition at line 158 of file kip.

References end(), and start().

Referenced by first().

Here is the call graph for this function:
Here is the caller graph for this function:

## Member Function Documentation

## all() [1/2]

cxx::static_vector< Mem_desc > L4::Kip::Mem_desc::all | ( | l4_kernel_info_t * | kip | ) |

inlinestatic

Return enumerable list of memory descriptors.

Parameters

  kip | Pointer to the kernel info page.

Definition at line 139 of file kip.

References count(), and first().

Here is the call graph for this function:

## all() [2/2]

cxx::static_vector< Mem_desc const > L4::Kip::Mem_desc::all | ( | l4_kernel_info_t const * | kip | ) |

inlinestatic

Return enumerable list of memory descriptors.

Parameters

  kip | Pointer to the kernel info page.

Definition at line 128 of file kip.

References count(), and first().

Here is the call graph for this function:

## count() [1/2]

void L4::Kip::Mem_desc::count | ( | l4_kernel_info_t * | kip,
|  | unsigned | count )

inlinestaticnoexcept

Set number of memory descriptors.

Parameters

  kip | Pointer to the kernel info page
  count | Number of memory descriptors

Definition at line 118 of file kip.

References count().

Here is the call graph for this function:

## count() [2/2]

unsigned long L4::Kip::Mem_desc::count | ( | l4_kernel_info_t const * | kip | ) |

inlinestaticnoexcept

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

Parameters

  kip | Pointer to the kernel info page

Returns
  Number of memory descriptors in the kernel info page.

Definition at line 107 of file kip.

Referenced by all(), all(), and count().

Here is the caller graph for this function:

## end()

unsigned long L4::Kip::Mem_desc::end | ( |  | ) | const

inlinenoexcept

Return end address of memory descriptor.

Returns
  End address of memory descriptor

Definition at line 177 of file kip.

Referenced by Mem_desc(), set(), and size().

Here is the caller graph for this function:

## first()

Mem_desc * L4::Kip::Mem_desc::first | ( | l4_kernel_info_t * | kip | ) |

inlinestaticnoexcept

Get first memory descriptor.

Parameters

  kip | Pointer to the kernel info page

Returns
  First memory descriptor stored in the kernel info page

Definition at line 89 of file kip.

References Mem_desc().

Referenced by all(), and all().

Here is the call graph for this function:
Here is the caller graph for this function:

## is_virtual()

unsigned L4::Kip::Mem_desc::is_virtual | ( |  | ) | const

inlinenoexcept

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

Returns
  True for virtual region, false for physical region.

Definition at line 209 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,
|  | bool | eager = false )

inlinenoexcept

Set values of a memory descriptor.

Parameters

  start | Start address
  end | End address
  t | Memory type
  st | Sub-type, defaults to 0
  virt | Virtual or physical memory region, defaults to physical
  eager | The region shall be eligible for eager mapping in sigma0 or the root task. This is just an optimization to prevent on-demand paging.

Definition at line 229 of file kip.

References end(), and start().

Here is the call graph for this function:

## size()

unsigned long L4::Kip::Mem_desc::size | ( |  | ) | const

inlinenoexcept

Return size of region described by the memory descriptor.

Returns
  Size of the region described by the memory descriptor

Definition at line 184 of file kip.

References end(), and start().

Here is the call graph for this function:

## start()

unsigned long L4::Kip::Mem_desc::start | ( |  | ) | const

inlinenoexcept

Return start address of memory descriptor.

Returns
  Start address of memory descriptor

Definition at line 170 of file kip.

Referenced by Mem_desc(), set(), and size().

Here is the caller graph for this function:

## sub_type()

unsigned char L4::Kip::Mem_desc::sub_type | ( |  | ) | const

inlinenoexcept

Return sub-type of the memory descriptor.

Returns
  Sub-type of the memory descriptor

Definition at line 201 of file kip.

## type()

Mem_type L4::Kip::Mem_desc::type | ( |  | ) | const

inlinenoexcept

Return type of the memory descriptor.

Returns
  Type of the memory descriptor

Definition at line 191 of file kip.

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

- l4/sys/kip