FreeRTOS/Demo/RISC-V_RV64_PolarFire_SoftConsole/polarfire_hal/platform/mpfs_hal/common/mss_plic.h
/***************************************************************************/
/**
 *
 * The function PLIC_SetPriority_Threshold() sets the threshold for a particular
 * hart. The default threshold on reset is 0.
 * The PFSoC Core Complex supports setting of an interrupt priority threshold
 * via the threshold register. The threshold is a WARL field, where the PFSoC
 * Core Complex supports a maximum threshold of 7.
 * The PFSoC Core Complex will mask all PLIC interrupts of a priority less than
 * or equal to threshold. For example, a threshold value of zero permits all
 * interrupts with non-zero priority, whereas a value of 7 masks all
 * interrupts.
 */
The function PLIC_SetPriority_Threshold() sets the threshold for a particular
hart. The default threshold on reset is 0.
The PFSoC Core Complex supports setting of an interrupt priority threshold
via the threshold register. The threshold is a WARL field, where the PFSoC
Core Complex supports a maximum threshold of 7.
The PFSoC Core Complex will mask all PLIC interrupts of a priority less than
or equal to threshold. For example, a threshold value of zero permits all
interrupts with non-zero priority, whereas a value of 7 masks all
interrupts.
The function PLIC_SetPriority_Threshold () sets the threshold for a particular hart . The default threshold on reset is 0 . The PFSoC Core Complex supports setting of an interrupt priority threshold via the threshold register . The threshold is a WARL field where the PFSoC Core Complex supports a maximum threshold of 7 . The PFSoC Core Complex will mask all PLIC interrupts of a priority less than or equal to threshold . For example a threshold value of zero permits all interrupts with non - zero priority whereas a value of 7 masks all interrupts .
static inline void PLIC_SetPriority_Threshold(uint32_t threshold)
{
    uint64_t hart_id  = read_csr(mhartid);
    ASSERT(threshold <= 7);
    PLIC->TARGET[plic_hart_lookup[hart_id]].PRIORITY_THRESHOLD  = threshold;
}
static inline void PLIC_SetPriority_Threshold ( uint32_t threshold ) { uint64_t hart_id = read_csr ( mhartid ) ; ASSERT ( threshold <= 7 ) ; PLIC -> TARGET [ plic_hart_lookup [ hart_id ] ] . PRIORITY_THRESHOLD = threshold ; }
The function PLIC_SetPriority_Threshold() sets the threshold for a particular
 hart.
The function PLIC_SetPriority_Threshold () sets the threshold for a particular hart .