L4Re Operating System Framework
Interface and Usage Documentation
|
Pager interface including the Io_pager interface. More...
#include <pager>
Public Member Functions | |
l4_msgtag_t | page_fault (l4_umword_t pfa, l4_umword_t pc, L4::Ipc::Rcv_fpage rwin, L4::Ipc::Opt< L4::Ipc::Snd_fpage & > fp) |
Page-fault protocol message. | |
Public Member Functions inherited from L4::Io_pager | |
l4_msgtag_t | io_page_fault (l4_fpage_t io_pfa, l4_umword_t pc, L4::Ipc::Rcv_fpage rwin, L4::Ipc::Opt< L4::Ipc::Snd_fpage & > fp) |
IO page fault protocol message. | |
Additional Inherited Members | |
Protected Types inherited from L4::Kobject_t< Pager, Io_pager, L4_PROTO_PAGE_FAULT > | |
typedef Pager | Class |
The target interface type (inheriting from Kobject_t) | |
typedef Typeid::Iface< PROTO, Pager > | __Iface |
The interface description for the derived class. | |
typedef Typeid::Merge_list< Typeid::Iface_list< __Iface >, typename Base::__Iface_list > | __Iface_list |
The list of all RPC interfaces provided directly or through inheritance. | |
Protected Member Functions inherited from L4::Kobject_t< Pager, Io_pager, L4_PROTO_PAGE_FAULT > | |
L4::Cap< Class > | c () const noexcept |
Get the capability to ourselves. | |
Static Protected Member Functions inherited from L4::Kobject_t< Pager, Io_pager, L4_PROTO_PAGE_FAULT > | |
static void | __check_protocols__ () noexcept |
Helper to check for protocol conflicts. | |
Pager interface including the Io_pager interface.
This class defines the interface for handling page fault IPC. If a thread causes a page fault, the microkernel synthesises a page fault IPC message and sends it to the thread's page fault handler (pager). The pager can then handle the message, for example by establishing a suitable page mapping.
The page fault handler is set with the L4::Thread::control interface.
l4_msgtag_t L4::Pager::page_fault | ( | l4_umword_t | pfa, |
l4_umword_t | pc, | ||
L4::Ipc::Rcv_fpage | rwin, | ||
L4::Ipc::Opt< L4::Ipc::Snd_fpage & > | fp | ||
) |
Page-fault protocol message.
pfa | Faulting address including failure reason: bits [0:2]. | |
pc | Faulting program counter. | |
rwin | Receive window for a flex-page mapping resolving the page fault. | |
[out] | fp | Optional: flex-page descriptor to send to the task raising the page fault. |
Page-fault messages are usually generated by the kernel and need to be handled by an appropriate handler function, potentially filling in fp
for the reply.
pfa
encoding is as shown:
[63/31 .. 3] | 2 | 1 | 0 |
---|---|---|---|
PFA | X | W | r |
pfa
are the page fault address bits 63/31 to 3, bits 2..0 are masked.pfa
if set, indicates a page fault during instruction fetch. Note, this bit is implementation-defined and might always be clear. Therefore, if this bit is clear it does not imply that the page fault is not due to an instruction fetch.pfa
is set to 1 for a page fault due to a write operation.