* [Qemu-devel] [PATCH] ESP : Fix status register update
@ 2011-01-27 19:06 Olivier DANET
2011-01-28 21:09 ` Blue Swirl
0 siblings, 1 reply; 2+ messages in thread
From: Olivier DANET @ 2011-01-27 19:06 UTC (permalink / raw)
To: qemu-devel
The Count to zero flag (STAT_TC) must not be cleared after an Interrupt Status
register read.
Signed-off-by: Olivier Danet <odanet@caramail.com>
---
hw/esp.c 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/hw/esp.c b/hw/esp.c
index fa9d2a2..90bfdc6 100644
--- a/hw/esp.c
+++ b/hw/esp.c
@@ -525,9 +525,9 @@ static uint32_t esp_mem_readb(void *opaque, target_phys_addr_t addr)
except TC */
old_val = s->rregs[ESP_RINTR];
s->rregs[ESP_RINTR] = 0;
- s->rregs[ESP_RSTAT] &= ~STAT_TC;
s->rregs[ESP_RSEQ] = SEQ_CD;
esp_lower_irq(s);
+ s->rregs[ESP_RSTAT] &= STAT_TC STAT_MI;
return old_val;
default:
--
1.6.2.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [Qemu-devel] [PATCH] ESP : Fix status register update
2011-01-27 19:06 [Qemu-devel] [PATCH] ESP : Fix status register update Olivier DANET
@ 2011-01-28 21:09 ` Blue Swirl
0 siblings, 0 replies; 2+ messages in thread
From: Blue Swirl @ 2011-01-28 21:09 UTC (permalink / raw)
To: Olivier DANET; +Cc: qemu-devel
On Thu, Jan 27, 2011 at 7:06 PM, Olivier DANET <odanet@caramail.com> wrote:
>
> The Count to zero flag (STAT_TC) must not be cleared after an Interrupt Status
> register read.
This is not what the patch is supposed to do, STAT_TC is already not
cleared. I think you are trying to save Phase bits (2 to 0).
>
> Signed-off-by: Olivier Danet <odanet@caramail.com>
> ---
> hw/esp.c 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/hw/esp.c b/hw/esp.c
> index fa9d2a2..90bfdc6 100644
> --- a/hw/esp.c
> +++ b/hw/esp.c
> @@ -525,9 +525,9 @@ static uint32_t esp_mem_readb(void *opaque, target_phys_addr_t addr)
> except TC */
> old_val = s->rregs[ESP_RINTR];
> s->rregs[ESP_RINTR] = 0;
> - s->rregs[ESP_RSTAT] &= ~STAT_TC;
> s->rregs[ESP_RSEQ] = SEQ_CD;
> esp_lower_irq(s);
> + s->rregs[ESP_RSTAT] &= STAT_TC STAT_MI;
This seems to miss something, like ~( | ). Why move the line?
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-01-28 21:10 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-01-27 19:06 [Qemu-devel] [PATCH] ESP : Fix status register update Olivier DANET
2011-01-28 21:09 ` Blue Swirl
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).