Voxia OS v0.0.1
Hobby Project Operating System Targeting x86-64
Loading...
Searching...
No Matches
phys_window.h File Reference
#include <spinlock.h>
#include <type.h>

Go to the source code of this file.

Data Structures

struct  __attribute__
 

Typedefs

typedef int mem_physwindow_status_t
 
typedef int mem_physwindow_flag_t
 

Enumerations

enum  { PHYS_WINDOW_STATUS_OK = 0 , PHYS_WINDOW_STATUS_ERROR = -1 , PHYS_WINDOW_STATUS_NOT_FOUND = -2 }
 
enum  { PHYS_WINDOW_FLAG_READ = 0x1 , PHYS_WINDOW_FLAG_WRITE = 0x2 , PHYS_WINDOW_FLAG_LOCK = 0x20 }
 

Functions

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)
 
mem_physwindow_t * mem_resolve_physwindow (uintptr_t virt_addr)
 resolve a physical memory window by virtual address
 

Typedef Documentation

◆ mem_physwindow_flag_t

typedef int mem_physwindow_flag_t

Definition at line 14 of file phys_window.h.

◆ mem_physwindow_status_t

Definition at line 7 of file phys_window.h.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
PHYS_WINDOW_STATUS_OK 
PHYS_WINDOW_STATUS_ERROR 
PHYS_WINDOW_STATUS_NOT_FOUND 

Definition at line 8 of file phys_window.h.

◆ anonymous enum

anonymous enum
Enumerator
PHYS_WINDOW_FLAG_READ 
PHYS_WINDOW_FLAG_WRITE 
PHYS_WINDOW_FLAG_LOCK 

Definition at line 15 of file phys_window.h.

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.