L4Re Operating System Framework
Interface and Usage Documentation
Loading...
Searching...
No Matches
memdesc.h
Go to the documentation of this file.
1
6/*
7 * (c) 2007-2009 Adam Lackorzynski <adam@os.inf.tu-dresden.de>,
8 * Alexander Warg <warg@os.inf.tu-dresden.de>
9 * economic rights: Technische Universität Dresden (Germany)
10 *
11 * License: see LICENSE.spdx (in this directory or the directories above)
12 */
13#ifndef __L4SYS__MEMDESC_H__
14#define __L4SYS__MEMDESC_H__
15
16#include <l4/sys/kip.h>
17
28
45
58
68
69
84
85
93
101unsigned
103
116void
118 l4_addr_t start,
119 l4_addr_t end,
120 unsigned type,
121 unsigned virt,
122 unsigned sub_type) L4_NOTHROW;
123
133
143
153
166
176
177/*************************************************************************
178 * Implementations
179 *************************************************************************/
180
187
189unsigned
191{
192 return kip->mem_descs_num;
193}
194
196void
198 l4_addr_t start,
199 l4_addr_t end,
200 unsigned type,
201 unsigned virt,
202 unsigned sub_type) L4_NOTHROW
203{
204 md->l = (start & ~0x3ffUL) | (type & 0x0f) | ((sub_type << 4) & 0x0f0)
205 | (virt ? 0x200 : 0x0);
206 md->h = end;
207}
208
209
216
223
230
234{
235 return (md->l & 0xf0) >> 4;
236}
237
244
245#endif /* ! __L4SYS__MEMDESC_H__ */
unsigned long l4_umword_t
Unsigned machine word.
Definition l4int.h:40
unsigned long l4_addr_t
Address type.
Definition l4int.h:34
l4_umword_t l4_kernel_info_get_mem_desc_subtype(l4_kernel_info_mem_desc_t *md) L4_NOTHROW
Get sub-type of memory region.
Definition memdesc.h:233
l4_mem_archspecific_sub_type_common_t
Memory sub types for l4_mem_type_archspecific descriptors.
Definition memdesc.h:64
l4_kernel_info_mem_desc_t * l4_kernel_info_get_mem_descs(l4_kernel_info_t *kip) L4_NOTHROW
Get pointer to memory descriptors from KIP.
Definition memdesc.h:183
l4_mem_info_sub_type_t
Memory sub types for l4_mem_type_info descriptors.
Definition memdesc.h:51
l4_umword_t l4_kernel_info_get_mem_desc_is_virtual(l4_kernel_info_mem_desc_t *md) L4_NOTHROW
Get virtual flag of the memory descriptor.
Definition memdesc.h:240
void l4_kernel_info_set_mem_desc(l4_kernel_info_mem_desc_t *md, l4_addr_t start, l4_addr_t end, unsigned type, unsigned virt, unsigned sub_type) L4_NOTHROW
Populate a memory descriptor.
Definition memdesc.h:197
l4_umword_t l4_kernel_info_get_mem_desc_end(l4_kernel_info_mem_desc_t *md) L4_NOTHROW
Get end address of the region described by the memory descriptor.
Definition memdesc.h:219
unsigned l4_kernel_info_get_num_mem_descs(l4_kernel_info_t *kip) L4_NOTHROW
Get number of memory descriptors in KIP.
Definition memdesc.h:190
l4_mem_type_t
Type of a memory descriptor.
Definition memdesc.h:34
l4_umword_t l4_kernel_info_get_mem_desc_type(l4_kernel_info_mem_desc_t *md) L4_NOTHROW
Get type of the memory region.
Definition memdesc.h:226
l4_umword_t l4_kernel_info_get_mem_desc_start(l4_kernel_info_mem_desc_t *md) L4_NOTHROW
Get start address of the region described by the memory descriptor.
Definition memdesc.h:212
@ l4_mem_archspecific_acpi_tables
Firmware ACPI tables.
Definition memdesc.h:65
@ l4_mem_archspecific_acpi_nvs
Firmware reserved address space.
Definition memdesc.h:66
@ l4_mem_reserved_mmio
MMIO range reserved by kernel.
Definition memdesc.h:56
@ l4_mem_reserved_heap
Kernel heap.
Definition memdesc.h:55
@ l4_mem_info_acpi_rsdp
Physical address of the ACPI root pointer.
Definition memdesc.h:52
@ l4_mem_reserved_kernel
Kernel image.
Definition memdesc.h:54
@ l4_mem_type_archspecific
Architecture specific memory (e.g., ACPI memory).
Definition memdesc.h:43
@ l4_mem_type_conventional
Conventional memory.
Definition memdesc.h:36
@ l4_mem_type_info
Info from the boot loader.
Definition memdesc.h:41
@ l4_mem_type_undefined
Undefined, unused descriptor.
Definition memdesc.h:35
@ l4_mem_type_dedicated
Dedicated memory (some device memory).
Definition memdesc.h:38
@ l4_mem_type_reserved
Reserved memory for kernel etc.
Definition memdesc.h:37
@ l4_mem_type_bootloader
Memory owned by the boot loader.
Definition memdesc.h:42
@ l4_mem_type_shared
Shared memory (not implemented).
Definition memdesc.h:39
#define L4_NOTHROW
Mark a function declaration and definition as never throwing an exception.
Definition compiler.h:161
#define L4_INLINE
L4 Inline function attribute.
Definition compiler.h:51
Memory descriptor data structure.
Definition memdesc.h:78
L4 Kernel Interface Page.
Definition kip.h:37
Kernel Info Page access functions.