Sigma0 protocol bindings


Functions

int l4sigma0_map_mem (l4_threadid_t pager, l4_addr_t phys, l4_addr_t virt, l4_addr_t size)
 Request a memory mapping from sigma0.
L4_CV int l4sigma0_map_iomem (l4_threadid_t pager, l4_addr_t phys, l4_addr_t virt, l4_addr_t size, int cached)
 Request IO memory from sigma0.
L4_CV int l4sigma0_map_anypage (l4_threadid_t pager, l4_addr_t map_area, unsigned log2_map_size, l4_addr_t *base)
 Request an arbitrary free page of RAM.

This function requests arbitrary free memory from sigma0. It should be used whenwever spare memory is needed, instead of requesting specific physical memory with l4sigma0_map_mem().

L4_CV int l4sigma0_map_tbuf (l4_threadid_t pager, l4_addr_t virt)
 Request Fiasco trace buffer.

This is a Fiasco specific feature. Where you can request the kernel internal trace buffer for user-level evaluation. This is for special debugging tools, such as Ferret.

L4_CV void l4sigma0_debug_dump (l4_threadid_t pager)
 Request sigma0 to dump internal debug information.

The debug information, such as internal memory maps, as well as statistics about the internal allocators is dumped to the kernel debugger.

L4_CV l4_threadid_t l4sigma0_id (void)
 Return L4 thread ID of sigma0 server.
static char const * l4sigma0_map_errstr (int err)
 Get a user readable error messages for the return codes.

Detailed Description


Function Documentation

int l4sigma0_map_mem ( l4_threadid_t  pager,
l4_addr_t  phys,
l4_addr_t  virt,
l4_addr_t  size 
)

Request a memory mapping from sigma0.

Parameters:
pager is usually the sigma0 thread id (2.0), however also roottask talks sigma0 protocol.
phys the physical address of the requested page (must be at least aligned to the minimum page size).
virt the virtual address where the paged should be mapped in the local address space (must be at least aligned to the minimum page size).
size the size of the requested page, this must be a multiple of the minimum page size.
Returns:
the error code of the operation, 0 means OK. (See l4sigma0_map_errstr() for details on the other return codes.)

L4_CV int l4sigma0_map_iomem ( l4_threadid_t  pager,
l4_addr_t  phys,
l4_addr_t  virt,
l4_addr_t  size,
int  cached 
)

Request IO memory from sigma0.

This function is similar to l4sigma0_map_mem(), the difference is that it requests IO memory. IO memory is everything that is not known to be normal RAM. Also ACPI tables or the BIOS memory is treated as IO memory.

Parameters:
pager usually the thread id of sigma0.
phys the physical address to be requested (page aligned).
virt the virtual address where the memory should be mapped to (page aligned).
size the size of the IO memory area to be mapped (multiple of page size)
cached requests cacheable IO memory if 1, and uncached if 0.
Returns:
the error code, where 0 is OK (see l4sigma0_map_errstr()).

L4_CV int l4sigma0_map_anypage ( l4_threadid_t  pager,
l4_addr_t  map_area,
unsigned  log2_map_size,
l4_addr_t *  base 
)

Request an arbitrary free page of RAM.

This function requests arbitrary free memory from sigma0. It should be used whenwever spare memory is needed, instead of requesting specific physical memory with l4sigma0_map_mem().

Parameters:
pager unsually the thread id of sigma0.
map_area the base address of the local virtual memory area where the page should be mapped.
log2_map_size the sizf of the requested page log 2 (the size in bytes is 2^log2_map_size. This must be at least the minimal page size. By specifing larger sizes the largest possible hardware page size will be used.
Return values:
base physical address of the page received (i.e., the send base of the received mapping if any).
Returns:
0 if OK, error code else (see l4sigma0_map_errstr()).

L4_CV int l4sigma0_map_tbuf ( l4_threadid_t  pager,
l4_addr_t  virt 
)

Request Fiasco trace buffer.

This is a Fiasco specific feature. Where you can request the kernel internal trace buffer for user-level evaluation. This is for special debugging tools, such as Ferret.

Parameters:
pager as usual the sigma0 thread id.
virt the virtual address where the trace buffer should be mapped,
Returns:
0 on success, !0 else (see l4sigma0_map_errstr()).

L4_CV void l4sigma0_debug_dump ( l4_threadid_t  pager  ) 

Request sigma0 to dump internal debug information.

The debug information, such as internal memory maps, as well as statistics about the internal allocators is dumped to the kernel debugger.

Parameters:
pager the sigma0 thread id.

L4_CV l4_threadid_t l4sigma0_id ( void   ) 

Return L4 thread ID of sigma0 server.

Returns:
L4 thread ID of the sigma0 server.

static char const* l4sigma0_map_errstr ( int  err  )  [inline, static]

Get a user readable error messages for the return codes.

Parameters:
err the error code rported by the *map* functions.
Returns:
a string containing the error message.

Definition at line 152 of file sigma0.h.


Generated on Wed Apr 11 06:38:27 2012 for SIGMA0 Protocol Bindings by  doxygen 1.5.6