blob: 4ebfca7ee2719941edbfb0541160cc4011bf1cba (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
<think>
Alright, so I'm looking at this bug report about RISC-V in QEMU where the SEIP bit can't be set in M mode. Let me try to break it down.
First, the user is running some assembly code in M mode. They're using the `csrs` instruction to write to the mip register, which should allow setting the SEIP bit. But when they check with GDB, the SEIP bit isn't set as expected.
From the manual, I know that mip registers are WARL (Write Any Values, Reads Legal). That means any value can be written, but reads will return a legal value. The SEIP bit is writable in mip according to page 47 and read-only in sip on page 81.
The issue here is that even though the code is run in M mode, which should have the highest privileges, setting the SEIP bit doesn't work as intended. Since this involves modifying a control register (mip) related to interrupts and privilege levels, it's definitely a low-level system function.
Therefore, this bug relates to how QEMU handles system-mode operations, specifically around interrupt handling and CSRs in M mode.
</think>
system
|