Barrelfish
Functions
startup_x86.h File Reference

Startup prototypes. More...

Functions

errval_t startup_map_init (lvaddr_t vbase, lpaddr_t base, size_t size, uint32_t flags)
 Map init user-space memory. More...
 
errval_t startup_alloc_init (void *state, genvaddr_t gvbase, size_t size, uint32_t flags, void **ret)
 Map init user-space memory. More...
 
void create_module_caps (struct spawn_state *st)
 Setup the module cnode, which contains frame caps to all multiboot modules.
 

Detailed Description

Startup prototypes.

Function Documentation

errval_t startup_alloc_init ( void *  state,
genvaddr_t  gvbase,
size_t  size,
uint32_t  flags,
void **  ret 
)

Map init user-space memory.

This function maps pages of the init user-space module. It expects the virtual base address 'vbase' of a program segment of the init executable, its size 'size' and its ELF64 access control flags. It maps pages into physical memory that is allocated on the fly and puts corresponding frame caps into init's segcn.

Parameters
vbaseVirtual base address of program segment.
sizeSize of program segment in bytes.
flagsELF64 access control flags of program segment.
retUsed to return base region pointer
errval_t startup_map_init ( lvaddr_t  vbase,
lpaddr_t  base,
size_t  size,
uint32_t  flags 
)

Map init user-space memory.

This function maps pages of the init user-space module. It expects the virtual base address 'vbase' of a program segment of the init executable, its size 'size' and its ELF64 access control flags. It maps pages to the sequential area of physical memory, given by 'base'. If you want to allocate physical memory frames as you go, you better use startup_alloc_init().

Parameters
vbaseVirtual base address of program segment.
basePhysical base address of program segment.
sizeSize of program segment in bytes.
flagsELF64 access control flags of program segment.