FreeCalypso > hg > fc-selenite
diff src/cs/system/main/gcc/irq_twiddle.S @ 78:95ef11e76c5b
src/cs/system/main/gcc: asm code pieced from Citrine
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Fri, 20 Jul 2018 06:46:56 +0000 |
parents | |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/cs/system/main/gcc/irq_twiddle.S Fri Jul 20 06:46:56 2018 +0000 @@ -0,0 +1,26 @@ +/* + * TI's L1 code (and possibly other parts of the software suite) calls + * functions named INT_DisableIRQ() and INT_EnableIRQ(); in TI's original + * fw they are implemented (in a very ugly manner, as usual) in the + * int.s entry point assembly module. Here we implement the same + * functions in a cleaner way. + */ + +#include "asm_defs.h" + + .code 32 + .text + + .globl INT_DisableIRQ +INT_DisableIRQ: + mrs r0, CPSR + orr r0, r0, #LOCKOUT + msr CPSR, r0 + bx lr + + .globl INT_EnableIRQ +INT_EnableIRQ: + mrs r0, CPSR + bic r0, r0, #LOCKOUT + msr CPSR, r0 + bx lr