L4Re Operating System Framework
Interface and Usage Documentation
|
vCPU handling functionality. More...
Modules | |
Extended vCPU support | |
Extended vCPU handling functionality. | |
Data Structures | |
class | L4vcpu::State |
C++ implementation of state word in the vCPU area. More... | |
class | L4vcpu::Vcpu |
C++ implementation of the vCPU save state area. More... | |
Functions | |
void | l4vcpu_irq_disable (l4_vcpu_state_t *vcpu) L4_NOTHROW |
Disable a vCPU for event delivery. | |
unsigned | l4vcpu_irq_disable_save (l4_vcpu_state_t *vcpu) L4_NOTHROW |
Disable a vCPU for event delivery and return previous state. | |
void | l4vcpu_irq_enable (l4_vcpu_state_t *vcpu, l4_utcb_t *utcb, l4vcpu_event_hndl_t do_event_work_cb, l4vcpu_setup_ipc_t setup_ipc) L4_NOTHROW |
Enable a vCPU for event delivery. | |
void | l4vcpu_irq_restore (l4_vcpu_state_t *vcpu, unsigned s, l4_utcb_t *utcb, l4vcpu_event_hndl_t do_event_work_cb, l4vcpu_setup_ipc_t setup_ipc) L4_NOTHROW |
Restore a previously saved IRQ/event state. | |
void | l4vcpu_wait_for_event (l4_vcpu_state_t *vcpu, l4_utcb_t *utcb, l4vcpu_event_hndl_t do_event_work_cb, l4vcpu_setup_ipc_t setup_ipc) L4_NOTHROW |
Wait for event. | |
void | l4vcpu_print_state (const l4_vcpu_state_t *vcpu, const char *prefix) L4_NOTHROW |
Print the state of a vCPU. | |
int | l4vcpu_is_irq_entry (l4_vcpu_state_t const *vcpu) L4_NOTHROW |
Return whether the entry reason was an IRQ/IPC message. | |
int | l4vcpu_is_page_fault_entry (l4_vcpu_state_t const *vcpu) L4_NOTHROW |
Return whether the entry reason was a page fault. | |
vCPU handling functionality.
This library provides convenience functionality on top of the l4sys vCPU interface to ease programming. It wraps commonly used code and abstracts architecture depends parts as far as reasonable.
|
inline |
Disable a vCPU for event delivery.
vcpu | Pointer to vCPU area. |
Definition at line 212 of file vcpu.h.
References l4_barrier().
Referenced by L4vcpu::Vcpu::irq_disable(), l4vcpu_irq_disable_save(), and l4vcpu_irq_restore().
|
inline |
Disable a vCPU for event delivery and return previous state.
vcpu | Pointer to vCPU area. |
Definition at line 220 of file vcpu.h.
References l4vcpu_irq_disable().
Referenced by L4vcpu::Vcpu::irq_disable_save().
|
inline |
Enable a vCPU for event delivery.
vcpu | Pointer to vCPU area. |
utcb | Utcb pointer of the calling vCPU. |
do_event_work_cb | Call-back function that is called in case an event (such as an interrupt) is pending. |
setup_ipc | Function call-back that is called right before any IPC operation, and before event delivery is enabled. |
Definition at line 243 of file vcpu.h.
References l4_barrier(), L4_IPC_BOTH_TIMEOUT_0, L4_LIKELY, L4_VCPU_F_IRQ, and L4_VCPU_SF_IRQ_PENDING.
Referenced by L4vcpu::Vcpu::irq_enable(), and l4vcpu_irq_restore().
|
inline |
Restore a previously saved IRQ/event state.
vcpu | Pointer to vCPU area. |
s | IRQ state to be restored. |
utcb | Utcb pointer of the calling vCPU. |
do_event_work_cb | Call-back function that is called in case an event (such as an interrupt) is pending after enabling. |
setup_ipc | Function call-back that is called right before any IPC operation, and before event delivery is enabled. |
Definition at line 268 of file vcpu.h.
References L4_VCPU_F_IRQ, l4vcpu_irq_disable(), and l4vcpu_irq_enable().
Referenced by L4vcpu::Vcpu::irq_restore().
|
inline |
Return whether the entry reason was an IRQ/IPC message.
vcpu | Pointer to vCPU area. |
return 0 if not, !=0 otherwise.
Referenced by L4vcpu::Vcpu::is_irq_entry().
|
inline |
Return whether the entry reason was a page fault.
vcpu | Pointer to vCPU area. |
return 0 if not, !=0 otherwise.
Referenced by L4vcpu::Vcpu::is_page_fault_entry().
void l4vcpu_print_state | ( | const l4_vcpu_state_t * | vcpu, |
const char * | prefix | ||
) |
Print the state of a vCPU.
vcpu | Pointer to vCPU area. |
prefix | A prefix for each line printed. |
Referenced by L4vcpu::Vcpu::print_state().
|
inline |
Wait for event.
vcpu | Pointer to vCPU area. |
utcb | Utcb pointer of the calling vCPU. |
do_event_work_cb | Call-back function that is called when the vCPU awakes and needs to handle an event/IRQ. |
setup_ipc | Function call-back that is called right before any IPC operation. |
Note that event delivery remains disabled after this function returns.
Definition at line 281 of file vcpu.h.
References L4_IPC_NEVER.
Referenced by L4vcpu::Vcpu::wait_for_event().