Skip to content

Fixed MPIE being cleared leading to have interrupts being disable after an mret instruction#522

Open
cpdpls wants to merge 1 commit intoeclipse-threadx:devfrom
cpdpls:dev
Open

Fixed MPIE being cleared leading to have interrupts being disable after an mret instruction#522
cpdpls wants to merge 1 commit intoeclipse-threadx:devfrom
cpdpls:dev

Conversation

@cpdpls
Copy link
Copy Markdown

@cpdpls cpdpls commented Apr 14, 2026

Fixed #517

  1. MPIE was being cleared alongside MIE before issuing an mret instruction. As a side effect, this led to have no interruptions enabled forever when returning from the very first context switching.
  2. Removed some assembly leftovers from the previous ports when changing the mstatus register inside the _tx_thread_context_restore routine

PR checklist

  • Updated function header with a short description and version number
  • Added test case for bug fix or new feature
  • Validated on real hardware (Microchip Polarfire SOC -- riscv64-unknown-elf-gcc (xPack GNU RISC-V Embedded GCC (Microsemi SoftConsole build), 64-bit) 8.3.0

@fdesbiens fdesbiens requested a review from akifejaz April 14, 2026 20:57
@fdesbiens fdesbiens moved this to In review in ThreadX Roadmap Apr 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: In review

Development

Successfully merging this pull request may close these issues.

2 participants