|
IgrOS-Kernel 0.1.34.545
Simple C++20 Kernel for i386/x86_64
|
Direct map: physical memory at kernel virtual offset. More...
#include <mem/direct.hpp>
Public Member Functions | |
| ~direct () noexcept=default | |
| D-tor. | |
| direct (const direct &other)=delete | |
| Copy c-tor. | |
| auto | operator= (const direct &other) -> direct &=delete |
| Copy assignment. | |
Static Public Member Functions | |
| static auto | end () noexcept -> phys_t |
| End of directly mapped physical memory. | |
| static void | setEnd (const phys_t end) noexcept |
| Set end of directly mapped physical memory (paging mapped more memory). | |
| static auto | isMapped (const phys_t phys, const phys_t size) noexcept -> bool |
| Check if whole physical range is directly mapped. | |
| template<class T> | |
| static auto | pointer (const phys_t phys, const phys_t size=sizeof(T)) noexcept -> T * |
| Pointer to physical memory (nullptr if range is not directly mapped). | |
| static auto | string (const phys_t phys) noexcept -> const char * |
| String at physical memory (nullptr if not directly mapped up to null terminator). | |
| template<class T> | |
| static auto | physOf (const T *const object) noexcept -> phys_t |
| Physical address of directly mapped object. | |
Static Private Attributes | |
| static constinit phys_t | mEnd {LOW_MEMORY_LIMIT} |
| End of directly mapped physical memory. | |
Direct map: physical memory at kernel virtual offset.
(boot code maps low memory, paging extends it up to top of RAM). Bootloader data may lie anywhere in physical memory, so every pointer is checked against directly mapped range
Definition at line 35 of file direct.hpp.
|
inlinestaticnodiscardnoexcept |
End of directly mapped physical memory.
Definition at line 92 of file direct.hpp.
|
inlinestaticnodiscardnoexcept |
Check if whole physical range is directly mapped.
| phys | Physical address |
| size | Range size |
Definition at line 104 of file direct.hpp.
|
inlinestaticnodiscardnoexcept |
Physical address of directly mapped object.
| T | Object type |
| object | Directly mapped object |
Definition at line 141 of file direct.hpp.
|
inlinestaticnodiscardnoexcept |
Pointer to physical memory (nullptr if range is not directly mapped).
| T | Object type |
| phys | Physical address |
| size | Range that must be mapped |
Definition at line 112 of file direct.hpp.
|
inlinestaticnoexcept |
Set end of directly mapped physical memory (paging mapped more memory).
| end | Physical address where direct map ends |
Definition at line 97 of file direct.hpp.
|
inlinestaticnodiscardnoexcept |
String at physical memory (nullptr if not directly mapped up to null terminator).
| phys | Physical address |
Definition at line 121 of file direct.hpp.
|
inlinestaticconstinitprivate |
End of directly mapped physical memory.
Definition at line 38 of file direct.hpp.