cmsdk-apb-uart doesn't appear to clear interrupt flags
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
QEMU |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
I have been writing a small operating system and using QEMU emulating the mps2-an385 board for some of my testing.
During development of the uart driver I observed some odd behaviour with the TX interrupt -- writing a '1' to bit 0 of the INTCLEAR register doesn't clear the TX interrupt flag, and the interrupt fires continuously.
It's possible that I have an error somewhere in my code, but after inspecting the QEMU source it does appear to be a QEMU bug. I applied the following patch and it solved my issue:
From 9875839c144fa60
From: Patrick Oppenlander <email address hidden>
Date: Sat, 31 Mar 2018 15:10:28 +1100
Subject: [PATCH] hw/char/
---
hw/char/
1 file changed, 1 insertion(+)
diff --git a/hw/char/
index 1ad1e14295.
--- a/hw/char/
+++ b/hw/char/
@@ -274,6 +274,7 @@ static void uart_write(void *opaque, hwaddr offset, uint64_t value,
* is then reflected into the intstatus value by the update function).
*/
s->state &= ~(value & (R_INTSTATUS_
+ s->intstatus &= ~(value & ~(R_INTSTATUS_
break;
case A_BAUDDIV:
--
2.16.2
Changed in qemu: | |
status: | Fix Committed → Fix Released |
Found in v2.12.0-rc1.