![]() |
Altera HWLIB
16.0
The Altera HW Manager API Reference Manual
|
Translation
This section providees functions to support the translation from the virtual address to physical address.
Functions | |
uintptr_t | alt_mmu_va_to_pa (const void *va, uint32_t *seglength, uint32_t *dfsr) |
uintptr_t alt_mmu_va_to_pa | ( | const void * | va, |
uint32_t * | seglength, | ||
uint32_t * | dfsr | ||
) |
Given a virtual address, this API attempts to determine the corresponding physical address and segment length. There are no alignment restrictions on the incoming virtual address.
If the translation succeeds, the corresponding physical address will be returned, seglength will be populated with the physical memory segment length, and dfsr will be populated with 0.
If the translation is not possible, dfsr will contain the reason for the translation failure and returned value will be undefined. dfsr is the short-descriptor translation table format of the Data Fault Status Register equivalent value for the translation fault.
For a complete understanding of the DFSR bit field assignments, consult the following reference(s):
va | The virtual address to query. |
seglength | [out] A pointer to the length of the physical address segment corresponding to the given virtual address. |
dfsr | [out] A pointer to the DFSR value. |