#include "threads/vaddr.h"
Go to the source code of this file.
Defines | |
#define | PTSHIFT PGBITS |
#define | PTBITS 10 |
#define | PTSPAN (1 << PTBITS << PGBITS) |
#define | PTMASK BITMASK(PTSHIFT, PTBITS) |
#define | PDSHIFT (PTSHIFT + PTBITS) |
#define | PDBITS 10 |
#define | PDMASK BITMASK(PDSHIFT, PDBITS) |
#define | PCI_ADDR_ZONE_BEGIN 0xe0000000 |
#define | PCI_ADDR_ZONE_END 0xe0800000 |
#define | PCI_ADDR_ZONE_PDES 2 |
#define | PCI_ADDR_ZONE_PAGES (PCI_ADDR_ZONE_END-PCI_ADDR_ZONE_BEGIN)/PGSIZE |
#define | PTE_FLAGS 0x00000fff |
#define | PTE_ADDR 0xfffff000 |
#define | PTE_AVL 0x00000e00 |
#define | PTE_P 0x1 |
#define | PTE_W 0x2 |
#define | PTE_U 0x4 |
#define | PTE_WT (1 << 3) |
#define | PTE_CD (1 << 4) |
#define | PTE_A 0x20 |
#define | PTE_D 0x40 |
#define | PTE_G (1 << 8) |
Functions | |
static unsigned | pt_no (const void *va) |
static uintptr_t | pd_no (const void *va) |
static uint32_t | pde_create_user (uint32_t *pt) |
static uint32_t | pde_create_kernel (uint32_t *pt) |
static uint32_t * | pde_get_pt (uint32_t pde) |
static uint32_t | pte_create_kernel (void *page, bool writable) |
static uint32_t | pte_create_user (void *page, bool writable) |
static void * | pte_get_page (uint32_t pte) |
#define PCI_ADDR_ZONE_BEGIN 0xe0000000 |
#define PCI_ADDR_ZONE_PAGES (PCI_ADDR_ZONE_END-PCI_ADDR_ZONE_BEGIN)/PGSIZE |
#define PCI_ADDR_ZONE_PDES 2 |
#define PTE_A 0x20 |
Definition at line 78 of file pte.h.
Referenced by pagedir_is_accessed(), and pagedir_set_accessed().
#define PTE_ADDR 0xfffff000 |
#define PTE_CD (1 << 4) |
#define PTE_D 0x40 |
#define PTE_G (1 << 8) |
#define PTE_P 0x1 |
Definition at line 73 of file pte.h.
Referenced by pagedir_clear_page(), pagedir_destroy(), pagedir_get_page(), pagedir_set_page(), pci_alloc_mem(), pde_create_kernel(), pde_create_user(), pde_get_pt(), pte_create_kernel(), and pte_create_user().
#define PTE_U 0x4 |
#define PTE_W 0x2 |
Definition at line 74 of file pte.h.
Referenced by pci_alloc_mem(), pde_create_kernel(), pde_create_user(), pte_create_kernel(), and pte_create_user().
#define PTSHIFT PGBITS |
static uintptr_t pd_no | ( | const void * | va | ) | [inline, static] |
Definition at line 46 of file pte.h.
References PDSHIFT.
Referenced by lookup_page(), pagedir_destroy(), paging_init(), pci_alloc_mem(), and pci_zone_init().
Definition at line 89 of file pte.h.
References ASSERT, pg_ofs(), PTE_G, PTE_P, PTE_W, and vtop().
Referenced by paging_init(), and pci_zone_init().
Definition at line 96 of file pte.h.
References ASSERT, PTE_ADDR, PTE_P, and ptov().
Referenced by lookup_page(), and pagedir_destroy().
static unsigned pt_no | ( | const void * | va | ) | [inline, static] |
Definition at line 41 of file pte.h.
References PTMASK, and PTSHIFT.
Referenced by lookup_page(), and paging_init().
static uint32_t pte_create_kernel | ( | void * | page, | |
bool | writable | |||
) | [inline, static] |
static uint32_t pte_create_user | ( | void * | page, | |
bool | writable | |||
) | [inline, static] |
static void* pte_get_page | ( | uint32_t | pte | ) | [inline, static] |
Definition at line 121 of file pte.h.
References PTE_ADDR, and ptov().
Referenced by pagedir_destroy(), and pagedir_get_page().