PSDK QNX API Guide
UDMA Driver RM API

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_RmSharedResPrmsUdma_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...
 

Variables

uint32_t Udma_RmInitPrms::startBlkCopyUhcCh
 
uint32_t Udma_RmInitPrms::numBlkCopyUhcCh
 
uint32_t Udma_RmInitPrms::startBlkCopyHcCh
 
uint32_t Udma_RmInitPrms::numBlkCopyHcCh
 
uint32_t Udma_RmInitPrms::startBlkCopyCh
 
uint32_t Udma_RmInitPrms::numBlkCopyCh
 
uint32_t Udma_RmInitPrms::startTxUhcCh
 
uint32_t Udma_RmInitPrms::numTxUhcCh
 
uint32_t Udma_RmInitPrms::startTxHcCh
 
uint32_t Udma_RmInitPrms::numTxHcCh
 
uint32_t Udma_RmInitPrms::startTxCh
 
uint32_t Udma_RmInitPrms::numTxCh
 
uint32_t Udma_RmInitPrms::startRxUhcCh
 
uint32_t Udma_RmInitPrms::numRxUhcCh
 
uint32_t Udma_RmInitPrms::startRxHcCh
 
uint32_t Udma_RmInitPrms::numRxHcCh
 
uint32_t Udma_RmInitPrms::startRxCh
 
uint32_t Udma_RmInitPrms::numRxCh
 
uint32_t Udma_RmInitPrms::startFreeFlow
 
uint32_t Udma_RmInitPrms::numFreeFlow
 
uint32_t Udma_RmInitPrms::startFreeRing
 
uint32_t Udma_RmInitPrms::numFreeRing
 
uint32_t Udma_RmInitPrms::startGlobalEvent
 
uint32_t Udma_RmInitPrms::numGlobalEvent
 
uint32_t Udma_RmInitPrms::startVintr
 
uint32_t Udma_RmInitPrms::numVintr
 
uint32_t Udma_RmInitPrms::startIrIntr
 
uint32_t Udma_RmInitPrms::numIrIntr
 
uint16_t Udma_RmInitPrms::proxyThreadNum
 
uint32_t Udma_RmInitPrms::startC7xCoreIntr
 
uint32_t Udma_RmInitPrms::startC66xCoreIntr
 
uint16_t Udma_RmInitPrms::startProxy
 
uint16_t Udma_RmInitPrms::numProxy
 
uint32_t Udma_RmInitPrms::startRingMon
 
uint32_t Udma_RmInitPrms::numRingMon
 
uint32_t Udma_RmSharedResPrms::resId
 
uint32_t Udma_RmSharedResPrms::startResrvCnt
 
uint32_t Udma_RmSharedResPrms::endResrvCnt
 
uint32_t Udma_RmSharedResPrms::numInst
 
uint32_t Udma_RmSharedResPrms::minReq
 
uint32_t * Udma_RmSharedResPrms::instShare
 

Detailed Description

This is UDMA driver resource manager related configuration parameters and API

Macro Definition Documentation

◆ UDMA_RM_RES_ID_INVALID

#define UDMA_RM_RES_ID_INVALID   ((uint32_t) 0xFFFF0005U)

Macro used to specify that Resource ID is invalid.

◆ UDMA_RM_SHARED_RES_CNT_MIN

#define UDMA_RM_SHARED_RES_CNT_MIN   ((uint32_t) 0xFFFF0006U)

Macro used to specify - reserve minimum required number of resources for an instance.

◆ UDMA_RM_SHARED_RES_CNT_REST

#define UDMA_RM_SHARED_RES_CNT_REST   ((uint32_t) 0xFFFF0007U)

Macro used to specify - reserve all the remaining unreserved resources for an instance.

Function Documentation

◆ Udma_rmGetSharedResPrms()

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.

Parameters
instId[IN] Udma_instId
resId[IN] Udma_RmResId
Returns
Pointer to default RM Shared Resource parameters Udma_RmSharedResPrms Note: Returns NULL_PTR if the requested Udma_RmResId dosen't have an entry in the array of default RM Shared Resource parameters structure NOTE:: This API is updated. Need to fix all other SoCs as well.

Variable Documentation

◆ startBlkCopyUhcCh

uint32_t Udma_RmInitPrms::startBlkCopyUhcCh

Start ultra high capacity block copy channel from which this UDMA driver instance manages

◆ numBlkCopyUhcCh

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

◆ startBlkCopyHcCh

uint32_t Udma_RmInitPrms::startBlkCopyHcCh

Start high capacity block copy channel from which this UDMA driver instance manages

◆ numBlkCopyHcCh

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

◆ startBlkCopyCh

uint32_t Udma_RmInitPrms::startBlkCopyCh

Start Block copy channel from which this UDMA driver instance manages

◆ numBlkCopyCh

uint32_t Udma_RmInitPrms::numBlkCopyCh

Number of Block copy channel to be managed. Note: This cannot exceed UDMA_RM_MAX_BLK_COPY_CH

◆ startTxUhcCh

uint32_t Udma_RmInitPrms::startTxUhcCh

Start ultra high capacity TX channel from which this UDMA driver instance manages

◆ numTxUhcCh

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

◆ startTxHcCh

uint32_t Udma_RmInitPrms::startTxHcCh

Start high capacity TX channel from which this UDMA driver instance manages

◆ numTxHcCh

uint32_t Udma_RmInitPrms::numTxHcCh

Number of high capacity TX channel to be managed. Note: This cannot exceed UDMA_RM_MAX_TX_HC_CH

◆ startTxCh

uint32_t Udma_RmInitPrms::startTxCh

Start TX channel from which this UDMA driver instance manages

◆ numTxCh

uint32_t Udma_RmInitPrms::numTxCh

Number of TX channel to be managed. Note: This cannot exceed UDMA_RM_MAX_TX_CH

◆ startRxUhcCh

uint32_t Udma_RmInitPrms::startRxUhcCh

Start ultra high capacity RX channel from which this UDMA driver instance manages

◆ numRxUhcCh

uint32_t Udma_RmInitPrms::numRxUhcCh

Number of high capacity RX channel to be managed. Note: This cannot exceed UDMA_RM_MAX_RX_UHC_CH

◆ startRxHcCh

uint32_t Udma_RmInitPrms::startRxHcCh

Start high capacity RX channel from which this UDMA driver instance manages

◆ numRxHcCh

uint32_t Udma_RmInitPrms::numRxHcCh

Number of high capacity RX channel to be managed. Note: This cannot exceed UDMA_RM_MAX_RX_HC_CH

◆ startRxCh

uint32_t Udma_RmInitPrms::startRxCh

Start RX channel from which this UDMA driver instance manages

◆ numRxCh

uint32_t Udma_RmInitPrms::numRxCh

Number of RX channel to be managed. Note: This cannot exceed UDMA_RM_MAX_RX_CH

◆ startFreeFlow

uint32_t Udma_RmInitPrms::startFreeFlow

Start free flow from which this UDMA driver instance manages

◆ numFreeFlow

uint32_t Udma_RmInitPrms::numFreeFlow

Number of free flow to be managed. Note: This cannot exceed UDMA_RM_MAX_FREE_FLOW

◆ startFreeRing

uint32_t Udma_RmInitPrms::startFreeRing

Start free ring from which this UDMA driver instance manages

◆ numFreeRing

uint32_t Udma_RmInitPrms::numFreeRing

Number of free ring to be managed. Note: This cannot exceed UDMA_RM_MAX_FREE_RING

◆ startGlobalEvent

uint32_t Udma_RmInitPrms::startGlobalEvent

Start global event from which this UDMA driver instance manages

◆ numGlobalEvent

uint32_t Udma_RmInitPrms::numGlobalEvent

Number of global event to be managed. Note: This cannot exceed UDMA_RM_MAX_GLOBAL_EVENT

◆ startVintr

uint32_t Udma_RmInitPrms::startVintr

Start VINT number from which this UDMA driver instance manages

◆ numVintr

uint32_t Udma_RmInitPrms::numVintr

Number of VINT to be managed. Note: This cannot exceed UDMA_RM_MAX_VINTR

◆ startIrIntr

uint32_t Udma_RmInitPrms::startIrIntr

Start IR interrupt from which this UDMA driver instance manages.

◆ numIrIntr

uint32_t Udma_RmInitPrms::numIrIntr

Number of IR interrupts to be managed. Note: This cannot exceed UDMA_RM_MAX_IR_INTR

◆ proxyThreadNum

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.

◆ startC7xCoreIntr

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.

◆ startC66xCoreIntr

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.

◆ startProxy

uint16_t Udma_RmInitPrms::startProxy

Start proxy from which this UDMA driver instance manages. Note this should not overlap with proxyThreadNum

◆ numProxy

uint16_t Udma_RmInitPrms::numProxy

Number of proxy to be managed. Note: This cannot exceed UDMA_RM_MAX_PROXY

◆ startRingMon

uint32_t Udma_RmInitPrms::startRingMon

Start monitor from which this UDMA driver instance manages

◆ numRingMon

uint32_t Udma_RmInitPrms::numRingMon

Number of monitors to be managed. Note: This cannot exceed UDMA_RM_MAX_RING_MON

◆ resId

uint32_t Udma_RmSharedResPrms::resId

UDMA Resource Id. Refer Udma_RmResId macros.

◆ startResrvCnt

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

◆ endResrvCnt

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

◆ numInst

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

◆ minReq

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.

◆ instShare

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