Startup prototypes.
More...
typedef lpaddr_t(* alloc_phys_func) (size_t size) |
Linear physical memory allocator callback function.
This function allocates a linear region of addresses of size 'size' from physical memory.
- Parameters
-
size | Number of bytes to allocate. |
- Returns
- Base physical address of memory region.
lpaddr_t app_alloc_phys |
( |
size_t |
size | ) |
|
Allocate physical memory during kernel startup for application cores. Allocations are always rounded up to multiple pages.
- Parameters
-
size | The number of bytes to allocate. |
- Returns
- An lpaddr to the newly allocated physical memory.
lpaddr_t bsp_alloc_phys |
( |
size_t |
size | ) |
|
Linear physical memory allocator.
This function allocates a linear region of addresses of size 'size' from physical memory.
- Parameters
-
size | Number of bytes to allocate. |
- Returns
- Base physical address of memory region.
errval_t create_caps_to_cnode |
( |
lpaddr_t |
base_addr, |
|
|
size_t |
size, |
|
|
enum region_type |
type, |
|
|
struct spawn_state * |
st, |
|
|
struct bootinfo * |
bootinfo |
|
) |
| |
Create caps in 'cnode'.
This function creates untyped caps to the RAM at physical address 'base_addr' and size 'size' and adds them to a cnode for the init task. The bootinfo is updated accordingly.
- Parameters
-
base_addr | The physical base address of the RAM for which caps have to be created |
size | The size of the physical region |
type | Region type to create |
st | spawn_state structure to update |
bootinfo | bootinfo structure to update |
lpaddr_t bsp_init_alloc_addr |
The address from where bsp_alloc_phys will start allocating memory