L4Re - L4 Runtime Environment
L4::Io_pager Class Reference

Io_pager interface. More...

+ Inheritance diagram for L4::Io_pager:
+ Collaboration diagram for L4::Io_pager:

Public Member Functions

l4_msgtag_t io_page_fault (l4_fpage_t io_pfa, l4_umword_t pc, L4::Ipc::Opt< l4_mword_t &> result, L4::Ipc::Rcv_fpage rwin, L4::Ipc::Opt< L4::Ipc::Snd_fpage &> fp)
 IO page fault protocol message. More...

Detailed Description

Io_pager interface.

This interface is IA32 specific.

This class defines the interface for handling IO page faults. IO page faults happen when a thread tries to access an IO port that it does not currently have access to.

Depending on the microkernel's implementation, IO page faults can be handled in two ways.

If the microkernel does not support IO page faults, this IO pagefault interface is not used. Instead, the microkernel sends an exception IPC to the thread's exception handler (L4::Exception), indicating a #GP (exception number 13). The exception handler must consult the faulting instruction to determine the cause of the exception. This is the default in Fiasco.OC.

In contrast, if the microkernel supports IO page faults, the microkernel will generate an IO page fault message and send it to the thread's page fault handler (pager). The page fault handler can implement this interface to handle the IO page faults.

A program may use this mechanism to implement a lazy IO port access scheme.
The page fault and exception handlers are set with the L4::Thread::control interface.

Definition at line 61 of file pager.

Member Function Documentation

◆ io_page_fault()

l4_msgtag_t L4::Io_pager::io_page_fault ( l4_fpage_t  io_pfa,
l4_umword_t  pc,
L4::Ipc::Opt< l4_mword_t &>  result,
L4::Ipc::Rcv_fpage  rwin,
L4::Ipc::Opt< L4::Ipc::Snd_fpage &>  fp 

IO page fault protocol message.

io_pfaFlex-page describing the faulting IO-port.
pcFaulting program counter.
[out]resultOptional: handling result value.
rwinThe receive window for a flex-page mapping.
[out]fpOptional: flex-page descriptor to send to the task raising the page fault.
System call message tag; use l4_error() to check for errors.

IO-port fault messages are usually generated by the kernel and an IO-page-fault handler needs to be in place to handle such faults and generate a reply by filling in result and / or fp.

The documentation for this class was generated from the following file: