L4Re Operating System Framework – Interface and Usage Documentation
Loading...
Searching...
No Matches
L4::Pager Class Reference

Pager interface including the Io_pager interface. More...

#include <pager>

+ Inheritance diagram for L4::Pager:
+ Collaboration diagram for L4::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< Classc () 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.
 

Detailed Description

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.

Definition at line 98 of file pager.

Member Function Documentation

◆ page_fault()

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.

Parameters
pfaFaulting address including failure reason: bits [0:2].
pcFaulting program counter.
rwinReceive window for a flex-page mapping resolving the page fault.
[out]fpOptional: flex-page descriptor to send to the task raising the page fault.
Returns
System call message tag; use l4_error() to check for errors.

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 Bits 63/31..3 of pfa are the page fault address bits 63/31 to 3, bits 2..0 are masked.
  • X Bit 2 of 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.
  • W Bit 1 of pfa is set to 1 for a page fault due to a write operation.
  • r Bit0: reserved, undefined.

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