Question about RV_CEI
Opened this issue · 0 comments
Hestia-SGG commented
Thank you for your work on this! I'm using your library to add support in the Godot 4.3 engine for running RISC-V code, and came across a question. In the header rv.h, there is an enum for rv_cause which defines the bitmasks used in rv_irq for the interrupts on CSR mip. RV_CSI = 8 and RV_CTI = 128 which correspond Machine Software Interrupt (bit 3) and Machine Timer Interrupt (bit 7) respectively. But RV_CEI = 512 corresponds to Supervisor External Interrupt (bit 9). Should this be 2048 instead, which corresponds to bit 11 or Machine External Interrupt? Everything works correctly, but I think this would cause an issue if there was code directly poking the mip register.