PatchworkOS  19e446b
A non-POSIX operating system.
Loading...
Searching...
No Matches
pml_entry_t Struct Reference

#include <paging_types.h>

Collaboration diagram for pml_entry_t:

Data Fields

union { 
 
   uint64_t   raw 
 
   struct { 
 
      uint64_t   present: 1 
 If set the page is present in memory and readable. More...
 
      uint64_t   write: 1 
 If set the page is writable. More...
 
      uint64_t   user: 1 
 If set the page is accessible from user mode. More...
 
      uint64_t   writeThrough: 1 
 If set write-through caching is enabled for the page. More...
 
      uint64_t   cacheDisabled: 1 
 If set caching is disabled for the page. More...
 
      uint64_t   accessed: 1 
 If set the page has been accessed (read or written to). More...
 
      uint64_t   dirty: 1 
 If set the page has been written to. More...
 
      uint64_t   size: 1 
 
      uint64_t   global: 1 
 If set the page is not flushed from the TLB on a context switch. More...
 
      uint64_t   owned: 1 
 
      uint64_t   pinned: 1 
 
      uint64_t   lowCallbackId: 1 
 
      pfn_t   pfn: 40 
 The physical frame number (physical address >> 12). More...
 
      uint64_t   highCallbackId: 7 
 
      uint64_t   protection: 4 
 
      uint64_t   noExecute: 1 
 
   }  
 
};  
 

Detailed Description

Definition at line 93 of file paging_types.h.

Field Documentation

◆ raw

uint64_t pml_entry_t::raw

Definition at line 96 of file paging_types.h.

◆ present

uint64_t pml_entry_t::present

If set the page is present in memory and readable.

Definition at line 99 of file paging_types.h.

◆ write

uint64_t pml_entry_t::write

If set the page is writable.

Definition at line 100 of file paging_types.h.

◆ user

uint64_t pml_entry_t::user

If set the page is accessible from user mode.

Definition at line 101 of file paging_types.h.

◆ writeThrough

uint64_t pml_entry_t::writeThrough

If set write-through caching is enabled for the page.

Definition at line 102 of file paging_types.h.

◆ cacheDisabled

uint64_t pml_entry_t::cacheDisabled

If set caching is disabled for the page.

Definition at line 103 of file paging_types.h.

◆ accessed

uint64_t pml_entry_t::accessed

If set the page has been accessed (read or written to).

Definition at line 104 of file paging_types.h.

◆ dirty

uint64_t pml_entry_t::dirty

If set the page has been written to.

Definition at line 105 of file paging_types.h.

◆ size

uint64_t pml_entry_t::size

Definition at line 106 of file paging_types.h.

◆ global

uint64_t pml_entry_t::global

If set the page is not flushed from the TLB on a context switch.

Definition at line 107 of file paging_types.h.

◆ owned

uint64_t pml_entry_t::owned

If set, then when the entry is unmapped or the page table is freed, the physical page will be freed. (Defined by PatchworkOS)

Definition at line 112 of file paging_types.h.

◆ pinned

uint64_t pml_entry_t::pinned

If set, the page is pinned and cannot be unmapped or have its mappings modified.

Used to prevent TOCTOU vulnerabilities by preventing a page from being unmapped or its mappings modified while its being used, in for example a system call.

For performance the paging code will never check this flag instead its the responsibility of the virtual memory manager to check this flag.

Note that recursive pinning is implemented in the virtual memory manager, not here, meaning that this flag only indicates if the page is pinned or not, for faster access, while the pin depth is tracked elsewhere.

(Defined by PatchworkOS)

Definition at line 128 of file paging_types.h.

◆ lowCallbackId

uint64_t pml_entry_t::lowCallbackId

The low bit of the callback ID associated with this page.

Check the virtual memory manager for more information. (Defined by PatchworkOS)

Definition at line 134 of file paging_types.h.

◆ pfn

pfn_t pml_entry_t::pfn

The physical frame number (physical address >> 12).

Definition at line 135 of file paging_types.h.

◆ highCallbackId

uint64_t pml_entry_t::highCallbackId

The high bits of the callback ID associated with this page.

Check the virtual memory manager for more information. (Defined by PatchworkOS)

Definition at line 141 of file paging_types.h.

◆ protection

uint64_t pml_entry_t::protection

Definition at line 142 of file paging_types.h.

◆ noExecute

uint64_t pml_entry_t::noExecute

Definition at line 143 of file paging_types.h.

◆ [union]

union { ... } pml_entry_t

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