L4Re Operating System Framework
Interface and Usage Documentation
|
Memory related constants, data types and functions. More...
Macros | |
#define | L4_PAGESIZE |
Minimal page size (in bytes). | |
#define | L4_PAGEMASK |
Mask for the page number. | |
#define | L4_LOG2_PAGESIZE |
Number of bits used for page offset. | |
#define | L4_SUPERPAGESIZE |
Size of a large page. | |
#define | L4_SUPERPAGEMASK |
Mask for the number of a large page. | |
#define | L4_LOG2_SUPERPAGESIZE |
Number of bits used as offset for a large page. | |
#define | L4_INVALID_PTR ((void *)L4_INVALID_ADDR) |
Invalid address as pointer type. | |
#define | L4_PAGESHIFT 12 |
Size of a page, log2-based. | |
#define | L4_SUPERPAGESHIFT 21 |
Size of a large page, log2-based. | |
#define | L4_PAGESHIFT 12 |
Size of a page, log2-based. | |
#define | L4_SUPERPAGESHIFT 21 |
Size of a large page, log2-based. | |
#define | L4_PAGESHIFT 12 |
Size of a page log2-based. | |
#define | L4_SUPERPAGESHIFT 22 |
Size of a large page log2-based. | |
Enumerations | |
enum | l4_addr_consts_t { L4_INVALID_ADDR = ~0UL } |
Address related constants. More... | |
Functions | |
l4_addr_t | l4_trunc_page (l4_addr_t address) L4_NOTHROW |
Round an address down to the next lower page boundary. | |
l4_addr_t | l4_trunc_size (l4_addr_t address, unsigned char bits) L4_NOTHROW |
Round an address down to the next lower flex page with size bits. | |
l4_addr_t | l4_round_page (l4_addr_t address) L4_NOTHROW |
Round address up to the next page. | |
l4_addr_t | l4_round_size (l4_addr_t value, unsigned char bits) L4_NOTHROW |
Round value up to the next alignment with bits size. | |
unsigned | l4_bytes_to_mwords (unsigned size) L4_NOTHROW |
Determine how many machine words (l4_umword_t) are required to store a buffer of 'size' bytes. | |
Memory related constants, data types and functions.
#define L4_LOG2_PAGESIZE |
#define L4_LOG2_SUPERPAGESIZE |
#define L4_PAGEMASK |
#define L4_PAGESHIFT 12 |
#define L4_PAGESHIFT 12 |
Size of a page, log2-based.
Size of a page log2-based.
#define L4_SUPERPAGEMASK |
#define L4_SUPERPAGESHIFT 21 |
#define L4_SUPERPAGESHIFT 21 |
Size of a large page, log2-based.
Size of a large page log2-based.
#define L4_SUPERPAGESIZE |
enum l4_addr_consts_t |
|
inline |
Determine how many machine words (l4_umword_t) are required to store a buffer of 'size' bytes.
size | The number of bytes to be translated into machine words. |
Definition at line 485 of file consts.h.
Referenced by __kdebug_3_text(), __kdebug_text(), and l4_vcon_send_u().
Round address up to the next page.
The address is rounded up to the next minimal page boundary. On most architectures this is a 4k page. Check L4_PAGESIZE for the minimal page size.
address | The address to round up. |
Definition at line 462 of file consts.h.
References L4_PAGEMASK, and L4_PAGESIZE.
Referenced by L4virtio::Svr::Driver_mem_region_t< DATA >::Driver_mem_region_t(), L4Re::Util::Dataspace_svr::map(), and L4virtio::Driver::Block_device::setup_device().
Round value up to the next alignment with bits size.
value | The value to round up to the next size-alignment. |
bits | The size of the alignment (log2). |
Definition at line 473 of file consts.h.
Referenced by cxx::List_alloc::alloc_max(), L4virtio::Driver::Virtio_net_device::setup_device(), L4virtio::Driver::Block_device::setup_device(), L4virtio::Virtqueue::setup_simple(), and L4virtio::Virtqueue::total_size().
Round an address down to the next lower page boundary.
The address is rounded down to the next lower minimal page boundary. On most architectures this is a 4k page. Check L4_PAGESIZE for the minimal page size.
address | The address to round. |
Definition at line 437 of file consts.h.
References L4_PAGEMASK.
Referenced by l4_touch_ro(), l4_touch_rw(), and L4Re::Util::Dataspace_svr::map().
Round an address down to the next lower flex page with size bits.
address | The address to round. |
bits | The size of the flex page (log2). |
Definition at line 448 of file consts.h.
Referenced by cxx::List_alloc::alloc_max(), l4_fpage_max_order(), and L4Re::Util::Dataspace_svr::map().