[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] Guest application reading from pl011 without device dri
From: |
Peter Maydell |
Subject: |
Re: [Qemu-devel] Guest application reading from pl011 without device driver |
Date: |
Tue, 21 Mar 2017 16:39:43 +0000 |
On 21 March 2017 at 16:32, Jiahuan Zhang <address@hidden> wrote:
> I found the serial device is always trying to receive all the data when
> ReadFile() is running, then start reading. Even if the fifo is full, the
> _can_receive function still keeps polling if the data is larger than 16
> bytes.
pl011_can_receive() is:
static int pl011_can_receive(void *opaque)
{
PL011State *s = (PL011State *)opaque;
int r;
if (s->lcr & 0x10) {
r = s->read_count < 16;
} else {
r = s->read_count < 1;
}
trace_pl011_can_receive(s->lcr, s->read_count, r);
return r;
}
so if the FIFO fills up then it should start to return 'false',
as it is supposed to.
I'm not sure from your description what exactly is happening,
but you should probably check, for instance:
* whether pl011_can_receive is returning false but data
is still being fed to it
* whether pl011_can_receive is returning true even with
16 bytes in the fifo (hard to see how, given the code)
* whether the fifo actually has fewer bytes in it because
the guest is reading them
* etc
thanks
-- PMM
- [Qemu-devel] Guest application reading from pl011 without device driver, Jiahuan Zhang, 2017/03/21
- Re: [Qemu-devel] Guest application reading from pl011 without device driver,
Peter Maydell <=
- Re: [Qemu-devel] Guest application reading from pl011 without device driver, Jiahuan Zhang, 2017/03/21
- Re: [Qemu-devel] Guest application reading from pl011 without device driver, Peter Maydell, 2017/03/21
- Re: [Qemu-devel] Guest application reading from pl011 without device driver, Jiahuan Zhang, 2017/03/21
- Re: [Qemu-devel] Guest application reading from pl011 without device driver, Jiahuan Zhang, 2017/03/21
- Re: [Qemu-devel] Guest application reading from pl011 without device driver, Peter Maydell, 2017/03/21
- Re: [Qemu-devel] Guest application reading from pl011 without device driver, Jiahuan Zhang, 2017/03/21
- Re: [Qemu-devel] Guest application reading from pl011 without device driver, Peter Maydell, 2017/03/21
- Message not available
- Message not available
- Re: [Qemu-devel] Guest application reading from pl011 without device driver, Jiahuan Zhang, 2017/03/21
- Re: [Qemu-devel] Guest application reading from pl011 without device driver, Peter Maydell, 2017/03/21
- Re: [Qemu-devel] Guest application reading from pl011 without device driver, Jiahuan Zhang, 2017/03/21