Barrelfish
Macros | Functions | Variables
startup_x86.c File Reference

x86 kernel bootup code. More...

Macros

#define CNODE(cte)   get_address(&(cte)->cap)
 Quick way to find the base address of a cnode capability.
 
#define BSP_INIT_PROG_NAME   "init"
 

Functions

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.
 
void kernel_startup_early (void)
 Kernel's early startup code, called from arch-specific bootstrap.
 

Variables

struct globalglobal = &myglobal
 
bool verbose_dispatch
 Kernel's main startup code, called from arch-specific bootstrap. More...
 

Detailed Description

x86 kernel bootup code.

Macro Definition Documentation

#define BSP_INIT_PROG_NAME   "init"

Name of multiboot module containing program for init domains.

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

Variable Documentation

struct global* global = &myglobal

Each kernel has a local copy of global and locks. However, during booting and kernel relocation, these are set to point to global of the pristine kernel, so that all the kernels can share it.

bool verbose_dispatch

Kernel's main startup code, called from arch-specific bootstrap.

This function never returns.