# MSMC Functions
[MSMC]

## Functions
CSL_IDEF_INLINE Uint32 | CSL_MSMC_getPID (void)
CSL_IDEF_INLINE Uint8 | CSL_MSMC_getModeChangeProgress (void)
CSL_IDEF_INLINE Uint32 | CSL_MSMC_getSoftErrorAddress (void)
CSL_IDEF_INLINE void | CSL_MSMC_getSoftErrorAddressExtension (Uint8 *esyn, Uint8 *address, Uint8 *sepId, Uint8 *ser)
CSL_IDEF_INLINE void | CSL_MSMC_setCounterBankRefreshRead (Uint32 refdel)
CSL_IDEF_INLINE Uint32 | CSL_MSMC_getCounterBankRefreshRead (void)
CSL_IDEF_INLINE Uint8 | CSL_MSMC_getParityRAM (void)
CSL_IDEF_INLINE Uint8 | CSL_MSMC_getCSE (void)
CSL_IDEF_INLINE void | CSL_MSMC_setCSE (Uint8 cse)
CSL_IDEF_INLINE Uint8 | CSL_MSMC_getECM (void)
CSL_IDEF_INLINE void | CSL_MSMC_setECM (Uint8 ecm)
CSL_IDEF_INLINE void | CSL_MSMC_enableScrubbingEngine (void)
CSL_IDEF_INLINE void | CSL_MSMC_disableScrubbingEngine (void)
CSL_IDEF_INLINE Uint32 | CSL_MSMC_getScrubbingEngineState (void)
CSL_IDEF_INLINE Uint32 | CSL_MSMC_getScrubErrorCorrectedAddress (void)
CSL_IDEF_INLINE Uint8 | CSL_MSMC_getSyndromeValue (void)
CSL_IDEF_INLINE Uint32 | CSL_MSMC_getScrubCorrectableErrorCounter (void)
CSL_IDEF_INLINE void | CSL_MSMC_clearScrubCorrectableErrorCounter (void)
CSL_IDEF_INLINE Uint32 | CSL_MSMC_getScrubNonCorrectableErrorCounter (void)
CSL_IDEF_INLINE void | CSL_MSMC_clearScrubNonCorrectableErrorCounter (void)
CSL_IDEF_INLINE Uint32 | CSL_MSMC_getFaultAddress (void)
CSL_IDEF_INLINE Uint8 | CSL_MSMC_getFaultAddressNMStatus (void)
CSL_IDEF_INLINE void | CSL_MSMC_getFaultInfo (Uint8 *faultPrivID, Uint8 *faultMstID)
CSL_IDEF_INLINE void | CSL_MSMC_clearFaultPrivID (void)
CSL_IDEF_INLINE Uint32 | CSL_MSMC_getSecurityThreshold (void)
CSL_IDEF_INLINE void | CSL_MSMC_setSecurityThreshold (Uint32 securityThreshold)
CSL_IDEF_INLINE Bool | CSL_MSMC_IsNonSecure (void)
CSL_IDEF_INLINE void | CSL_MSMC_SecureMSMC (void)
CSL_IDEF_INLINE void | CSL_MSMC_NonSecureMSMC (void)
CSL_IDEF_INLINE void | CSL_MSMC_setStarvationBoundCGEM (Uint32 index, Uint8 strvEmifArbiter, Uint8 strvRAMArbiter)
CSL_IDEF_INLINE void | CSL_MSMC_getStarvationBoundCGEM (Uint32 index, Uint8 *strvEmifArbiter, Uint8 *strvRAMArbiter)
CSL_IDEF_INLINE void | CSL_MSMC_setStarvationBoundSMS (Uint32 sbnd)
CSL_IDEF_INLINE Uint32 | CSL_MSMC_getStarvationBoundSMS (void)
CSL_IDEF_INLINE void | CSL_MSMC_setStarvationBoundSES (Uint32 sbnd)
CSL_IDEF_INLINE Uint32 | CSL_MSMC_getStarvationBoundSES (void)
CSL_IDEF_INLINE void | CSL_MSMC_setSMSMPAXH (Uint32 privid, Uint32 index, CSL_MSMC_SMSMPAXH *mpaxh)
CSL_IDEF_INLINE void | CSL_MSMC_getSMSMPAXH (Uint32 privid, Uint32 index, CSL_MSMC_SMSMPAXH *mpaxh)
CSL_IDEF_INLINE void | CSL_MSMC_setSMSMPAXL (Uint32 privid, Uint32 index, CSL_MSMC_SMSMPAXL *mpaxl)
CSL_IDEF_INLINE void | CSL_MSMC_getSMSMPAXL (Uint32 privid, Uint32 index, CSL_MSMC_SMSMPAXL *mpaxl)
CSL_IDEF_INLINE void | CSL_MSMC_setSESMPAXH (Uint32 privid, Uint32 index, CSL_MSMC_SESMPAXH *mpaxh)
CSL_IDEF_INLINE void | CSL_MSMC_getSESMPAXH (Uint32 privid, Uint32 index, CSL_MSMC_SESMPAXH *mpaxh)
CSL_IDEF_INLINE void | CSL_MSMC_setSESMPAXL (Uint32 privid, Uint32 index, CSL_MSMC_SESMPAXL *mpaxl)
CSL_IDEF_INLINE void | CSL_MSMC_getSESMPAXL (Uint32 privid, Uint32 index, CSL_MSMC_SESMPAXL *mpaxl)
CSL_IDEF_INLINE void | CSL_MSMC_lockNonMPAX (void)
CSL_IDEF_INLINE Bool | CSL_MSMC_isNonMPAXLocked (void)
CSL_IDEF_INLINE void | CSL_MSMC_unlockNonMPAX (void)
CSL_IDEF_INLINE void | CSL_MSMC_lockSMS (Uint32 privid)
CSL_IDEF_INLINE Bool | CSL_MSMC_isSMSLocked (Uint32 privId)
CSL_IDEF_INLINE void | CSL_MSMC_unlockSMS (Uint32 privid)
CSL_IDEF_INLINE void | CSL_MSMC_lockSES (Uint32 privid)
CSL_IDEF_INLINE Bool | CSL_MSMC_isSESLocked (Uint32 privId)
CSL_IDEF_INLINE void | CSL_MSMC_unlockSES (Uint32 privid)
CSL_IDEF_INLINE void | CSL_MSMC_getPendingInterrupts (Uint16 *pfeStat, Uint8 *cees, Uint8 *ncees, Uint8 *cses, Uint8 *ncses)
CSL_IDEF_INLINE void | CSL_MSMC_getRawInterruptStatus (Uint16 *pfeStat, Uint8 *cees, Uint8 *ncees, Uint8 *cses, Uint8 *ncses)
CSL_IDEF_INLINE void | CSL_MSMC_setRawInterruptStatus (Uint16 pfiStat, Uint8 cei, Uint8 ncei, Uint8 csi, Uint8 ncsi)
CSL_IDEF_INLINE void | CSL_MSMC_clearRawInterruptStatus (Uint16 pfiStat, Uint8 cei, Uint8 ncei, Uint8 csi, Uint8 ncsi)
CSL_IDEF_INLINE void | CSL_MSMC_getInterruptEnableStatus (Uint16 *pfiStat, Uint8 *cei, Uint8 *ncei, Uint8 *csi, Uint8 *ncsi)
CSL_IDEF_INLINE void | CSL_MSMC_enableInterrupts (Uint16 pfiStat, Uint8 cei, Uint8 ncei, Uint8 csi, Uint8 ncsi)
CSL_IDEF_INLINE void | CSL_MSMC_disableInterrupts (Uint16 pfiStat, Uint8 cei, Uint8 ncei, Uint8 csi, Uint8 ncsi)
CSL_IDEF_INLINE Uint32 | CSL_MSMC_getTransmitHeader (void)
CSL_IDEF_INLINE void | CSL_MSMC_setTransmitHeader (Uint32 transmitHeader)
CSL_IDEF_INLINE Uint32 | CSL_MSMC_getHitCounter (void)
CSL_IDEF_INLINE void | CSL_MSMC_setHitCounter (Uint32 hitCounter)
CSL_IDEF_INLINE void | CSL_MSMC_getMissCounter (Uint32 *readMiss, Uint32 *writeMiss)
CSL_IDEF_INLINE void | CSL_MSMC_setMissCounter (Uint32 readMiss, Uint32 writeMiss)
CSL_IDEF_INLINE Uint32 | CSL_MSMC_getVictimCounter (void)
CSL_IDEF_INLINE void | CSL_MSMC_setVictimCounter (Uint32 victimCounter)
CSL_IDEF_INLINE void | CSL_MSMC_getMemoryArbiterCounters (Uint8 *priorityElevationCounter, Uint32 *accCyclesCounter)
CSL_IDEF_INLINE void | CSL_MSMC_setMemoryArbiterCounters (Uint32 accCyclesCounter)
CSL_IDEF_INLINE void | CSL_MSMC_getPortArbiterCounters (Uint8 *priorityElevationCounter, Uint32 *accCyclesCounter)
CSL_IDEF_INLINE void | CSL_MSMC_setPortArbiterCounters (Uint32 accCyclesCounter)
CSL_IDEF_INLINE void | CSL_MSMC_getPerfFilters (Uint8 *ccf, Uint16 *pidf, Uint8 *hm, Uint8 *pth)
CSL_IDEF_INLINE void | CSL_MSMC_setPerfFilters (Uint8 ccf, Uint16 pidf, Uint8 hm, Uint8 pth)
CSL_IDEF_INLINE void | CSL_MSMC_enableAnalysisCounter (void)
CSL_IDEF_INLINE void | CSL_MSMC_disableAnalysisCounter (void)
CSL_IDEF_INLINE Uint8 | CSL_MSMC_getPriorityLevel (void)
CSL_IDEF_INLINE void | CSL_MSMC_setPriorityLevel (Uint8 priorityLevel)
CSL_IDEF_INLINE void | CSL_MSMC_freezeCache (void)
CSL_IDEF_INLINE void | CSL_MSMC_unFreezeCache (void)
CSL_IDEF_INLINE Bool | CSL_MSMC_isCacheFrozen (void)
CSL_IDEF_INLINE void | CSL_MSMC_invalidateCache (void)
CSL_IDEF_INLINE Uint32 | CSL_MSMC_getInvalidateCacheStatus (void)
CSL_IDEF_INLINE void | CSL_MSMC_setCacheSize (Uint32 cmode)
CSL_IDEF_INLINE Uint32 | CSL_MSMC_getCacheSize (void)
CSL_IDEF_INLINE Uint32 | CSL_MSMC_getSharedMemoryErrorAddress (void)
CSL_IDEF_INLINE void | CSL_MSMC_getSharedMemoryErrorAddressExtendedInfo (Uint8 *seeAddr, Uint8 *sepId, Uint8 *ser)
CSL_IDEF_INLINE Uint32 | CSL_MSMC_getScrubbingEngineErrorAddress ()

## Function Documentation

CSL_IDEF_INLINE void CSL_MSMC_clearFaultPrivID | ( | void |  | ) |

============================================================================
CSL_MSMC_clearFaultPrivID

Description
This function clears the faulted PrivID bit set in SMPFV register.

Arguments
None

Return Value
None

Pre Condition
None

Post Condition
Fault ID is cleared.

Writes
MSMC_SMPFCR_CLR=1

Example

            CSL_MSMC_clearFaultPrivID ();

=============================================================================

CSL_IDEF_INLINE void CSL_MSMC_clearRawInterruptStatus | ( | Uint16 | pfiStat,
|  | Uint8 | cei,
|  | Uint8 | ncei,
|  | Uint8 | csi,
|  | Uint8 | ncsi |
| ) |  |  |

============================================================================
CSL_MSMC_clearRawInterruptStatus

Description
This function clears the RAW Interrupt Status.

Arguments

              pfiStat       Protection Fault Status
              cei           Correctable EDC Error
              ncei          Non-Correctable EDC Error
              csi           Correctable Scrubbing Error
              ncsi          Non-Correctable Scrubbing Error

Return Value
None

Pre Condition
None

Post Condition
None

Writes
MSMC_SMIRC_PFIC, MSMC_SMIRC_MPEC, MSMC_SMIRC_CEC,
MSMC_SMIRC_NCEC, MSMC_SMIRC_CSC, MSMC_SMIRC_NCSC

Example

            Uint16  pfiStat;
            Uint8   cei;
            Uint8   ncei;
            Uint8   csi;
            Uint8   ncsi;

            // Get the MSMC Raw Interrupt Status
            CSL_MSMC_getRawInterruptStatus (&pfiStat, &cei, &ncei, &csi, &ncsi);
            ...
            // Clear the MSMC Interrupt Status.
            CSL_MSMC_clearRawInterruptStatus (pfiStat, cei, ncei, csi, ncsi);

=============================================================================

CSL_IDEF_INLINE void CSL_MSMC_clearScrubCorrectableErrorCounter | ( | void |  | ) |

============================================================================
CSL_MSMC_clearScrubCorrectableErrorCounter

Description
This function clears the Scrub Correctable Error Counter.

Arguments
None

Return Value
None

Pre Condition
None

Post Condition
SMSECC register configured with the value passed.

Writes
MSMC_SMSECC_SCEC=0

Example

            CSL_MSMC_clearScrubCorrectableErrorCounter ();

=============================================================================

CSL_IDEF_INLINE void CSL_MSMC_clearScrubNonCorrectableErrorCounter | ( | void |  | ) |

============================================================================
CSL_MSMC_clearScrubNonCorrectableErrorCounter

Description
his function clears the Scrub Non Correctable Error Counter.

Arguments
None

Return Value
None

Pre Condition
None

Post Condition
SMSECC register configured with the value passed.

Writes
MSMC_SMSECC_SNCEC=0

Example

            CSL_MSMC_clearScrubNonCorrectableErrorCounter ();

=============================================================================

CSL_IDEF_INLINE void CSL_MSMC_disableAnalysisCounter | ( | void |  | ) |

============================================================================
CSL_MSMC_disableAnalysisCounter

Description
This function disables the analysis counters

Arguments
None

Return Value
None

Pre Condition
None

Post Condition
None

Writes
MSMC_SMAC_AEN=0

Example

            // Disables the performance analysis counter
            CSL_MSMC_disableAnalysisCounter();

=============================================================================

CSL_IDEF_INLINE void CSL_MSMC_disableInterrupts | ( | Uint16 | pfiStat,
|  | Uint8 | cei,
|  | Uint8 | ncei,
|  | Uint8 | csi,
|  | Uint8 | ncsi |
| ) |  |  |

============================================================================
CSL_MSMC_disableInterrupts

Description
This function disables the MSMC interrupts

Arguments

              pfiStat       Protection Fault Status
              cei           Correctable EDC Error
              ncei          Non-Correctable EDC Error
              csi           Correctable Scrubbing Error
              ncsi          Non-Correctable Scrubbing Error

Return Value
None

Pre Condition
None

Post Condition
None

Writes
MSMC_SMIEC_PFIEC, MSMC_SMIEC_CEEC, MSMC_SMIEC_NCEEC,
MSMC_SMIEC_CSEC, MSMC_SMIEC_NCSEC

Example

            // Disable all interrupts except the scrubbing errors.
            CSL_MSMC_disableInterrupts (0xFFFF, 0x1, 0x1, 0x0, 0x0);

=============================================================================

CSL_IDEF_INLINE void CSL_MSMC_disableScrubbingEngine | ( | void |  | ) |

============================================================================
CSL_MSMC_disableScrubbingEngine

Description
This function disables the scrubbing engine.

Arguments
None

Return Value
None

Pre Condition
None

Post Condition
Scrubbing Engine is disabled.

Writes
MSMC_SMEDCC_SEN=1

Example

            CSL_MSMC_disableScrubbingEngine ();

=============================================================================

CSL_IDEF_INLINE void CSL_MSMC_enableAnalysisCounter | ( | void |  | ) |

============================================================================
CSL_MSMC_enableAnalysisCounter

Description
This function enables the analysis counters

Arguments
None

Return Value
None

Pre Condition
None

Post Condition
None

Writes
MSMC_SMAC_AEN=1

Example

            // Enables the performance analysis counter
            CSL_MSMC_enableAnalysisCounter();

=============================================================================

CSL_IDEF_INLINE void CSL_MSMC_enableInterrupts | ( | Uint16 | pfiStat,
|  | Uint8 | cei,
|  | Uint8 | ncei,
|  | Uint8 | csi,
|  | Uint8 | ncsi |
| ) |  |  |

============================================================================
CSL_MSMC_enableInterrupts

Description
This function enables the MSMC interrupts

Arguments

              pfiStat       Protection Fault Status
              cei           Correctable EDC Error
              ncei          Non-Correctable EDC Error
              csi           Correctable Scrubbing Error
              ncsi          Non-Correctable Scrubbing Error

Return Value
None

Pre Condition
None

Post Condition
None

Writes
MSMC_SMIESTAT_PFIESTAT, MSMC_SMIESTAT_CEIE, MSMC_SMIESTAT_NCEIE,
MSMC_SMIESTAT_CSIE,MSMC_SMIESTAT_NCSIE

Example

            // Enable all interrupts except the scrubbing errors.
            CSL_MSMC_enableInterrupts (0xFFFF, 0x1, 0x1, 0x0, 0x0);

=============================================================================

CSL_IDEF_INLINE void CSL_MSMC_enableScrubbingEngine | ( | void |  | ) |

============================================================================
CSL_MSMC_enableScrubbingEngine

Description
This function enables the scrubbing engine.

Arguments
None

Return Value
None

Pre Condition
None

Post Condition
Scrubbing Engine is enabled.

Writes
MSMC_SMEDCC_SEN=0

Example

            CSL_MSMC_enableScrubbingEngine ();

=============================================================================

CSL_IDEF_INLINE void CSL_MSMC_freezeCache | ( | void |  | ) |

============================================================================
CSL_MSMC_freezeCache

Description
This function freezes the MSMC cache

Arguments
None

Return Value
None

Pre Condition
None

Post Condition
None

Writes
MSMC_SMCFG_EFZ=1

Example

            // Freeze the MSMC Cache
            CSL_MSMC_freezeCache ();

=============================================================================

CSL_IDEF_INLINE Uint32 CSL_MSMC_getCacheSize | ( | void |  | ) |

============================================================================
CSL_MSMC_getCacheSize

Description
This function returns the amount of memory configured as cache.

Arguments
None

Return Value
Cache Size

Pre Condition
None

Post Condition
None

Reads
MSMC_SMCFG_CMODE

Example

            Uint32  cacheSize;

            cacheSize = CSL_MSMC_getCacheSize ();

=============================================================================

CSL_IDEF_INLINE Uint32 CSL_MSMC_getCounterBankRefreshRead | ( | void |  | ) |

============================================================================
CSL_MSMC_getCounterBankRefreshRead

Description
This function gets REFDEL counter to the number of MSMC clock cycles between each bank refresh read access.

Arguments
None

Return Value REFDEL counter

Pre Condition
None

Post Condition
None

Reads
MSMC_SMEDCC_REFDEL

Example

           	Uint32 refdel;

            refdel = CSL_MSMC_getCounterBankRefreshRead ();

=============================================================================

CSL_IDEF_INLINE Uint8 CSL_MSMC_getCSE | ( | void |  | ) |

============================================================================
CSL_MSMC_getCSE

Description
This function programs reads the CSE bit to determine if there is a parity mismatch

Arguments

            None

Return Value
CSE Status

Pre Condition
None

Post Condition
None

Reads
MSMC_SMEDCC_CSE

Example

            Uint8 cse;

            cse = CSL_MSMC_getCSE ();

=============================================================================

CSL_IDEF_INLINE Uint8 CSL_MSMC_getECM | ( | void |  | ) |

============================================================================
CSL_MSMC_getECM

Description
This function programs gets the status of the error correcting mode

Arguments

            None

Return Value
ECM Mode

Pre Condition
None

Post Condition
None

Reads
MSMC_SMEDCC_ECM

Example

            Uint8 ecm;

            ecm = CSL_MSMC_getECM ();

=============================================================================

CSL_IDEF_INLINE Uint32 CSL_MSMC_getFaultAddress | ( | void |  | ) |

============================================================================
CSL_MSMC_getFaultAddress

Description
This function gets the access address causing the fault.

Arguments
None

Return Value Fault Address

Pre Condition
None

Post Condition
None

Reads
MSMC_SMPFAR_FAULT_ADDRESS

Example

            Uint32 faultAddr;

            faultAddr = CSL_MSMC_getFaultAddress ();

=============================================================================

CSL_IDEF_INLINE Uint8 CSL_MSMC_getFaultAddressNMStatus | ( | void |  | ) |

============================================================================
CSL_MSMC_getFaultAddressNMStatus

Description
This function gets the NM Status which is set if the access address causing the fault does not match any of the segment BADDR

Arguments
None

Return Value Fault Address NM Status

Pre Condition
None

Post Condition
None

Reads
MSMC_SMPFXR_NM

Example

            Uint8 faultNMStatus;

            faultNMStatus = CSL_MSMC_getFaultAddressNMStatus ();

=============================================================================

CSL_IDEF_INLINE void CSL_MSMC_getFaultInfo | ( | Uint8 * | faultPrivID,
|  | Uint8 * | faultMstID |
| ) |  |  |

============================================================================
CSL_MSMC_getFaultInfo

Description
This function gets the MSMC fault information. This include the event bits event bits for all PrivID's and the Master ID which caused the fault.

Arguments

              faultPrivID      Fault Priv ID populated by this API.
              faultMstID       Fault Master ID populated by this API.

Return Value
None

Pre Condition
None

Post Condition
None

Reads
MSMC_SMPFR_FPID, MSMC_SMPFR_FMSTID

Example

            Uint8   faultPrivID;
            Uint8   faultMstID;

            // Get the fault information.
            CSL_MSMC_getFaultInfo &faultPrivID, &faultMstID);

=============================================================================

CSL_IDEF_INLINE Uint32 CSL_MSMC_getHitCounter | ( | void |  | ) |

============================================================================
CSL_MSMC_getHitCounter

Description
This function gets the hit counter for the cache. If the HM bit in SMAC is set, it is a counter for Cache hits+SRAM accesses

Arguments
None

Return Value
Hit Counter

Pre Condition
None

Post Condition
None

Reads
MSMC_SMAH_HCNT

Example

            Uint32  hitCounter;

            // Get the Hit Counter
            hitCounter = CSL_MSMC_getHitCounter();

=============================================================================

CSL_IDEF_INLINE void CSL_MSMC_getInterruptEnableStatus | ( | Uint16 * | pfiStat,
|  | Uint8 * | cei,
|  | Uint8 * | ncei,
|  | Uint8 * | csi,
|  | Uint8 * | ncsi |
| ) |  |  |

============================================================================
CSL_MSMC_getInterruptEnableStatus

Description
This function is used to get the interrupt enable/disable status

Arguments

              pfiStat       Protection Fault Status
              cei           Correctable EDC Error
              ncei          Non-Correctable EDC Error
              csi           Correctable Scrubbing Error
              ncsi          Non-Correctable Scrubbing Error

Return Value
None

Pre Condition
None

Post Condition
None

Reads
MSMC_SMIESTAT_PFIESTAT, MSMC_SMIESTAT_CEIE, MSMC_SMIESTAT_NCEIE,
MSMC_SMIESTAT_CSIE,MSMC_SMIESTAT_NCSIE

Example

            Uint16  pfiStat;
            Uint8   cei;
            Uint8   ncei;
            Uint8   csi;
            Uint8   ncsi;

            // Get the interrupt enable status.
            CSL_MSMC_getInterruptEnableStatus (&pfiStat, &cei, &ncei, &csi, &ncsi);

=============================================================================

CSL_IDEF_INLINE Uint32 CSL_MSMC_getInvalidateCacheStatus | ( | void |  | ) |

============================================================================
CSL_MSMC_getInvalidateCacheStatus

Description
This function returns the value of invalidate bit in SMCFG register.

Arguments
None

Return Value

Pre Condition
None

Post Condition
None

Reads
MSMC_SMCFG_GIW

Example

            Uint32 invStatus;

            invStatus = CSL_MSMC_getInvalidateCacheStatus ();

=============================================================================

CSL_IDEF_INLINE void CSL_MSMC_getMemoryArbiterCounters | ( | Uint8 * | priorityElevationCounter,
|  | Uint32 * | accCyclesCounter |
| ) |  |  |

============================================================================
CSL_MSMC_getMemoryArbiterCounters

Description
This function gets the performance counters for the memory arbiters (all banks).

Arguments

              priorityElevationCounter  Priority Elevation Counter
              accCyclesCounter          Accumulated Cycles counter

Return Value
None

Pre Condition
None

Post Condition
None

Reads
MSMC_SMAMP_MPECNT, MSMC_SMAMP_ACWM

Example

            Uint8   priorityElevationCounter;
            Uint32  accCyclesCounter;

            // Get the Memory Arbiter Counters
            CSL_MSMC_getMemoryArbiterCounters(&priorityElevationCounter, &accCyclesCounter);

=============================================================================

CSL_IDEF_INLINE void CSL_MSMC_getMissCounter | ( | Uint32 * | readMiss,
|  | Uint32 * | writeMiss |
| ) |  |  |

============================================================================
CSL_MSMC_getMissCounter

Description
This function gets the reads/write miss counters

Arguments

              readMissCntr      Read Miss Counter
              writeMissCntr     Write Miss Counter

Return Value
None

Pre Condition
None

Post Condition
None

Reads
MSMC_SMARM_RMCNT,MSMC_SMAWM_WMCNT

Example

            Uint32  readMiss;
            Uint32  writeMiss;

            // Get the Read and Write Miss Counters
            CSL_MSMC_getMissCounter(&readMiss, &writeMiss);

=============================================================================

CSL_IDEF_INLINE Uint8 CSL_MSMC_getModeChangeProgress | ( | void |  | ) |

============================================================================
CSL_MSMC_getModeChangeProgress

Description
This function gets the mode change progress flag

Arguments
None

Return Value
None

Pre Condition
None

Post Condition
None

Reads
MSMC_SMCC_MCP

Example

            Uint8   mcpFlag;

            // Get the Mode change progress flag
            mcpFlag = CSL_MSMC_getModeChangeProgress ();

=============================================================================

CSL_IDEF_INLINE Uint8 CSL_MSMC_getParityRAM | ( | void |  | ) |

============================================================================
CSL_MSMC_getParityRAM

Description
This function programs gets the parity RAM status

Arguments

            None

Return Value
Parity RAM

Pre Condition
None

Post Condition
None

Reads
MSMC_SMEDCC_PRR

Example

            Uint8 parityRAM;

            parityRAM = CSL_MSMC_getParityRAM ();

=============================================================================

CSL_IDEF_INLINE void CSL_MSMC_getPendingInterrupts | ( | Uint16 * | pfeStat,
|  | Uint8 * | cees,
|  | Uint8 * | ncees,
|  | Uint8 * | cses,
|  | Uint8 * | ncses |
| ) |  |  |

============================================================================
CSL_MSMC_getPendingInterrupts

Description
This function gets the status of all pending interrupts i.e. which have been enabled and an interrupt has occurred.

Arguments

              pfeStat      Protection Fault Status
              cees         Correctable EDC Error
              ncees        Non-Correctable EDC Error
              cses         Correctable Scrubbing Error
              nces         Non-Correctable Scrubbing Error

Return Value
None

Pre Condition
None

Post Condition
None

Reads
MSMC_SMESTAT_PFESTAT, MSMC_SMESTAT_CEES, MSMC_SMESTAT_NCEES,
MSMC_SMESTAT_CSES, MSMC_SMESTAT_NCSES

Example

            Uint16  pfeStat;
            Uint8   cees;
            Uint8   ncees;
            Uint8   cses;
            Uint8   ncses;

            // Get the MSMC Pending Interrupt Status
            CSL_MSMC_getPendingInterrupts (&pfeStat,&cees, &ncees, &cses, &ncses);

=============================================================================

CSL_IDEF_INLINE void CSL_MSMC_getPerfFilters | ( | Uint8 * | ccf,
|  | Uint16 * | pidf,
|  | Uint8 * | hm,
|  | Uint8 * | pth |
| ) |  |  |

============================================================================
CSL_MSMC_getPerfFilters

Description
This function gets the performance counters filters

Arguments

              ccf           CPU filter for counters
              pidf          System request PrivID filter for counters
              hm            Selects if SMAH:HCNT counts only cache hits or SRAM accesses
              pth           Priority threshold filter

Return Value
None

Pre Condition
None

Post Condition
None

Reads
MSMC_SMAC_CCF, MSMC_SMAC_PIDF, MSMC_SMAC_HM, MSMC_SMAC_PTH

Example

            Uint8   ccf;
            Uint16  pidf;
            Uint8   hm;
            Uint8   pth;

            // Get the Performance Filters
            CSL_MSMC_getPerfFilters(&ccf, &pidf, &hm, &pth);

=============================================================================

CSL_IDEF_INLINE Uint32 CSL_MSMC_getPID | ( | void |  | ) |

============================================================================
CSL_MSMC_getPID

Description
This function gets the peripheral ID register for the MSMC IP.

Arguments
None

Return Value
None

Pre Condition
None

Post Condition
None

Reads
MSMC_PID

Example

            Uint32   pid;

            // Get the Mode change progress flag
            mcpFlag = CSL_MSMC_getModeChangeProgress ();

=============================================================================

CSL_IDEF_INLINE void CSL_MSMC_getPortArbiterCounters | ( | Uint8 * | priorityElevationCounter,
|  | Uint32 * | accCyclesCounter |
| ) |  |  |

============================================================================
CSL_MSMC_getPortArbiterCounters

Description
This function gets the performance counters for the port arbiters

Arguments

              priorityElevationCounter  Priority Elevation Counter
              accCyclesCounter          Accumulated Cycles counter

Return Value
None

Pre Condition
None

Post Condition
None

Reads
MSMC_SMAEP_EPECNT, MSMC_SMAEP_ACWE

Example

            Uint8   priorityElevationCounter;
            Uint32  accCyclesCounter;

            // Get the Port Arbiter Counters
            CSL_MSMC_getPortArbiterCounters(&priorityElevationCounter, &accCyclesCounter);

=============================================================================

CSL_IDEF_INLINE Uint8 CSL_MSMC_getPriorityLevel | ( | void |  | ) |

============================================================================
CSL_MSMC_getPriorityLevel

Description
This function gets the priority level used for software initiated global invalidate

Arguments
None

Return Value
None

Pre Condition
None

Post Condition
None

Reads
MSMC_SMCFG_INVP

Example

            Uint8   priorityLevel;

            // Get the priority Level.
            priorityLevel = CSL_MSMC_getPriorityLevel ();

=============================================================================

CSL_IDEF_INLINE void CSL_MSMC_getRawInterruptStatus | ( | Uint16 * | pfeStat,
|  | Uint8 * | cees,
|  | Uint8 * | ncees,
|  | Uint8 * | cses,
|  | Uint8 * | ncses |
| ) |  |  |

============================================================================
CSL_MSMC_getRawInterruptStatus

Description
This function gets the RAW Interrupt Status.

Arguments

              pfeStat      Protection Fault Status
              cees         Correctable EDC Error
              ncees        Non-Correctable EDC Error
              cses         Correctable Scrubbing Error
              nces         Non-Correctable Scrubbing Error

Return Value
None

Pre Condition
None

Post Condition
None

Reads
MSMC_SMIRSTAT_PFESTAT, MSMC_SMIRSTAT_CEES, MSMC_SMIRSTAT_NCEES,
MSMC_SMIRSTAT_CSES, MSMC_SMIRSTAT_NCSES

Example

            Uint16  pfeStat;
            Uint8   cees;
            Uint8   ncees;
            Uint8   cses;
            Uint8   ncses;

            // Get the MSMC Raw Interrupt Status
            CSL_MSMC_getRawInterruptStatus (&pfeStat, &cees, &ncees, &cses, &ncses);

=============================================================================

CSL_IDEF_INLINE Uint32 CSL_MSMC_getScrubbingEngineErrorAddress | ( |  | ) |

============================================================================
CSL_MSMC_getScrubbingEngineErrorAddress

Description
This function returns the scrubbing engine address after a 2-bit non correctable address is detected.

Arguments
None

Return Value
Address which caused the error

Pre Condition
None

Post Condition
None

Reads
MSMC_SMNCEA_SENCA

Example

            Uint32 errAddress;

            errAddress = CSL_MSMC_getScrubbingEngineErrorAddress ();

=============================================================================

CSL_IDEF_INLINE Uint32 CSL_MSMC_getScrubbingEngineState | ( | void |  | ) |

============================================================================
CSL_MSMC_getScrubbingEngineState

Description
This function gets the state of scrubbing engine, if it is enabled/disabled.

Arguments
None

Return Value

- 1 - Scrubbing Engine is enabled.
- 0 - Scrubbing Engine is disabled.

Pre Condition
None

Post Condition
None

Reads
MSMC_SMEDCC_SEN

Example

         	Uint32 stateSE;

            stateSE = CSL_MSMC_getScrubbingEngineState ();

=============================================================================

CSL_IDEF_INLINE Uint32 CSL_MSMC_getScrubCorrectableErrorCounter | ( | void |  | ) |

============================================================================
CSL_MSMC_getScrubCorrectableErrorCounter

Description
This function gets the Scrubbing Engine Correctable Error Counter.

Arguments
None

Return Value Uint32

Pre Condition
None

Post Condition
None

Reads
MSMC_SMSECC_SCEC

Example

            Uint32 cCounter;

            cCounter = CSL_MSMC_getScrubCorrectableErrorCounter ();

=============================================================================

CSL_IDEF_INLINE Uint32 CSL_MSMC_getScrubErrorCorrectedAddress | ( | void |  | ) |

============================================================================
CSL_MSMC_getScrubErrorCorrectedAddress

Description
This function gets address of the location whose contents have been corrected by the scrubbing engine.

Arguments
None

Return Value Uint32

Pre Condition
None

Post Condition
None

Reads
MSMC_SMCEA_SECA

Example

            Uint32 correctedAddr;

            correctedAddr = CSL_MSMC_getScrubErrorCorrectedAddress ();

=============================================================================

CSL_IDEF_INLINE Uint32 CSL_MSMC_getScrubNonCorrectableErrorCounter | ( | void |  | ) |

============================================================================
CSL_MSMC_getScrubNonCorrectableErrorCounter

Description
This function gets the Scrubbing Engine NonCorrectable Error Counter.

Arguments
None

Return Value Uint32

Pre Condition
None

Post Condition
None

Reads
MSMC_SMSECC_SNCEC

Example

            Uint32 ncCounter;

            ncCounter = CSL_MSMC_getScrubNonCorrectableErrorCounter ();

=============================================================================

CSL_IDEF_INLINE Uint32 CSL_MSMC_getSecurityThreshold | ( | void |  | ) |

============================================================================
CSL_MSMC_getSecurityThreshold

Description
This function gets the Security Threshold Address register. All addresses above (and including) the address contained in the SMSTA register are deemed as being secure and can only be accessed by secure mode code

Arguments
None

Return Value
None

Pre Condition
None

Post Condition
None

Reads
MSMC_SMSTA_SECURITY_THRESHOLD_SEGMENT_ADDRESS

Example

            Uint32  secThreshold;

            // Get the security Threshold.
            secThreshold = CSL_MSMC_getSecurityThreshold ();

=============================================================================

CSL_IDEF_INLINE void CSL_MSMC_getSESMPAXH | ( | Uint32 | privid,
|  | Uint32 | index,
|  | CSL_MSMC_SESMPAXH * | mpaxh |
| ) |  |  |

============================================================================
CSL_MSMC_getSESMPAXH

Description
This function gets the contents of SES_MPAXH register.

Arguments

              privid      PrivID
              index       Index into the set of 8 registers for this particular
                          PrivID
              mpaxh       CSL_MSMC_SESMPAXH structure that needs to be set into the
                          register

Return Value
None

Pre Condition
None

Post Condition
None

Reads
MSMC_SES_MPAXH_0_BE..MSMC_SES_MPAXH_7_BE, MSMC_SES_MPAXH_0_AI..MSMC_SES_MPAXH_7_AI, MSMC_SES_MPAXH_0_SEGSZ..MSMC_SES_MPAXH_7_SEGSZ, MSMC_SES_MPAXH_0_BADDR..MSMC_SES_MPAXH_7_BADDR

Example

            Uint32 privid = 1;
            Uint32 index = 0;
            CSL_MSMC_SESMPAXH mpaxh;

            CSL_MSMC_getSESMPAXH (privid, index, &mpaxh);

=============================================================================

CSL_IDEF_INLINE void CSL_MSMC_getSESMPAXL | ( | Uint32 | privid,
|  | Uint32 | index,
|  | CSL_MSMC_SESMPAXL * | mpaxl |
| ) |  |  |

============================================================================
CSL_MSMC_getSESMPAXL

Description
This function gets the contents of SES_MPAXL register.

Arguments

              privid      PrivID
              index       Index into the set of 8 registers for this particular
                          PrivID
              mpaxl       CSL_MSMC_SESMPAXL structure that needs to be set into the
                          register

Return Value
None

Pre Condition
None

Post Condition
None

Reads
MSMC_SES_MPAXL_0_UX..MSMC_SES_MPAXL_7_UX, MSMC_SES_MPAXL_0_UW..MSMC_SES_MPAXL_7_UW, MSMC_SES_MPAXL_0_UR..MSMC_SES_MPAXL_7_UR, MSMC_SES_MPAXL_0_SX..MSMC_SES_MPAXL_7_SX, MSMC_SES_MPAXL_0_SW..MSMC_SES_MPAXL_7_SW, MSMC_SES_MPAXL_0_SR..MSMC_SES_MPAXL_7_SR, MSMC_SES_MPAXL_0_RADDR..MSMC_SES_MPAXL_7_RADDR

Example

            Uint32 privid = 1;
            Uint32 index = 0;
            CSL_MSMC_SESMPAXL mpaxl;

            CSL_MSMC_getSESMPAXL (privid, index, &mpaxl);

=============================================================================

CSL_IDEF_INLINE Uint32 CSL_MSMC_getSharedMemoryErrorAddress | ( | void |  | ) |

============================================================================
CSL_MSMC_getSharedMemoryErrorAddress

Description
This function returns the lower 32 bits of the 36 bit address used in the accessing the corrupted location.

Arguments
None

Return Value
Shared Memory Error Address

Pre Condition
None

Post Condition
None

Reads
MSMC_SMNCERRAR

Example

            Uint32  memErrAddress;

            memErrAddress = CSL_MSMC_getSharedMemoryErrorAddress ();

=============================================================================

CSL_IDEF_INLINE void CSL_MSMC_getSharedMemoryErrorAddressExtendedInfo | ( | Uint8 * | seeAddr,
|  | Uint8 * | sepId,
|  | Uint8 * | ser |
| ) |  |  |

============================================================================
CSL_MSMC_getSharedMemoryErrorAddressExtendedInfo

Description
This function returns extended information i.e. upper 4 bits, priv id which caused the error which accessing the corrupted location.

Arguments
None

Return Value
Shared Memory Extended Information

Pre Condition
None

Post Condition
None

Reads
MSMC_SMNCERRXR_SEEADDR, MSMC_SMNCERRXR_SEPID, MSMC_SMNCERRXR_SER

Example

            Uint8  seeAddr;
            Uint8  sepId;
            Uint8  ser;

            CSL_MSMC_getSharedMemoryErrorAddressExtendedInfo (&seeAddr, &sepId, &ser);

=============================================================================

CSL_IDEF_INLINE void CSL_MSMC_getSMSMPAXH | ( | Uint32 | privid,
|  | Uint32 | index,
|  | CSL_MSMC_SMSMPAXH * | mpaxh |
| ) |  |  |

============================================================================
CSL_MSMC_getSMSMPAXH

Description
This function gets the contents of SMS_MPAXH register.

Arguments

              privid      PrivID
              index       Index into the set of 8 registers for this particular
                          PrivID
              mpaxh       CSL_MSMC_SMSMPAXH structure that needs to be set into the
                          register

Return Value
None

Pre Condition
None

Post Condition
None

Reads
MSMC_SMS_MPAXH_0_SEGSZ..MSMC_SMS_MPAXH_7_SEGSZ, MSMC_SMS_MPAXH_0_BADDR..MSMC_SMS_MPAXH_7_BADDR

Example

            Uint32 privid = 1;
            Uint32 index = 0;
            CSL_MSMC_SMSMPAXH mpaxh;

            CSL_MSMC_getSMSMPAXH (privid, index, &mpaxh);

=============================================================================

CSL_IDEF_INLINE void CSL_MSMC_getSMSMPAXL | ( | Uint32 | privid,
|  | Uint32 | index,
|  | CSL_MSMC_SMSMPAXL * | mpaxl |
| ) |  |  |

============================================================================
CSL_MSMC_getSMSMPAXL

Description
This function gets the contents of SMS_MPAXL register.

Arguments

              privid      PrivID
              index       Index into the set of 8 registers for this particular
                          PrivID
              mpaxl       CSL_MSMC_SMSMPAXL structure that needs to be set into the
                          register

Return Value
None

Pre Condition
None

Post Condition
None

Reads
MSMC_SMS_MPAXL_0_UX..MSMC_SMS_MPAXL_7_UX, MSMC_SMS_MPAXL_0_UW..MSMC_SMS_MPAXL_7_UW, MSMC_SMS_MPAXL_0_UR..MSMC_SMS_MPAXL_7_UR, MSMC_SMS_MPAXL_0_SX..MSMC_SMS_MPAXL_7_SX, MSMC_SMS_MPAXL_0_SW..MSMC_SMS_MPAXL_7_SW, MSMC_SMS_MPAXL_0_SR..MSMC_SMS_MPAXL_7_SR, MSMC_SMS_MPAXL_0_RADDR..MSMC_SMS_MPAXL_7_RADDR,

Example

    		Uint32 privid = 1;
    		Uint32 index = 0;
    		CSL_MSMC_SMSMPAXL mpaxl;

    		CSL_MSMC_getSMSMPAXL (privid, index, &mpaxl);

=============================================================================

CSL_IDEF_INLINE Uint32 CSL_MSMC_getSoftErrorAddress | ( | void |  | ) |

============================================================================
CSL_MSMC_getSoftErrorAddress

Description
When ECM bit is 1 in SMCFG register this function gets the corrupted location error address.

Arguments
None

Return Value Sof Error Address.

Pre Condition
None

Post Condition
None

Reads
MSMC_SMCERRAR_SEADDR

Example

            Uint32 errAddr;

            errAddr = CSL_MSMC_getSoftErrorAddress ();

=============================================================================

CSL_IDEF_INLINE void CSL_MSMC_getSoftErrorAddressExtension | ( | Uint8 * | esyn,
|  | Uint8 * | address,
|  | Uint8 * | sepId,
|  | Uint8 * | ser |
| ) |  |  |

============================================================================
CSL_MSMC_getSoftErrorAddressExtension

Description
This function gets the address extension used for the faulting address.

Arguments
None

Return Value Soft Address Extension.

Pre Condition
None

Post Condition
None

Reads
MSMC_SMCERRXR_ESYN, MSMC_SMCERRXR_SEEADDR, MSMC_SMCERRXR_SEPID,MSMC_SMCERRXR_SER

Example

        	Uint8   esyn;
        	Uint8   errAddrExt;
        	Uint8   sepId;
        	Uint8   ser;

            CSL_MSMC_getSoftErrorAddressExtension (&esyn, &errAddrExt, &sepId, &ser);

=============================================================================

CSL_IDEF_INLINE void CSL_MSMC_getStarvationBoundCGEM | ( | Uint32 | index,
|  | Uint8 * | strvEmifArbiter,
|  | Uint8 * | strvRAMArbiter |
| ) |  |  |

============================================================================
CSL_MSMC_getStarvationBoundCGEM

Description
This function gets the starvation bound for CCGEM slaves.

Arguments

              index	            CGEM slave index
              strvEmifArbiter   Starvation bound for the EMIF Arbiter
              strvRAMArbiter    Starvation bound for the RAM Bank Arbiter

Return Value
None

Pre Condition
None

Post Condition
None

Reads
MSMC_SBNDC0_SCNTCE, MSMC_SBNDC0_SCNTCM

Example

            Uint8 strvEMIF;
            Uint8 strvRAM;

            CSL_MSMC_getStarvationBoundCGEM (1, &strvEMIF, &strvRAM);

=============================================================================

CSL_IDEF_INLINE Uint32 CSL_MSMC_getStarvationBoundSES | ( | void |  | ) |

============================================================================
CSL_MSMC_getStarvationBoundSES

Description
This function gets the starvation bound for SES port.

Arguments
None

Return Value Starvation Bound for the SES Port.

Pre Condition
None

Post Condition
None

Reads
MSMC_SBNDE_SCNTEM

Example

            Uint32 sbnde;

            sbnde = CSL_MSMC_getStarvationBoundSES ();

=============================================================================

CSL_IDEF_INLINE Uint32 CSL_MSMC_getStarvationBoundSMS | ( | void |  | ) |

============================================================================
CSL_MSMC_getStarvationBoundSMS

Description
This function gets the starvation bound for SMS port.

Arguments
None

Return Value Starvation Bound for the SMS Port.

Pre Condition
None

Post Condition
None

Reads
MSMC_SBNDM_SCNTMM

Example

            Uint32 sbndm;

            sbndm = CSL_MSMC_getStarvationBoundSMS ();

=============================================================================

CSL_IDEF_INLINE Uint8 CSL_MSMC_getSyndromeValue | ( | void |  | ) |

============================================================================
CSL_MSMC_getSyndromeValue

Description
This function gets the syndrome value that identifies the erroneous bit in the data which the scrubbing engine has corrected.

Arguments
None

Return Value
ESYN Field

Pre Condition
None

Post Condition
SMSECA register configured with the value zero.

Reads
MSMC_SMCEA_ESYN

Example

            Uint8   esynValue;

            esynValue = CSL_MSMC_getSyndromeValue ();

=============================================================================

CSL_IDEF_INLINE Uint32 CSL_MSMC_getTransmitHeader | ( | void |  | ) |

============================================================================
CSL_MSMC_getTransmitHeader

Description
This function gets the transmit header for analysis counter state export through STM

Arguments
None

Return Value
Transmit Header

Pre Condition
None

Post Condition
None

Reads
MSMC_SMATH

Example

            Uint32  transmitHeader;

            // Get the Transmit Header
            transmitHeader = CSL_MSMC_getTransmitHeader();

=============================================================================

CSL_IDEF_INLINE Uint32 CSL_MSMC_getVictimCounter | ( | void |  | ) |

============================================================================
CSL_MSMC_getVictimCounter

Description
This function gets the victim counter

Arguments
None

Return Value
Victim Counter

Pre Condition
None

Post Condition
None

Reads
MSMC_SMAV_VCNT

Example

            Uint32  victimCounter;

            // Get the Victim Counter
            victimCounter = CSL_MSMC_getVictimCounter();

=============================================================================

CSL_IDEF_INLINE void CSL_MSMC_invalidateCache | ( | void |  | ) |

============================================================================
CSL_MSMC_invalidateCache

Description
This function does a global invalidation of all the lines in the cache.

Arguments
None

Return Value
None

Pre Condition
None

Post Condition
All Cache lines are invalidated.

Writes
MSMC_SMCFG_GIW=1

Example

            CSL_MSMC_invalidateCache ();

=============================================================================

CSL_IDEF_INLINE Bool CSL_MSMC_isCacheFrozen | ( | void |  | ) |

============================================================================
CSL_MSMC_isCacheFrozen

Description
This function checks if the MSMC cache is frozen or not?

Arguments
None

Return Value
TRUE - Cache is frozen
FALSE - Cache is not frozen

Pre Condition
None

Post Condition
None

Reads
MSMC_SMCFG_EFZ

Example

            // Check the status of the cache
            if (CSL_MSMC_isCacheFrozen () == TRUE)
            {
                // Cache is frozen.
            }
            else
            {
                // Cache is NOT frozen.
            }

=============================================================================

CSL_IDEF_INLINE Bool CSL_MSMC_isNonMPAXLocked | ( | void |  | ) |

============================================================================
CSL_MSMC_isNonMPAXLocked

Description
This function gets the status of the lock for non MPAX registers.

Arguments
None

Return Value
TRUE - Non MPAX Register Write Access is locked
FALSE - Non MPAX Register Write Access is unlocked

Pre Condition
None

Post Condition
None

Reads
MSMC_CFGLCKSTAT_WSTAT

Example

            if (CSL_MSMC_isNonMPAXLocked () == TRUE)
            {
                // Non MPAX Registers are locked.
            }
            else
            {
               // MPAX Registers are not locked.
            }

=============================================================================

CSL_IDEF_INLINE Bool CSL_MSMC_IsNonSecure | ( | void |  | ) |

============================================================================
CSL_MSMC_IsNonSecure

Description
This function checks if the MSMC SRAM is secure or not?

Arguments
None

Return Value
TRUE - MSMC SRAM is non-secure
FALSE - MSMC SRAM is secure

Pre Condition
None

Post Condition
None

Reads
MSMC_SMSTA_NS

Example

            // Check if the MSMC SRAM is secure or not?
            if (CSL_MSMC_IsNonSecure () == TRUE)
            {
                // MSMC SRAM is Non-Secure
                ...
            }
            else
            {
                // MSMC SRAM is Secure
                ...
            }

=============================================================================

CSL_IDEF_INLINE Bool CSL_MSMC_isSESLocked | ( | Uint32 | privId | ) |

============================================================================
CSL_MSMC_isSESLocked

Description
This function gets the status of the lock for SES MPAX registers for the specific priv-id

Arguments

              privid      PrivID for which the status is required.

Return Value
TRUE - SES MPAX Register Write Access is locked for the priv-id
FALSE - SES MPAX Register Write Access is unlocked for the priv-id

Pre Condition
None

Post Condition
None

Reads
MSMC_SES_MPAX_LCKSTAT_WSTAT

Example

            if (CSL_MSMC_isSESLocked (1) == TRUE)
            {
                // SES MPAX Registers for Priv-ID 1 are locked.
            }
            else
            {
               // SES MPAX Registers for Priv-ID 1 are not locked.
            }

=============================================================================

CSL_IDEF_INLINE Bool CSL_MSMC_isSMSLocked | ( | Uint32 | privId | ) |

============================================================================
CSL_MSMC_isSMSLocked

Description
This function gets the status of the lock for SMS MPAX registers for the specific priv-id

Arguments

              privid      PrivID for which the status is required.

Return Value
TRUE - SMS MPAX Register Write Access is locked for the priv-id
FALSE - SMS MPAX Register Write Access is unlocked for the priv-id

Pre Condition
None

Post Condition
None

Reads
MSMC_SMS_MPAX_LCKSTAT_WSTAT

Example

            if (CSL_MSMC_isSMSLocked (1) == TRUE)
            {
                // SMS MPAX Registers for Priv-ID 1 are locked.
            }
            else
            {
               // SMS MPAX Registers for Priv-ID 1 are not locked.
            }

=============================================================================

CSL_IDEF_INLINE void CSL_MSMC_lockNonMPAX | ( | void |  | ) |

============================================================================
CSL_MSMC_lockNonMPAX

Description
This function locks the write access for all non MPAX registers.

Arguments
None

Return Value
None

Pre Condition
None

Post Condition
All the non MPAX registers are locked for write-access.

Writes
MSMC_CFGLCK_MGCID=0x2CD00000,MSMC_CFGLCK_WLCK=1

Example

            CSL_MSMC_lockNonMPAX ();

=============================================================================

CSL_IDEF_INLINE void CSL_MSMC_lockSES | ( | Uint32 | privid | ) |

============================================================================
CSL_MSMC_lockSES

Description
This function locks the write access for all SES MPAX registers.

Arguments

              privid      PrivID for which the SES MPAX registers will be locked.

Return Value
None

Pre Condition
None

Post Condition
All the SES MPAX registers for the specific PrivID are locked for write-access.

Writes
MSMC_SES_MPAX_LCK_MGCID=0x2CD20000,MSMC_SES_MPAX_LCK_WLCK

Example

            // Lock SES MPAX registers for priv-id 1.
            CSL_MSMC_lockSES (1);

=============================================================================

CSL_IDEF_INLINE void CSL_MSMC_lockSMS | ( | Uint32 | privid | ) |

============================================================================
CSL_MSMC_lockSMS

Description
This function locks the write access for all SMS MPAX registers.

Arguments

              privid      PrivID for which the SMS MPAX registers will be locked.

Return Value
None

Pre Condition
None

Post Condition
All the SMS MPAX registers for the specific PrivID are locked for write-access.

Writes
MSMC_SMS_MPAX_LCK_MGCID=0x2CD10000, MSMC_SMS_MPAX_LCK_WLCK

Example

            // Lock SMS MPAX registers for priv-id 1.
            CSL_MSMC_lockSMS (1);

=============================================================================

CSL_IDEF_INLINE void CSL_MSMC_NonSecureMSMC | ( | void |  | ) |

============================================================================
CSL_MSMC_NonSecureMSMC

Description
This function non-secures the MSMC SRAM. This can only be called by a secure supervisor.

Arguments
None

Return Value
None

Pre Condition
None

Post Condition
None

Writes
MSMC_SMSTA_NS=1

Example

            // Ensure that access to all MSMC SRAM is non secure.
            CSL_MSMC_NonSecureMSMC ();

=============================================================================

CSL_IDEF_INLINE void CSL_MSMC_SecureMSMC | ( | void |  | ) |

============================================================================
CSL_MSMC_SecureMSMC

Description
This function secures the MSMC SRAM. This can only be called by a secure supervisor.

Arguments
None

Return Value
None

Pre Condition
None

Post Condition
None

Writes
MSMC_SMSTA_NS=0

Example

            // Secure the MSMC SRAM access
            CSL_MSMC_SecureMSMC ();

=============================================================================

CSL_IDEF_INLINE void CSL_MSMC_setCacheSize | ( | Uint32 | cmode | ) |

============================================================================
CSL_MSMC_setCacheSize

Description
This function sets the amount of memory configured as cache.

Arguments

              cmode      size of cache

Return Value
None

Pre Condition
None

Post Condition
MSMC Cache Memory Size is configured.

Writes
MSMC_SMCFG_CMODE

Example

            CSL_MSMC_setCacheSize (2);

=============================================================================

CSL_IDEF_INLINE void CSL_MSMC_setCounterBankRefreshRead | ( | Uint32 | refdel | ) |

============================================================================
CSL_MSMC_setCounterBankRefreshRead

Description
This function programs REFDEL counter to the number of MSMC clock cycles between each bank refresh read access.

Arguments

              refdel      number of MSMC clock cycles

Return Value
None

Pre Condition
None

Post Condition
None

Writes
MSMC_SMEDCC_REFDEL

Example

            CSL_MSMC_setCounterBankRefreshRead (1);

=============================================================================

CSL_IDEF_INLINE void CSL_MSMC_setCSE | ( | Uint8 | cse | ) |

============================================================================
CSL_MSMC_setCSE

Description
This function programs sets the CSE bit

Arguments

            None

Return Value
None

Pre Condition
None

Post Condition
None

Writes
MSMC_SMEDCC_CSE

Example

            // Clear the CSE Bit.
            CSL_MSMC_setCSE (0);

=============================================================================

CSL_IDEF_INLINE void CSL_MSMC_setECM | ( | Uint8 | ecm | ) |

============================================================================
CSL_MSMC_setECM

Description
This function programs sets the error correcting mode.

Arguments

            None

Return Value
None

Pre Condition
None

Post Condition
None

Writes
MSMC_SMEDCC_ECM

Example

            // Set Error Correcting Mode
            CSL_MSMC_setECM (0);

=============================================================================

CSL_IDEF_INLINE void CSL_MSMC_setHitCounter | ( | Uint32 | hitCounter | ) |

============================================================================
CSL_MSMC_setHitCounter

Description
This function sets the hit counter for the cache. If the HM bit in SMAC is set, it is a counter for Cache hits+SRAM accesses

Arguments
hitCounter - Hit Counter to be configured.

Return Value
None

Pre Condition
None

Post Condition
None

Writes
MSMC_SMAH_HCNT

Example

            // Reset the hit counter
            CSL_MSMC_setHitCounter(0);

=============================================================================

CSL_IDEF_INLINE void CSL_MSMC_setMemoryArbiterCounters | ( | Uint32 | accCyclesCounter | ) |

============================================================================
CSL_MSMC_setMemoryArbiterCounters

Description
This function sets the performance counters for the memory arbiters (all banks).

Arguments

              accCyclesCounter          Accumulated Cycles counter

Return Value
None

Pre Condition
None

Post Condition
None

Writes
MSMC_SMAMP_ACWM

Example

            // Clear the Memory Arbiter Counters
            CSL_MSMC_setMemoryArbiterCounters(0);

=============================================================================

CSL_IDEF_INLINE void CSL_MSMC_setMissCounter | ( | Uint32 | readMiss,
|  | Uint32 | writeMiss |
| ) |  |  |

============================================================================
CSL_MSMC_setMissCounter

Description
This function sets the reads/write miss counters

Arguments

              readMissCntr      Read Miss Counter
              writeMissCntr     Write Miss Counter

Return Value
None

Pre Condition
None

Post Condition
None

Writes
MSMC_SMARM_RMCNT, MSMC_SMAWM_WMCNT

Example

            // Clear the Read & Write Miss Counters
            CSL_MSMC_getMissCounter(&readMiss, &writeMiss);

=============================================================================

CSL_IDEF_INLINE void CSL_MSMC_setPerfFilters | ( | Uint8 | ccf,
|  | Uint16 | pidf,
|  | Uint8 | hm,
|  | Uint8 | pth |
| ) |  |  |

============================================================================
CSL_MSMC_setPerfFilters

Description
This function sets the performance counters filters

Arguments

              ccf           CPU filter for counters
              pidf          System request PrivID filter for counters
              hm            Selects if SMAH:HCNT counts only cache hits or SRAM accesses
              pth           Priority threshold filter

Return Value
None

Pre Condition
None

Post Condition
None

Writes
MSMC_SMAC_CCF, MSMC_SMAC_PIDF, MSMC_SMAC_HM, MSMC_SMAC_PTH

Example

            Uint8   ccf;
            Uint16  pidf;
            Uint8   hm;
            Uint8   pth;

            // Get the Performance Filters
            CSL_MSMC_getPerfFilters(&ccf, &pidf, &hm, &pth);
            ...
            // Make sure we counter SRAM access also.
            CSL_MSMC_setPerfFilters(ccf, pidf, 1, pth);
            ...

=============================================================================

CSL_IDEF_INLINE void CSL_MSMC_setPortArbiterCounters | ( | Uint32 | accCyclesCounter | ) |

============================================================================
CSL_MSMC_setPortArbiterCounters

Description
This function sets the performance counters for the port arbiters

Arguments

              accCyclesCounter          Accumulated Cycles counter

Return Value
None

Pre Condition
None

Post Condition
None

Writes
MSMC_SMAEP_ACWE

Example

            // Reset the Port Arbiter Counters
            CSL_MSMC_setPortArbiterCounters(0);

=============================================================================

CSL_IDEF_INLINE void CSL_MSMC_setPriorityLevel | ( | Uint8 | priorityLevel | ) |

============================================================================
CSL_MSMC_setPriorityLevel

Description
This function sets the priority level used for software initiated global invalidate

Arguments
None

Return Value
None

Pre Condition
None

Post Condition
None

Writes
MSMC_SMCFG_INVP

Example

            // Set the priority Level.
            CSL_MSMC_setPriorityLevel (0x1);

=============================================================================

CSL_IDEF_INLINE void CSL_MSMC_setRawInterruptStatus | ( | Uint16 | pfiStat,
|  | Uint8 | cei,
|  | Uint8 | ncei,
|  | Uint8 | csi,
|  | Uint8 | ncsi |
| ) |  |  |

============================================================================
CSL_MSMC_setRawInterruptStatus

Description
This function sets the RAW Interrupt Status.

Arguments

              pfiStat       Protection Fault Status
              cei           Correctable EDC Error
              ncei          Non-Correctable EDC Error
              csi           Correctable Scrubbing Error
              ncsi          Non-Correctable Scrubbing Error

Return Value
None

Pre Condition
None

Post Condition
None

Writes
MSMC_SMIRSTAT_PFESTAT, MSMC_SMIRSTAT_CEES, MSMC_SMIRSTAT_NCEES,
MSMC_SMIRSTAT_CSES, MSMC_SMIRSTAT_NCSES

Example

            // Ensure only the Correctable EDC Errors is set
            CSL_MSMC_setRawInterruptStatus (0x0, 0x1, 0x0, 0x0, 0x0);

=============================================================================

CSL_IDEF_INLINE void CSL_MSMC_setSecurityThreshold | ( | Uint32 | securityThreshold | ) |

============================================================================
CSL_MSMC_setSecurityThreshold

Description
This function sets the Security Threshold Address register. All addresses above (and including) the address contained in the SMSTA register are deemed as being secure and can only be accessed by secure mode code

Arguments

              securityThreshold      Security Threshold to be configured.

Return Value
None

Pre Condition
None

Post Condition
None

Writes
MSMC_SMSTA_SECURITY_THRESHOLD_SEGMENT_ADDRESS

Example

            // Set the security Threshold to 0x0; implies that all MSMC SRAM is secure
            CSL_MSMC_setSecurityThreshold (0x0);

=============================================================================

CSL_IDEF_INLINE void CSL_MSMC_setSESMPAXH | ( | Uint32 | privid,
|  | Uint32 | index,
|  | CSL_MSMC_SESMPAXH * | mpaxh |
| ) |  |  |

============================================================================
CSL_MSMC_setSESMPAXH

Description
This function sets the contents of SES_MPAXH register.

Arguments

              privid      PrivID
              index       Index into the set of 8 registers for this particular
                          PrivID
              mpaxh       CSL_MSMC_SESMPAXH structure that needs to be set into the
                          register

Return Value
None

Pre Condition
None

Post Condition
SES MPAXH register for the PrivID configured with the value passed.

Writes
MSMC_SES_MPAXH_0_BE..MSMC_SES_MPAXH_7_BE, MSMC_SES_MPAXH_0_AI..MSMC_SES_MPAXH_7_AI, MSMC_SES_MPAXH_0_SEGSZ..MSMC_SES_MPAXH_7_SEGSZ, MSMC_SES_MPAXH_0_BADDR..MSMC_SES_MPAXH_7_BADDR

Example

            Uint32 privid = 1;
            Uint32 index = 0;
            CSL_MSMC_SESMPAXH mpaxh;

            mpaxh.segSize = 4;
            mpaxh.baseAddress = 0x100;
            mpaxh.be = 1;
            mpaxh.ai = 1;

            CSL_MSMC_setSESMPAXH (privid, index, &mpaxh);

=============================================================================

CSL_IDEF_INLINE void CSL_MSMC_setSESMPAXL | ( | Uint32 | privid,
|  | Uint32 | index,
|  | CSL_MSMC_SESMPAXL * | mpaxl |
| ) |  |  |

============================================================================
CSL_MSMC_setSESMPAXL

Description
This function sets the contents of SES_MPAXL register.

Arguments

              privid      PrivID
              index       Index into the set of 8 registers for this particular
                          PrivID
              mpaxl       CSL_MSMC_SESMPAXL structure that needs to be set into the
                          register

Return Value
None

Pre Condition
None

Post Condition
SES MPAXL register for the PrivID configured with the value passed.

Writes
MSMC_SES_MPAXL_0_UX..MSMC_SES_MPAXL_7_UX, MSMC_SES_MPAXL_0_UW..MSMC_SES_MPAXL_7_UW, MSMC_SES_MPAXL_0_UR..MSMC_SES_MPAXL_7_UR, MSMC_SES_MPAXL_0_SX..MSMC_SES_MPAXL_7_SX, MSMC_SES_MPAXL_0_SW..MSMC_SES_MPAXL_7_SW, MSMC_SES_MPAXL_0_SR..MSMC_SES_MPAXL_7_SR, MSMC_SES_MPAXL_0_RADDR..MSMC_SES_MPAXL_7_RADDR

Example

            Uint32 privid = 1;
            Uint32 index = 0;
            CSL_MSMC_SESMPAXL mpaxl;

            mpaxl.ux    = 1;
            mpaxl.uw    = 1;
            mpaxl.ur    = 1;
            mpaxl.sx    = 1;
            mpaxl.sw    = 1;
            mpaxl.sr    = 1;
            mpaxl.raddr = 0x4000;

            CSL_MSMC_setSESMPAXL (privid, index, &mpaxl);

=============================================================================

CSL_IDEF_INLINE void CSL_MSMC_setSMSMPAXH | ( | Uint32 | privid,
|  | Uint32 | index,
|  | CSL_MSMC_SMSMPAXH * | mpaxh |
| ) |  |  |

============================================================================
CSL_MSMC_setSMSMPAXH

Description
This function sets the contents of SMS_MPAXH register.

Arguments

              privid      PrivID
              index       Index into the set of 8 registers for this particular
                          PrivID
              mpaxh       CSL_MSMC_SMSMPAXH structure that needs to be set into the
                          register

Return Value
None

Pre Condition
None

Post Condition
SMS MPAXH register for the PrivID configured with the value passed.

Writes
MSMC_SMS_MPAXH_0_SEGSZ..MSMC_SMS_MPAXH_7_SEGSZ, MSMC_SMS_MPAXH_0_BADDR..MSMC_SMS_MPAXH_7_BADDR

Example

            Uint32 privid = 1;
            Uint32 index = 0;
            CSL_MSMC_SMSMPAXH mpaxh;

            mpaxh.segSz = 4;
            mpaxh.baddr = 0x10;

            CSL_MSMC_setSMSMPAXH (privid, index, &mpaxh);

=============================================================================

CSL_IDEF_INLINE void CSL_MSMC_setSMSMPAXL | ( | Uint32 | privid,
|  | Uint32 | index,
|  | CSL_MSMC_SMSMPAXL * | mpaxl |
| ) |  |  |

============================================================================
CSL_MSMC_setSMSMPAXL

Description
This function sets the contents of SMS_MPAXL register.

Arguments

              privid      PrivID
              index       Index into the set of 8 registers for this particular
                          PrivID
              mpaxl       CSL_MSMC_SMSMPAXL structure that needs to be set into the
                          register

Return Value
None

Pre Condition
None

Post Condition
SMS MPAXL register for the PrivID configured with the value passed.

Writes
MSMC_SMS_MPAXL_0_UX..MSMC_SMS_MPAXL_7_UX, MSMC_SMS_MPAXL_0_UW..MSMC_SMS_MPAXL_7_UW, MSMC_SMS_MPAXL_0_UR..MSMC_SMS_MPAXL_7_UR, MSMC_SMS_MPAXL_0_SX..MSMC_SMS_MPAXL_7_SX, MSMC_SMS_MPAXL_0_SW..MSMC_SMS_MPAXL_7_SW, MSMC_SMS_MPAXL_0_SR..MSMC_SMS_MPAXL_7_SR, MSMC_SMS_MPAXL_0_RADDR..MSMC_SMS_MPAXL_7_RADDR,

Example

            Uint32 privid = 1;
            Uint32 index = 0;
            CSL_MSMC_SMSMPAXL mpaxl;

            mpaxl.ux    = 1;
            mpaxl.uw    = 1;
            mpaxl.ur    = 1;
            mpaxl.sx    = 1;
            mpaxl.sw    = 1;
            mpaxl.sr    = 1;
            mpaxl.emu   = 0;
            mpaxl.ns    = 1;
            mpaxl.raddr = 0x100;

            CSL_MSMC_setSMSMPAXL (privid, index, &mpaxl);

=============================================================================

CSL_IDEF_INLINE void CSL_MSMC_setStarvationBoundCGEM | ( | Uint32 | index,
|  | Uint8 | strvEmifArbiter,
|  | Uint8 | strvRAMArbiter |
| ) |  |  |

============================================================================
CSL_MSMC_setStarvationBoundCGEM

Description
This function sets the starvation bound for CCGEM slaves.

Arguments

              index	            CGEM slave to configure starvation bound for
              strvEmifArbiter   Starvation bound to be configured for the EMIF Arbiter
              strvRAMArbiter    Starvation bound to be configured for the RAM Bank Arbiter

Return Value
None

Pre Condition
None

Post Condition
None

Writes
MSMC_SBNDC0_SCNTCE, MSMC_SBNDC0_SCNTCM

Example

            CSL_MSMC_setStarvationBoundCGEM (1,1,1);

=============================================================================

CSL_IDEF_INLINE void CSL_MSMC_setStarvationBoundSES | ( | Uint32 | sbnd | ) |

============================================================================
CSL_MSMC_setStarvationBoundSES

Description
This function sets the starvation bound for SES port.

Arguments

              sbnd      starvation bound to be configured

Return Value
None

Pre Condition
None

Post Condition
Starvation count for the SES port is configured

Writes
MSMC_SBNDE_SCNTEM

Example

            CSL_MSMC_setStarvationBoundSES (1);

=============================================================================

CSL_IDEF_INLINE void CSL_MSMC_setStarvationBoundSMS | ( | Uint32 | sbnd | ) |

============================================================================
CSL_MSMC_setStarvationBoundSMS

Description
This function sets the starvation bound for SMS port.

Arguments

              sbnd      starvation bound to be configured

Return Value
None

Pre Condition
None

Post Condition
Starvation Count for the SMS Port is configured.

Writes
MSMC_SBNDM_SCNTMM

Example

            CSL_MSMC_setStarvationBoundSMS (1);

=============================================================================

CSL_IDEF_INLINE void CSL_MSMC_setTransmitHeader | ( | Uint32 | transmitHeader | ) |

============================================================================
CSL_MSMC_setTransmitHeader

Description
This function sets the transmit header for analysis counter state export through STM

Arguments

              transmitHeader      Transmit header to be configured

Return Value
None

Pre Condition
None

Post Condition
None

Writes
MSMC_SMATH

Example

            // Set the Transmit Header
            CSL_MSMC_getTransmitHeader(0x100);

=============================================================================

CSL_IDEF_INLINE void CSL_MSMC_setVictimCounter | ( | Uint32 | victimCounter | ) |

============================================================================
CSL_MSMC_setVictimCounter

Description
This function sets the victim counter

Arguments
None

Return Value
Victim Counter

Pre Condition
None

Post Condition
None

Writes
MSMC_SMAV_VCNT

Example

            // Reset the Victim Counter
            CSL_MSMC_setVictimCounter(0);

=============================================================================

CSL_IDEF_INLINE void CSL_MSMC_unFreezeCache | ( | void |  | ) |

============================================================================
CSL_MSMC_unFreezeCache

Description
This function unfreezes the MSMC cache

Arguments
None

Return Value
None

Pre Condition
None

Post Condition
None

Writes
MSMC_SMCFG_EFZ=0

Example

            // Unfreeze the MSMC Cache
            CSL_MSMC_unFreezeCache ();

=============================================================================

CSL_IDEF_INLINE void CSL_MSMC_unlockNonMPAX | ( | void |  | ) |

============================================================================
CSL_MSMC_unlockNonMPAX

Description
This function unlocks the write access for all non MPAX registers.

Arguments
None

Return Value
None

Pre Condition
CSL_MSMC_lockNonMPAX() must be called.

Post Condition
All the non MPAX registers are available for write-access.

Writes
MSMC_CFGULCK_MGCID=0x2CD00000,MSMC_CFGULCK_WEN=1

Example

            if (CSL_MSMC_isNonMPAXLocked () == TRUE)
            {
                // Non MPAX Registers are locked
                ...
                // Unlock the Non-MPAX registers.
                CSL_MSMC_unlockNonMPAX ();
            }

=============================================================================

CSL_IDEF_INLINE void CSL_MSMC_unlockSES | ( | Uint32 | privid | ) |

============================================================================
CSL_MSMC_unlockSES

Description
This function unlocks the write access for all SES MPAX registers.

Arguments

              privid      PrivID for which the SES MPAX registers will be unlocked.

Return Value
None

Pre Condition
CSL_MSMC_lockSES() must be called.

Post Condition
All the SES MPAX registers for the specific PrivID are unlocked for write-access.

Writes
MSMC_SES_MPAX_ULCK_MGCID=0x2CD20000,MSMC_SES_MPAX_ULCK_WEN

Example

            ...
            if (CSL_MSMC_isSESLocked (1) == TRUE)
            {
                // SES MPAX Registers for Priv-ID 1 are locked.
                ...
                // Unlock SES MPAX registers for priv-id 1.
                CSL_MSMC_unlockSES (1);
            }

=============================================================================

CSL_IDEF_INLINE void CSL_MSMC_unlockSMS | ( | Uint32 | privid | ) |

============================================================================
CSL_MSMC_unlockSMS

Description
This function unlocks the write access for all SMS MPAX registers.

Arguments

              privid      PrivID for which the SMS MPAX registers will be unlocked.

Return Value
None

Pre Condition
CSL_MSMC_lockSMS() must be called.

Post Condition
All the SMS MPAX registers for the specific PrivID are unlocked for write-access.

Writes
MSMC_SMS_MPAX_ULCK_MGCID=0x2CD10000,MSMC_SMS_MPAX_ULCK_WEN

Example

            ...
            if (CSL_MSMC_isSMSLocked (1) == TRUE)
            {
                // SMS MPAX Registers for Priv-ID 1 are locked.
                ...
                // Unlock SMS MPAX registers for priv-id 1.
                CSL_MSMC_unlockSMS (1);
            }

=============================================================================

Copyright 2012, Texas Instruments Incorporated