Barrelfish
Functions
syscall.h File Reference

Arch-generic system calls implementation. More...

Functions

struct sysret sys_retype (struct capability *root, capaddr_t source_croot, capaddr_t source_cptr, gensize_t offset, enum objtype type, gensize_t objsize, size_t count, capaddr_t dest_cspace_ptr, capaddr_t dest_cnode_cptr, uint8_t dest_level, cslot_t dest_slot, bool from_monitor)
 
struct sysret sys_copy_or_mint (struct capability *root, capaddr_t dest_cspace_cptr, capaddr_t destcn_cptr, cslot_t dest_slot, capaddr_t source_croot_ptr, capaddr_t source_cptr, uint8_t destcn_level, uint8_t source_level, uintptr_t param1, uintptr_t param2, bool mint)
 
struct sysret sys_idcap_identify (struct capability *cap, idcap_id_t *id)
 
struct sysret sys_monitor_spawn_core (hwid_t core_id, enum cpu_type cpu_type, genvaddr_t entry, genpaddr_t context_id)
 
struct sysret sys_monitor_is_retypeable (struct capability *source, gensize_t offset, gensize_t objsize, size_t count)
 Check whether source has overlapping descendants.
 

Detailed Description

Arch-generic system calls implementation.

Function Documentation

struct sysret sys_copy_or_mint ( struct capability *  root,
capaddr_t  dest_cspace_cptr,
capaddr_t  destcn_cptr,
cslot_t  dest_slot,
capaddr_t  source_croot_ptr,
capaddr_t  source_cptr,
uint8_t  destcn_level,
uint8_t  source_level,
uintptr_t  param1,
uintptr_t  param2,
bool  mint 
)

Common code for copying and minting except the mint flag and param passing

Parameters
rootSource cspace root cnode
dest_cspace_cptrDestination cspace root cnode cptr in source cspace destcn_cptr Destination cnode cptr relative to destination cspace
dest_slotDestination slot
source_cptrSource capability cptr relative to source cspace
destcn_levelLevel/depth of destination cnode
source_levelLevel/depth of source cap
param1First parameter for mint
param2Second parameter for mint
mintCall is a minting operation
struct sysret sys_idcap_identify ( struct capability *  cap,
idcap_id_t *  id 
)

The format of the returned ID is:


| 0 (unused) | coreid | core_local_id |

63 39 31 0 Bit

struct sysret sys_monitor_spawn_core ( hwid_t  target,
enum cpu_type cpu_type  ,
genvaddr_t  entry,
genpaddr_t  context 
)

Calls correct handler function to spawn an app core.

At the moment spawn_core_handlers is set-up per architecture inside text_init() usually found in init.c.

Note
Generally the x86 terms of BSP and APP core are used throughout Barrelfish to distinguish between bootstrap core (BSP) and application cores (APP).
Parameters
core_idIdentifier of the core which we want to boot
cpu_typeArchitecture of the core.
entryEntry point for code to start execution.
Return values
SYS_ERR_OKCore successfully booted.
SYS_ERR_ARCHITECTURE_NOT_SUPPORTEDNo handler registered for the specified cpu_type.
SYS_ERR_CORE_NOT_FOUNDCore failed to boot.
struct sysret sys_retype ( struct capability *  root,
capaddr_t  source_croot,
capaddr_t  source_cptr,
gensize_t  offset,
enum objtype  type,
gensize_t  objsize,
size_t  count,
capaddr_t  dest_cspace_cptr,
capaddr_t  dest_cnode_cptr,
uint8_t  dest_cnode_level,
cslot_t  dest_slot,
bool  from_monitor 
)
Parameters
rootSource CSpace root cnode to invoke
source_crootSource capability cspace root
source_cptrSource capability cptr
offsetOffset into source capability from which to retype
typeType to retype to
objsizeObject size for variable-sized types
countnumber of objects to create
dest_cspace_cptrDestination CSpace cnode cptr relative to source cspace root
dest_cnode_cptrDestination cnode cptr
dest_slotDestination slot number
dest_cnode_levelLevel/depth of destination cnode