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

Go to the source code of this file.

Macros

#define ALIGN_UP(x, align)
 
#define ALIGN_DOWN(x, align)
 
#define PHYS2VIRT(x)
 
#define VIRT2PHYS(x)
 
#define PTR_ADD(ptr, off)
 
#define ASSUME_ALIGNED(ptr, align)
 

Macro Definition Documentation

◆ ALIGN_DOWN

#define ALIGN_DOWN ( x,
align )
Value:
((x) & ~((uintptr_t) (align) - 1))
unsigned long uintptr_t
Definition type.h:73
uint32_t x
Definition virtio-gpu.hpp:0

Definition at line 9 of file memory_utils.h.

Referenced by acpi_map_phys_page(), elf_load(), elf_mmap_got(), syscall_mprotect(), and vxPCIGatheringBusInfo().

◆ ALIGN_UP

#define ALIGN_UP ( x,
align )

◆ ASSUME_ALIGNED

#define ASSUME_ALIGNED ( ptr,
align )
Value:
__builtin_assume_aligned((ptr), (align))
uint64_t ptr
Definition xhci.hpp:0

Definition at line 16 of file memory_utils.h.

Referenced by elf_count_load_size(), elf_dyn_map_all(), elf_find_base_addr(), elf_get_entry(), elf_get_phdr_dynamic(), elf_gnu_hash_parse(), elf_load(), and elf_section_map_all().

◆ PHYS2VIRT

#define PHYS2VIRT ( x)
Value:
(uint64_t)((uint64_t) x + 0xffff800000000000UL)
unsigned long uint64_t
Definition type.h:25

Definition at line 11 of file memory_utils.h.

Referenced by vaddr_to_paddr().

◆ PTR_ADD

#define PTR_ADD ( ptr,
off )
Value:
((void*) (((uint8_t*) (ptr)) + (off)))
unsigned char uint8_t
Definition type.h:7

Definition at line 14 of file memory_utils.h.

Referenced by elf_dyn_map_all(), elf_find_base_addr(), elf_get_phdr_dynamic(), and put_pixel_alpha().

◆ VIRT2PHYS

#define VIRT2PHYS ( x)
Value:
(uint64_t)((uint64_t) x - 0xffff800000000000UL)

Definition at line 12 of file memory_utils.h.

Referenced by __attribute__(), build_context_from_stivale2(), and INIT().