Files | |
file | udma_rm.h |
UDMA RM related parameters and API. | |
Data Structures | |
struct | Udma_RmInitPrms |
UDMA resource manager init parameters. More... | |
struct | Udma_RmSharedResPrms |
UDMA resource manager shared resource parameters. More... | |
Macros | |
#define | UDMA_RM_RES_ID_INVALID ((uint32_t) 0xFFFF0005U) |
Macro used to specify that Resource ID is invalid. More... | |
#define | UDMA_RM_SHARED_RES_CNT_MIN ((uint32_t) 0xFFFF0006U) |
Macro used to specify - reserve minimum required number of resources for an instance. More... | |
#define | UDMA_RM_SHARED_RES_CNT_REST ((uint32_t) 0xFFFF0007U) |
Macro used to specify - reserve all the remaining unreserved resources for an instance. More... | |
Functions | |
Udma_RmSharedResPrms * | Udma_rmGetSharedResPrms (uint32_t instId, uint32_t resId) |
Returns the RM Shared Resource default parameters structure for the requested resource. User can use this API to get the default parameters for a resource and override as per need. More... | |
This is UDMA driver resource manager related configuration parameters and API
#define UDMA_RM_RES_ID_INVALID ((uint32_t) 0xFFFF0005U) |
Macro used to specify that Resource ID is invalid.
#define UDMA_RM_SHARED_RES_CNT_MIN ((uint32_t) 0xFFFF0006U) |
Macro used to specify - reserve minimum required number of resources for an instance.
#define UDMA_RM_SHARED_RES_CNT_REST ((uint32_t) 0xFFFF0007U) |
Macro used to specify - reserve all the remaining unreserved resources for an instance.
Udma_RmSharedResPrms* Udma_rmGetSharedResPrms | ( | uint32_t | instId, |
uint32_t | resId | ||
) |
Returns the RM Shared Resource default parameters structure for the requested resource. User can use this API to get the default parameters for a resource and override as per need.
instId | [IN] Udma_instId |
resId | [IN] Udma_RmResId |
uint32_t Udma_RmInitPrms::startBlkCopyUhcCh |
Start ultra high capacity block copy channel from which this UDMA driver instance manages
uint32_t Udma_RmInitPrms::numBlkCopyUhcCh |
Number of ultra high capacity block copy channel to be managed. Note: This cannot exceed UDMA_RM_MAX_BLK_COPY_UHC_CH
uint32_t Udma_RmInitPrms::startBlkCopyHcCh |
Start high capacity block copy channel from which this UDMA driver instance manages
uint32_t Udma_RmInitPrms::numBlkCopyHcCh |
Number of ultra high capacity block copy channel to be managed. Note: This cannot exceed UDMA_RM_MAX_BLK_COPY_HC_CH
uint32_t Udma_RmInitPrms::startBlkCopyCh |
Start Block copy channel from which this UDMA driver instance manages
uint32_t Udma_RmInitPrms::numBlkCopyCh |
Number of Block copy channel to be managed. Note: This cannot exceed UDMA_RM_MAX_BLK_COPY_CH
uint32_t Udma_RmInitPrms::startTxUhcCh |
Start ultra high capacity TX channel from which this UDMA driver instance manages
uint32_t Udma_RmInitPrms::numTxUhcCh |
Number of ultra high capacity TX channel to be managed. Note: This cannot exceed UDMA_RM_MAX_TX_UHC_CH
uint32_t Udma_RmInitPrms::startTxHcCh |
Start high capacity TX channel from which this UDMA driver instance manages
uint32_t Udma_RmInitPrms::numTxHcCh |
Number of high capacity TX channel to be managed. Note: This cannot exceed UDMA_RM_MAX_TX_HC_CH
uint32_t Udma_RmInitPrms::startTxCh |
Start TX channel from which this UDMA driver instance manages
uint32_t Udma_RmInitPrms::numTxCh |
Number of TX channel to be managed. Note: This cannot exceed UDMA_RM_MAX_TX_CH
uint32_t Udma_RmInitPrms::startRxUhcCh |
Start ultra high capacity RX channel from which this UDMA driver instance manages
uint32_t Udma_RmInitPrms::numRxUhcCh |
Number of high capacity RX channel to be managed. Note: This cannot exceed UDMA_RM_MAX_RX_UHC_CH
uint32_t Udma_RmInitPrms::startRxHcCh |
Start high capacity RX channel from which this UDMA driver instance manages
uint32_t Udma_RmInitPrms::numRxHcCh |
Number of high capacity RX channel to be managed. Note: This cannot exceed UDMA_RM_MAX_RX_HC_CH
uint32_t Udma_RmInitPrms::startRxCh |
Start RX channel from which this UDMA driver instance manages
uint32_t Udma_RmInitPrms::numRxCh |
Number of RX channel to be managed. Note: This cannot exceed UDMA_RM_MAX_RX_CH
uint32_t Udma_RmInitPrms::startFreeFlow |
Start free flow from which this UDMA driver instance manages
uint32_t Udma_RmInitPrms::numFreeFlow |
Number of free flow to be managed. Note: This cannot exceed UDMA_RM_MAX_FREE_FLOW
uint32_t Udma_RmInitPrms::startFreeRing |
Start free ring from which this UDMA driver instance manages
uint32_t Udma_RmInitPrms::numFreeRing |
Number of free ring to be managed. Note: This cannot exceed UDMA_RM_MAX_FREE_RING
uint32_t Udma_RmInitPrms::startGlobalEvent |
Start global event from which this UDMA driver instance manages
uint32_t Udma_RmInitPrms::numGlobalEvent |
Number of global event to be managed. Note: This cannot exceed UDMA_RM_MAX_GLOBAL_EVENT
uint32_t Udma_RmInitPrms::startVintr |
Start VINT number from which this UDMA driver instance manages
uint32_t Udma_RmInitPrms::numVintr |
Number of VINT to be managed. Note: This cannot exceed UDMA_RM_MAX_VINTR
uint32_t Udma_RmInitPrms::startIrIntr |
Start IR interrupt from which this UDMA driver instance manages.
uint32_t Udma_RmInitPrms::numIrIntr |
Number of IR interrupts to be managed. Note: This cannot exceed UDMA_RM_MAX_IR_INTR
uint16_t Udma_RmInitPrms::proxyThreadNum |
Proxy thread to push/pop to ring in proxy mode. By default driver will initialize to a default value based on core and NAVSS instance. User can override this based on need. The default proxy allocation starts from UDMA_DEFAULT_RM_PROXY_THREAD_START and will allocate 1 per core. So total allocation will be from UDMA_DEFAULT_RM_PROXY_THREAD_START to (UDMA_DEFAULT_RM_PROXY_THREAD_START + num cores) in an SOC.
The proxy thread number should be allocated within a NAVSS instance as a proxy can access ring only within the same NAVSS instance. The driver assumes the right proxy instance to use based on the instance ID (instId) provided in Udma_init API
Also this should be set a unique number across core and NAVSS instance. Care should be taken not to use the same proxy across the system.
Warning: When using multiple UDMA handle for the same NAVSS instance within a core, care should taken to provide a unique proxy number per handle. Otherwise the the driver handle will use the same proxy for ring operation and will result in unintended behaviour and corruption of ring memory/operation.
uint32_t Udma_RmInitPrms::startC7xCoreIntr |
Start C7x core interrupt from which this UDMA driver instance manages. This assumes numIrIntr contiguous interrupts from this offset is reserved for the UDMA driver. This is NA for other cores and could be set to 0.
uint32_t Udma_RmInitPrms::startC66xCoreIntr |
Start C66x core interrupt from which this UDMA driver instance manages. This assumes numIrIntr contiguous interrupts from this offset is reserved for the UDMA driver. This is NA for other cores and could be set to 0.
uint16_t Udma_RmInitPrms::startProxy |
Start proxy from which this UDMA driver instance manages. Note this should not overlap with proxyThreadNum
uint16_t Udma_RmInitPrms::numProxy |
Number of proxy to be managed. Note: This cannot exceed UDMA_RM_MAX_PROXY
uint32_t Udma_RmInitPrms::startRingMon |
Start monitor from which this UDMA driver instance manages
uint32_t Udma_RmInitPrms::numRingMon |
Number of monitors to be managed. Note: This cannot exceed UDMA_RM_MAX_RING_MON
uint32_t Udma_RmSharedResPrms::resId |
UDMA Resource Id. Refer Udma_RmResId macros.
uint32_t Udma_RmSharedResPrms::startResrvCnt |
No. of resources from the start left reserved and can't be used by UDMA Ex: Core Interrupts(IR Interrupts) used by IPC, CPSW9G etc
uint32_t Udma_RmSharedResPrms::endResrvCnt |
No. of resources from the end left reserved and can't be used by UDMA Ex: Core Interrupts(IR Interrupts) used by IPC, CPSW9G etc
uint32_t Udma_RmSharedResPrms::numInst |
No. of instances for which the available resources should be split. -This can be no. of UDMA Instances (#UDMA_NUM_INST_ID) incase of resources like Gloable Events, IR Intr, VINT etc. -This can be no.of cores (#UDMA_NUM_CORE) incase of splitting resources that are assigned TISCI_HOST_ID_ALL between different cores
uint32_t Udma_RmSharedResPrms::minReq |
Minimum no. of resources required per instance. This is validated with the unresrved number of resources. ie, UDMA Driver will return error (UDMA_EBADARGS) when: (numInst * minReq) > (total_num_res - startResrvCnt - endResrvCnt) where, total_num_res = range_num returned by Sciclient_rmGetResourceRange
For example, When numInst = 2; minReq = 50; range_num = 110; startResrvCnt = 10; endResrvCnt = 10;
no.of unreserved resources = 110-10-10 = 90 But, total requirment = minReq*numInst = 50*2 = 100 Since the requirment cant be met, UDMA Driver will return UDMA_EBADARGS
In this case either more no.of resources should be reserved in Sciclient_deafaultBoardCfg_rm.c OR Adjustments should be made in minReq/startResrvCnt/endResrvCnt.
uint32_t* Udma_RmSharedResPrms::instShare |
No. of resources for each instance. This can be:
For example, When numInst = 4; minReq = 50; range_num = 410; startResrvCnt = 7; endResrvCnt = 3; (Here, no.of unreserved resources = 410-7-3 = 400)
Case 1: instShare[] = {UDMA_RM_SHARED_RES_CNT_MIN, UDMA_RM_SHARED_RES_CNT_REST, UDMA_RM_SHARED_RES_CNT_REST, 100U}
sum(instShare[]) = 50+50+50+100 = 250 This is less than no.of unreserved resources(400)
Therefore, final_share will be {50,125,125,100}
Case 2: instShare[] = {UDMA_RM_SHARED_RES_CNT_MIN, UDMA_RM_SHARED_RES_CNT_REST, 250U, 100U}
sum(instShare[]) = 50+50+250+100 = 450 Since this is greater than no.of unreserved resources(400), UDMA Driver will return UDMA_EINVALID_PARAMS