• Christophe Leroy's avatar
    powerpc/8xx: use SPRN_EIE and SPRN_EID to enable/disable interrupts · 834e5a69
    Christophe Leroy authored
    The 8xx has two special registers called EID (External Interrupt
    Disable) and EIE (External Interrupt Enable) for clearing/setting
    EE in MSR. It avoids the three instructions set mfmsr/ori/mtmsr or
    mfmsr/rlwinm/mtmsr and it avoids using a general register.
    
    We just have to write something in the special register to change MSR EE
    bit. So we write r0 into the register, regardless of r0 value.
    
    Writing to one of those two special registers also set the MSR RI bit,
    but this bit is only unset during beginning of exception prolog and end
    of exception epilog. When executing C-functions MSR RI is always set.
    Signed-off-by: default avatarChristophe Leroy <christophe.leroy@c-s.fr>
    Signed-off-by: default avatarScott Wood <oss@buserror.net>
    834e5a69
reg_8xx.h 4.66 KB