AM263Px MCU+ SDK: Region based Address Translate

| AM263Px MCU+ SDK 26.00.00 |

Region based Address Translate

# Features Supported

- APIs to setup region based address translation using RAT HW on supported SOCs
- APIs to translate SOC view `system address` (or virtual address in OptiShare context) to CPU view `local address` (or physical address in context of OptiShare).
- When no address mapping is specified, no translation is done.

# Features NOT Supported

NA

# Important Usage Guidelines

- The translation API AddrTranslateP_getLocalAddr is meant to be used to translate SOC specified peripheral MMR base addresses to local CPU accesible addresses, within device drivers. The API internally searches through a small array to find the address translations, hence to be efficient, this API should typically be called once during driver init to find the local address that CPU should use.

# Example Usage

Include the below file to access the APIs,

#include <kernel/dpl/AddrTranslateP.h>
#include <kernel/dpl/DebugP.h>

Example to translate a system address to local CPU address,

uint64_t systemAddr = 0x029060000ul;
void *localAddr;
localAddr = AddrTranslateP_getLocalAddr(systemAddr);
DebugP_log("System Addr:%x => Local Address:%x\n", systemAddr, localAddr);

# API

APIs for Region based address translation (RAT) module

DebugP_log
#define DebugP_log(format,...)
Function to log a string to the enabled console.
Definition: DebugP.h:235
AddrTranslateP_getLocalAddr
void * AddrTranslateP_getLocalAddr(uint64_t systemAddr)
Translate from system address to a CPU address as seen via the RAT module.
DebugP.h
AddrTranslateP.h