Pip
Architecture-dependent parts of Pip: MAL, IAL and boot
|
Functions | |
void | updateMMURoot (uintptr_t dir) |
updates the virtual address space root page More... | |
uint32_t | getOffsetOfAddr (uintptr_t addr) |
Gets the offset from an address. More... | |
uintptr_t | readArray (uintptr_t array, uint32_t index) |
uintptr_t | readTableVirtualNoFlags (uintptr_t table, uint32_t index) |
void | writeTableVirtualNoFlags (uintptr_t table, uint32_t index, uintptr_t addr) |
uint32_t | derivated (uintptr_t table, uint32_t index) |
Returns 1 if the page is derivated. More... | |
void | cleanPageEntry (uintptr_t table, uint32_t index) |
Cleans a page entry. More... | |
uint32_t | readIndex (uintptr_t table, uint32_t index) |
Reads the index stored into table Table, at index index, using physical addresses. More... | |
void | writeIndex (uintptr_t table, uint32_t index, uint32_t addr) |
Stores the given address into the given indirection table, at the given index, with physical addresses. More... | |
uintptr_t | toAddr (uint32_t input) |
Converts a given uint32_t to an address (only for Haskell FFI purposes) More... | |
void | cleanPage (uintptr_t paddr) |
Cleans a given page, filling it with zeroes. More... | |
uint32_t | applyRights (uintptr_t table, uint32_t index, uint32_t read, uint32_t write, uint32_t execute) |
Applies the given rights on the given entry. More... | |
void | writePhysicalWithLotsOfFlags (uintptr_t table, uint32_t index, uintptr_t addr, uint32_t present, uint32_t user, uint32_t read, uint32_t write, uint32_t execute) |
Applies the given rights on the given entry. More... | |
uint32_t | dereferenceVirtual (uintptr_t addr) |
uint32_t applyRights | ( | uintptr_t | table, |
uint32_t | index, | ||
uint32_t | read, | ||
uint32_t | write, | ||
uint32_t | execute | ||
) |
Applies the given rights on the given entry.
table | The indirection table in which we find the entry |
index | The index in this table, targeting the specified entry |
read | The read right |
write | The write right |
execute | The execute right |
void cleanPage | ( | uintptr_t | paddr | ) |
Cleans a given page, filling it with zeroes.
paddr | The page's physical address |
void cleanPageEntry | ( | uintptr_t | table, |
uint32_t | index | ||
) |
Cleans a page entry.
table | The table in which to find the entry |
index | The index of the entry |
uint32_t dereferenceVirtual | ( | uintptr_t | addr | ) |
addr | The virtual address to dereference |
uint32_t derivated | ( | uintptr_t | table, |
uint32_t | index | ||
) |
Returns 1 if the page is derivated.
table | The shadow table's last indirection |
index | The index into this shadow table |
uint32_t getOffsetOfAddr | ( | uintptr_t | addr | ) |
Gets the offset from an address.
addr | The address |
uintptr_t readArray | ( | uintptr_t | array, |
uint32_t | index | ||
) |
uintptr_t readIndex | ( | uintptr_t | table, |
uint32_t | index | ||
) |
Reads the index stored into table Table, at index index, using physical addresses.
table | The table to read from |
index | The index in the table |
uintptr_t readTableVirtualNoFlags | ( | uintptr_t | table, |
uint32_t | index | ||
) |
uintptr_t toAddr | ( | uint32_t | input | ) |
Converts a given uint32_t to an address (only for Haskell FFI purposes)
Converts a given uint32_t to an address (only for Haskell FFI purposes)
input | The given integer |
void updateMMURoot | ( | uintptr_t | dir | ) |
updates the virtual address space root page
dir | a page directory |
void writeIndex | ( | uintptr_t | table, |
uint32_t | index, | ||
uint32_t | idx | ||
) |
Stores the given address into the given indirection table, at the given index, with physical addresses.
table | The table to store into |
index | The index in the table |
addr | The index to store |
void writePhysicalWithLotsOfFlags | ( | uintptr_t | table, |
uint32_t | index, | ||
uintptr_t | addr, | ||
uint32_t | present, | ||
uint32_t | user, | ||
uint32_t | read, | ||
uint32_t | write, | ||
uint32_t | execute | ||
) |
Applies the given rights on the given entry.
table | The indirection table in which we find the entry |
index | The index in this table, targeting the specified entry |
addr | The target address |
present | 1 if the page is mapped, 0 else |
user | 1 if the page is accessible in userland, 0 else |
read | The read right |
write | The write right |
execute | The execute right |
void writeTableVirtualNoFlags | ( | uintptr_t | table, |
uint32_t | index, | ||
uintptr_t | addr | ||
) |