Voxia OS v0.0.1
Hobby Project Operating System Targeting x86-64
Loading...
Searching...
No Matches
phys_window.c File Reference
#include "phys_window.h"
#include "autoconf.h"
#include <hal/cpu/paging.h>
#include <libk/serial.h>
#include <memory/vm_manager.h>

Go to the source code of this file.

Functions

void paging_physwindow_mmap (page_t page_dir, uint64_t virt, uint64_t phys, int flags)
 
mem_physwindow_t * mem_resolve_physwindow (uintptr_t virt_addr)
 resolve a physical memory window by virtual address
 
mem_physwindow_status_t mem_create_physwindow (uintptr_t phys_addr, uintptr_t *virt_addr, mem_physwindow_flag_t flag)
 
mem_physwindow_status_t mem_release_physwindow (uintptr_t virt_addr)
 

Variables

static mem_physwindow_t physical_memory_windows [VOXIA_PHYS_MAX_WINDOW_COUNT]
 

Function Documentation

◆ mem_create_physwindow()

◆ mem_release_physwindow()

◆ mem_resolve_physwindow()

mem_physwindow_t * mem_resolve_physwindow ( uintptr_t virt_addr)

resolve a physical memory window by virtual address

Parameters
virt_addrthe virtual address of the physical memory window
Returns
a pointer to the mem_physwindow_t structure if found, NULL otherwise

Definition at line 18 of file phys_window.c.

References physical_memory_windows.

◆ paging_physwindow_mmap()

void paging_physwindow_mmap ( page_t page_dir,
uint64_t virt,
uint64_t phys,
int flags )
extern

References flags.

Referenced by mem_create_physwindow().

Variable Documentation

◆ physical_memory_windows

mem_physwindow_t physical_memory_windows[VOXIA_PHYS_MAX_WINDOW_COUNT]
static
Initial value:
= {
0}

Definition at line 7 of file phys_window.c.

Referenced by mem_create_physwindow(), mem_release_physwindow(), and mem_resolve_physwindow().