2414877_en-US

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

2414877_en-US

2414877_en-US

E6500 / E5500 Interrupt Path, RFI vs RFCI and other family instructions

Hello,

The RFI and other family instructions are used to return from different types of interrupts / exceptions. 
I would like to know if it is possible on the E5500 and E6500 processor to always use RFI as long as the SRR0 and SRR1 are restored to the correct value (potentially initially read from CSRR0, CRSRR1 or MCSRR0, MCSRR1, etc.) or if it would break some internal mechanism of the processor.


Best Regards,

Alexy Torres

QorIQ T1 DevicesQorIQ T2 DevicesRe: E6500 / E5500 Interrupt Path, RFI vs RFCI and other family instructions

Thank you for the quick answer. That confirms what we have been thinking.

Re: E6500 / E5500 Interrupt Path, RFI vs RFCI and other family instructions

On the E5500 and E6500, it is not recommended to universally substitute  “RFI” for the other return-from-interrupt instructions (“RFCI”, “RFMCI”, etc.), even if the SRR0/SRR1 registers are manually pre-loaded with values copied from CSRR0/CSRR1 or MCSRR0/MCSRR1.


  1. Each return instruction restores the MSR from a specific save/restore register pair. Using `RFI` always restores from SRR1, but the MSR bits that are restored (and which are masked or forced) can differ depending on the instruction. Some bits may be handled differently by `RFCI` or `RFMCI` at the hardware level, beyond just the register values.

  1. `RFCI` and `RFMCI` also clear the `CSSR`/`MCSR` state and update internal processor tracking of the interrupt level (e.g., the `CE`/`ME` enable bits in MSR). Simply using `RFI` with manually copied values may not correctly re-enable or clear the critical/machine-check interrupt state, potentially leaving the processor in an inconsistent internal state.

  1. The Power Architecture Embedded Environment (EREF) specification explicitly defines which instruction must be used to return from each exception class. Deviating from this is outside the architecturally defined behavior and could produce unpredictable results on these cores.

The recommended approach is to use rfi only for standard/noncritical returns, and use rfci , rfdi , rfgi , or rfmci for their associated interrupt classes.

Tags (1)
No ratings
Version history
Last update:
Tuesday
Updated by: