L4Re Operating System Framework
Interface and Usage Documentation
Loading...
Searching...
No Matches
Page fault trampoline handlers

A page fault trampoline handler is an alternative mechanism to handle page faults. More...

Collaboration diagram for Page fault trampoline handlers:

Topics

 ARM page fault trampoline handler.
 ARM64 page fault trampoline handler.
 AMD64 page fault trampoline handler.
 x86 page fault trampoline handler.
 RISC-V page fault trampoline handler.

Data Structures

struct  l4_pf_trampoline_t
 State for page fault trampoline handler. More...

Typedefs

typedef struct l4_pf_trampoline_regs_t l4_pf_trampoline_regs_t
 Opaque type for the page fault trampoline register state.
typedef struct l4_pf_trampoline_t l4_pf_trampoline_t
 Opaque type for the page fault trampoline state.

Enumerations

enum  L4_pf_trampoline_flags { Page_fault_in_progress = 1 << 0 , Trigger_exception_after_resume = 1 << 1 }
 Definitions for l4_pf_trampoline_t::flags. More...

Detailed Description

A page fault trampoline handler is an alternative mechanism to handle page faults.

Instead of sending a page fault IPC to the pager of the faulting thread, a dedicated page fault handler is directly called by the kernel in the context of the faulting thread.

The handler has access to the instruction pointer and the page fault address. The l4_pf_trampoline_t state contains this information plus additional information saved by the kernel on entering the kernel page fault handler and restored before leaving the kernel page fault handler.

Include File
Page fault trampoline handlers.

Typedef Documentation

◆ l4_pf_trampoline_t

typedef struct l4_pf_trampoline_t l4_pf_trampoline_t

Opaque type for the page fault trampoline state.

State for page fault trampoline handler.

Definition at line 75 of file pf_trampoline.h.

Enumeration Type Documentation

◆ L4_pf_trampoline_flags

Definitions for l4_pf_trampoline_t::flags.

Enumerator
Page_fault_in_progress 

The corresponding thread is currently handling a page fault using the trampoline handler.

The thread must not be ex-regs'd during that time!

Trigger_exception_after_resume 

Trigger an exception at the corresponding thread when the thread resumes execution after returning from a page fault trampoline handler.

Used for deferred triggering of an artificial exception, for example, for signal handling: If a thread resolving a page fault using a trampoline page fault handler is being ex_regs'd(L4_THREAD_EX_REGS_TRIGGER_EXCEPTION), the thread must not longjmp before the trampoline page fault handler resumed. Instead, the signal handler just sets Trigger_exception_after_resume and returns. Once the trampoline page fault handler resumes, the kernel resets this flags and triggers the artificial exception which is again handled by the signal handler.

Definition at line 40 of file pf_trampoline.h.