#include <kmem.h>
Public Types | |
enum | { mem_tcbs = Mem_layout::Tcbs, mem_user_max = Mem_layout::User_max } |
Static Public Member Functions | |
static void | init () |
static Mword | is_kmem_page_fault (Mword pfa, Mword error) |
static Mword | is_ipc_page_fault (Mword pfa, Mword error) |
static Mword | is_smas_page_fault (Mword pfa) |
static Mword | is_io_bitmap_page_fault (Mword pfa) |
static Address | kcode_start () |
static Address | kcode_end () |
static Address | kmem_base () |
static Address | virt_to_phys (const void *addr) |
Compute physical address from a kernel-virtual address. | |
static Mword | is_tcb_page_fault (Address addr, Mword) |
static const Pdir * | dir () |
Return Global page directory. | |
static Address | get_mem_max () |
static Address | himem () |
static Address volatile * | kernel_esp () |
Get a pointer to the CPUs kernel stack pointer. | |
static void * | phys_to_virt (Address addr) |
Compute a kernel-virtual address for a physical address. | |
static void | dir_init (Pdir *d) |
Initialize a new task's page directory from the current master copy of kernel page tables (the global page directory). | |
static Address | ipc_window (unsigned win) |
Return virtual address of an IPC window. | |
static Address | io_bitmap_delimiter_page () |
static void | map_devpage_4k (Address phys, Address virt, bool cached, bool global, Address *offs=0) |
Static Protected Member Functions | |
static Pdir *kdir | asm ("KMEM_KDIR") |
Kernel page directory. | |
Private Member Functions | |
Kmem () | |
Kmem (const Kmem &) | |
Static Private Member Functions | |
static Address | user_max () |
static Address | alloc_from_page (Address *from, Address size) |
Allocate some bytes from a memory page. | |
static FIASCO_INIT Address | himem_alloc () |
Static Private Attributes | |
static Address | mem_max |
static Address | _himem |
static Unsigned8 * | io_bitmap_delimiter |
Friends | |
class | Jdb |
class | Jdb_dbinfo |
class | Jdb_kern_info_misc |
class | Kdb |
class | Profile |
class | Vmem_alloc |
The kernel memory is a singleton object. We access it through a static class interface.
|
|
|
|
|
|
|
Allocate some bytes from a memory page.
|
|
Kernel page directory.
|
|
Return Global page directory. This is the master copy of the kernel's page directory. Kernel-memory allocations are kept here and copied to task page directories lazily upon page fault.
|
|
Initialize a new task's page directory from the current master copy of kernel page tables (the global page directory).
|
|
|
|
|
|
|
|
|
|
|
|
Return virtual address of an IPC window.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Get a pointer to the CPUs kernel stack pointer.
|
|
|
|
|
|
Compute a kernel-virtual address for a physical address. This function always returns virtual addresses within the physical-memory region.
|
|
|
|
Compute physical address from a kernel-virtual address.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|