|
Voxia OS v0.0.1
Hobby Project Operating System Targeting x86-64
|
#include <type.h>Go to the source code of this file.
Data Structures | |
| struct | dma_memory_mapping_t |
| struct | reserve_map |
Macros | |
| #define | PAGE_SIZE 0x1000 |
| #define | GB 0x40000000UL |
| #define | MB 0x100000ULL |
| #define | VMM_PAGE paging_create_page_directory() |
| #define | PAGE_PRESENT (1ULL << 0) |
| #define | PAGE_WRITABLE (1ULL << 1) |
| #define | PAGE_USER (1ULL << 2) |
| #define | PAGE_WRITE_THROUGH (1ULL << 3) |
| #define | PAGE_CACHE_DISABLE (1ULL << 4) |
| #define | PAGE_ACCESSED (1ULL << 5) |
| #define | PAGE_DIRTY (1ULL << 6) |
| #define | PAGE_HUGE (1ULL << 7) |
| #define | PAGE_GLOBAL (1ULL << 8) |
| #define | PAGE_NO_EXECUTE (1ULL << 63) |
| #define | PAGE_PHYS_MASK 0x000FFFFFFFFFF000ULL |
| #define | PAGE_INTER_STRIP (0xFFFULL << 52 | (1ULL << 7) | (1ULL << 4) | (1ULL << 3)) |
Typedefs | |
| typedef volatile uintptr_t * | page_t |
| typedef struct reserve_map | reserve_map |
Functions | |
| struct reserve_map | __attribute__ ((aligned(32))) |
| page_t | paging_create_page_directory () |
| void | vxMmap (page_t page_dir, uint64_t virt, uint64_t phys, uint64_t flags) |
| void | paging_reload (page_t pml4) |
| page_t | paging_get_highest_page_map (void) |
| void | paging_unmap_page (page_t page_dir, uint64_t virt) |
| void | paging_unmap_fill (page_t page_dir, uint64_t virt, size_t size) |
| void | paging_setup (page_t pml4) |
| void | vxMultipleMmap (page_t page_dir, uint64_t virt, uint64_t phys, uint64_t size, uint64_t flags) |
| uint64_t | vaddr_to_paddr (page_t pml4, uint64_t vaddr) |
| void | paging_add_dma_mapping (uintptr_t phys, uintptr_t virt, uint64_t size) |
| void | paging_debug (page_t pml4, uint64_t virt) |
Variables | |
| uintptr_t | p_addr |
| uintptr_t | v_addr |
| size_t | count |
| int | flags |
| reserve_map * | next |
| #define PAGE_CACHE_DISABLE (1ULL << 4) |
Definition at line 38 of file paging.h.
Referenced by acpi_map_phys_page().
| #define PAGE_INTER_STRIP (0xFFFULL << 52 | (1ULL << 7) | (1ULL << 4) | (1ULL << 3)) |
| #define PAGE_NO_EXECUTE (1ULL << 63) |
Definition at line 43 of file paging.h.
Referenced by acpi_map_phys_page(), elf_mmap_got(), elf_pflags_to_page_flags(), mmap_prot_to_flags(), and syscall_mprotect().
| #define PAGE_PHYS_MASK 0x000FFFFFFFFFF000ULL |
Definition at line 46 of file paging.h.
Referenced by paging_debug(), paging_physwindow_mmap(), paging_unmap_page(), vaddr_to_paddr(), and vxMmap().
| #define PAGE_PRESENT (1ULL << 0) |
Definition at line 34 of file paging.h.
Referenced by __attribute__(), acpi_map_phys_page(), alloc_page_locked(), elf_mmap_got(), elf_pflags_to_page_flags(), INIT(), initialize_physical_paging_window(), mmap_prot_to_flags(), syscall_brk(), syscall_mprotect(), and vxMmap().
| #define PAGE_SIZE 0x1000 |
Definition at line 6 of file paging.h.
Referenced by elf_mmap_got(), INIT(), INIT(), mcfg_parse(), paging_create_page_directory(), syscall_brk(), vxMmap(), and vxPCIGatheringBusInfo().
| #define PAGE_USER (1ULL << 2) |
Definition at line 36 of file paging.h.
Referenced by __attribute__(), alloc_page_locked(), elf_mmap_got(), elf_pflags_to_page_flags(), syscall_brk(), syscall_mprotect(), and vxMmap().
| #define PAGE_WRITABLE (1ULL << 1) |
Definition at line 35 of file paging.h.
Referenced by __attribute__(), acpi_map_phys_page(), alloc_page_locked(), elf_mmap_got(), elf_pflags_to_page_flags(), INIT(), initialize_physical_paging_window(), mmap_prot_to_flags(), syscall_brk(), syscall_mprotect(), and vxMmap().
| #define PAGE_WRITE_THROUGH (1ULL << 3) |
Definition at line 37 of file paging.h.
Referenced by acpi_map_phys_page().
| #define VMM_PAGE paging_create_page_directory() |
Definition at line 31 of file paging.h.
Referenced by INIT(), and paging_physwindow_mmap().
| struct reserve_map __attribute__ | ( | (aligned(32)) | ) |
Definition at line 1 of file framebuffer.h.
| page_t paging_create_page_directory | ( | ) |
Definition at line 36 of file paging.c.
References mem_create_physwindow(), memset(), page, PAGE_SIZE, paging_has_been_set, paging_lock, phys_base_alloc(), spin_acquire(), and spin_release().
Referenced by execve().
Definition at line 117 of file paging.c.
References mem_create_physwindow(), mem_release_physwindow(), PAGE_PHYS_MASK, PHYS_WINDOW_FLAG_LOCK, PHYS_WINDOW_FLAG_READ, and serial_trace.
| page_t paging_get_highest_page_map | ( | void | ) |
Definition at line 463 of file paging.c.
References kernel_pml4.
Referenced by __attribute__(), acpi_map_phys_page(), acpi_phys_page_unmap(), alloc_page_locked(), elf_load(), execve(), INIT(), INIT(), INIT(), INIT(), INIT(), mcfg_parse(), mem_create_physwindow(), proccess_elf(), slab_cache_destroy(), vxCreateSlabCache(), vxPCIGatheringBusInfo(), and vxSlabAlloc().
| void paging_reload | ( | page_t | pml4 | ) |
Definition at line 457 of file paging.c.
Referenced by acpi_map_phys_page(), acpi_phys_page_unmap(), INIT(), INIT(), INIT(), INIT(), mcfg_parse(), sch_restore_to_next_thread(), vxPCIGatheringBusInfo(), and vxSchedulerTick().
| void paging_setup | ( | page_t | pml4 | ) |
Definition at line 197 of file paging.c.
References dst, kernel_pml4, mem_create_physwindow(), mem_release_physwindow(), paging_has_been_set, PHYS_WINDOW_FLAG_LOCK, PHYS_WINDOW_FLAG_READ, PHYS_WINDOW_FLAG_WRITE, and serial2_printf().
Referenced by execve().
Definition at line 451 of file paging.c.
References paging_unmap_page(), and size.
Referenced by acpi_phys_page_unmap().
Definition at line 360 of file paging.c.
References mem_create_physwindow(), mem_release_physwindow(), PAGE_PHYS_MASK, paging_has_been_set, paging_lock, PHYS_WINDOW_FLAG_LOCK, PHYS_WINDOW_FLAG_READ, PHYS_WINDOW_FLAG_WRITE, spin_acquire(), and spin_release().
Referenced by execve(), paging_unmap_fill(), and slab_cache_destroy().
Definition at line 465 of file paging.c.
References PAGE_PHYS_MASK, and PHYS2VIRT.
Definition at line 223 of file paging.c.
References flags, mem_create_physwindow(), mem_release_physwindow(), memset(), PAGE_INTER_STRIP, PAGE_PHYS_MASK, PAGE_PRESENT, PAGE_SIZE, PAGE_USER, PAGE_WRITABLE, paging_has_been_set, paging_lock, phys_base_alloc(), PHYS_WINDOW_FLAG_LOCK, PHYS_WINDOW_FLAG_READ, PHYS_WINDOW_FLAG_WRITE, spin_acquire(), and spin_release().
Referenced by alloc_page_locked(), INIT(), syscall_brk(), vxCreateSlabCache(), vxMultipleMmap(), and vxSlabAlloc().
| void vxMultipleMmap | ( | page_t | page_dir, |
| uint64_t | virt, | ||
| uint64_t | phys, | ||
| uint64_t | size, | ||
| uint64_t | flags ) |
Definition at line 340 of file paging.c.
References flags, size, and vxMmap().
Referenced by __attribute__(), acpi_map_phys_page(), elf_load(), elf_mmap_got(), execve(), INIT(), INIT(), INIT(), INIT(), INIT(), initialize_physical_paging_window(), mcfg_parse(), mmap_handle_anonymous(), syscall_mprotect(), and vxPCIGatheringBusInfo().
| reserve_map* next |