L4Re - L4 Runtime Environment
Fiasco extensions

Kernel debugger extensions of the Fiasco L4 implementation. More...

+ Collaboration diagram for Fiasco extensions:

Modules

 Fiasco real time scheduling extensions
 Real time scheduling extension for the Fiasco L4 implementation.
 
 Kernel Debugger
 Kernel debugger related functionality.
 

Files

file  segment.h
 l4f specific fs/gs manipulation
 
file  segment.h
 l4f specific segment manipulation
 

Data Structures

struct  l4_tracebuffer_status_window_t
 Trace-buffer status window descriptor. More...
 
struct  l4_tracebuffer_status_t
 Trace-buffer status. More...
 

Enumerations

enum  {
  LOG_EVENT_CONTEXT_SWITCH = 0, LOG_EVENT_IPC_SHORTCUT = 1, LOG_EVENT_IRQ_RAISED = 2, LOG_EVENT_TIMER_IRQ = 3,
  LOG_EVENT_THREAD_EX_REGS = 4, LOG_EVENT_MAX_EVENTS = 16
}
 Log event types. More...
 

Functions

l4_tracebuffer_status_tfiasco_tbuf_get_status (void)
 Return trace-buffer status. More...
 
l4_addr_t fiasco_tbuf_get_status_phys (void)
 Return the physical address of the trace-buffer status struct. More...
 
l4_umword_t fiasco_tbuf_log (const char *text)
 Create new trace-buffer entry with describing <text>. More...
 
l4_umword_t fiasco_tbuf_log_3val (const char *text, l4_umword_t v1, l4_umword_t v2, l4_umword_t v3)
 Create new trace-buffer entry with describing <text> and three additional values. More...
 
l4_umword_t fiasco_tbuf_log_binary (const unsigned char *data)
 Create new trace-buffer entry with binary data. More...
 
void fiasco_tbuf_clear (void)
 Clear trace-buffer.
 
void fiasco_tbuf_dump (void)
 Dump trace-buffer to kernel console.
 
long fiasco_ldt_set (l4_cap_idx_t task, void *ldt, unsigned int num_desc, unsigned int entry_number_start, l4_utcb_t *utcb)
 Set LDT segments descriptors. More...
 
long fiasco_gdt_set (l4_cap_idx_t thread, void *desc, unsigned int size, unsigned int entry_number_start, l4_utcb_t *utcb)
 Set GDT segment descriptors. More...
 
unsigned fiasco_gdt_get_entry_offset (l4_cap_idx_t thread, l4_utcb_t *utcb)
 Return the offset of the entry in the GDT. More...
 

Detailed Description

Kernel debugger extensions of the Fiasco L4 implementation.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum

Log event types.

Enumerator
LOG_EVENT_CONTEXT_SWITCH 

Event: context switch.

LOG_EVENT_IPC_SHORTCUT 

Event: IPC shortcut.

LOG_EVENT_IRQ_RAISED 

Event: IRQ occurred.

LOG_EVENT_TIMER_IRQ 

Event: Timer IRQ occurred.

LOG_EVENT_THREAD_EX_REGS 

Event: thread_ex_regs.

LOG_EVENT_MAX_EVENTS 

Maximum number of events.

Definition at line 37 of file ktrace.h.

Function Documentation

◆ fiasco_gdt_get_entry_offset()

unsigned fiasco_gdt_get_entry_offset ( l4_cap_idx_t  thread,
l4_utcb_t utcb 
)
inline

Return the offset of the entry in the GDT.

Parameters
threadThread to get info from.
utcbUTCB of the caller.

Definition at line 149 of file segment.h.

◆ fiasco_gdt_set()

long fiasco_gdt_set ( l4_cap_idx_t  thread,
void *  desc,
unsigned int  size,
unsigned int  entry_number_start,
l4_utcb_t utcb 
)
inline

Set GDT segment descriptors.

Fiasco supports 3 consecutive entries, starting at the value returned by fiasco_gdt_get_entry_offset()

Parameters
threadThread to set the GDT entry for.
descPointer to GDT descriptors.
sizeSize of the descriptors in bytes (multiple of 8).
entry_number_startEntry number to start (valid values: 0-2).
utcbUTCB of the caller.
Returns
System call error

Definition at line 52 of file segment.h.

◆ fiasco_ldt_set()

long fiasco_ldt_set ( l4_cap_idx_t  task,
void *  ldt,
unsigned int  num_desc,
unsigned int  entry_number_start,
l4_utcb_t utcb 
)
inline

Set LDT segments descriptors.

Parameters
taskTask to set the segment for.
ldtPointer to LDT hardware descriptors.
num_descNumber of descriptors.
entry_number_startEntry number to start.
utcbUTCB of the caller.

Definition at line 136 of file segment.h.

References L4_EINVAL, and L4_TASK_LDT_X86_MAX_ENTRIES.

◆ fiasco_tbuf_get_status()

l4_tracebuffer_status_t* fiasco_tbuf_get_status ( void  )
inline

Return trace-buffer status.

Returns
Pointer to trace-buffer status struct.

Definition at line 35 of file __ktrace-impl.h.

◆ fiasco_tbuf_get_status_phys()

l4_addr_t fiasco_tbuf_get_status_phys ( void  )
inline

Return the physical address of the trace-buffer status struct.

Returns
physical address of status struct.

Definition at line 42 of file __ktrace-impl.h.

◆ fiasco_tbuf_log()

l4_umword_t fiasco_tbuf_log ( const char *  text)
inline

Create new trace-buffer entry with describing <text>.

Parameters
textLogging text
Returns
Pointer to trace-buffer entry

Definition at line 48 of file __ktrace-impl.h.

References l4_error().

+ Here is the call graph for this function:

◆ fiasco_tbuf_log_3val()

l4_umword_t fiasco_tbuf_log_3val ( const char *  text,
l4_umword_t  v1,
l4_umword_t  v2,
l4_umword_t  v3 
)
inline

Create new trace-buffer entry with describing <text> and three additional values.

Parameters
textLogging text
v1first value
v2second value
v3third value
Returns
Pointer to trace-buffer entry

Definition at line 55 of file __ktrace-impl.h.

References l4_error().

+ Here is the call graph for this function:

◆ fiasco_tbuf_log_binary()

l4_umword_t fiasco_tbuf_log_binary ( const unsigned char *  data)
inline

Create new trace-buffer entry with binary data.

Parameters
databinary data
Returns
Pointer to trace-buffer entry

Definition at line 78 of file __ktrace-impl.h.

References l4_error().

+ Here is the call graph for this function: