[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] DMA active hw_error
From: |
Peter Maydell |
Subject: |
Re: [Qemu-devel] DMA active hw_error |
Date: |
Tue, 27 Dec 2011 22:39:07 +0000 |
On 27 December 2011 03:21, Richard Cole <address@hidden> wrote:
> Another thing I don't understand is the code from this function
> switch(offset >> 2)
> case 0:
> // src address register
>
> but 0x100 >> 2 does not equal 0. Not even close. Maybe it should be
>
> (offset - 0x100) >> 2?
>
> But that would only work for channel 0. I guess one would then need to
> mod by the size of the channel struct.
(offset & 0x1f) >> 2
is probably what you want. (you can see we just used 0xe0 to get
the channel number).
> Am I completely off base or has this code never been run?
I expect it hasn't, no. You may be detecting a pattern here :-)
Free extra bug if you're collecting them: the code that chases
linked lists doesn't handle ch->lli bit 0 properly (it's the
AHB master select bit, so it (and bit 1) should be ignored
when using it as a pointer to load from).
-- PMM