From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=48737 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OOtvz-0006Z2-3G for qemu-devel@nongnu.org; Wed, 16 Jun 2010 10:49:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OOtvx-0005pP-PB for qemu-devel@nongnu.org; Wed, 16 Jun 2010 10:49:42 -0400 Received: from eu1sys200aog118.obsmtp.com ([207.126.144.145]:55363) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OOtvx-0005p8-EP for qemu-devel@nongnu.org; Wed, 16 Jun 2010 10:49:41 -0400 Received: from zeta.dmz-eu.st.com (ns2.st.com [164.129.230.9]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id BDF685A for ; Wed, 16 Jun 2010 14:49:35 +0000 (GMT) Received: from mail2.gnb.st.com (mail2.gnb.st.com [164.129.119.59]) by zeta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 6FE8F2274 for ; Wed, 16 Jun 2010 14:49:35 +0000 (GMT) Message-ID: <4C18E47E.8040107@st.com> Date: Wed, 16 Jun 2010 16:49:34 +0200 From: Christophe LYON MIME-Version: 1.0 Subject: Re: [Qemu-devel] ARM/system mode/stdin References: <4C16289D.8040708@st.com> In-Reply-To: <4C16289D.8040708@st.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Hi all, After more investigation, I am wondering whether there is a conflict between 2 entities reading for stdin: - one is initialized by qemu_chr_open_stdio() (in qemu-char.c) - the 2nd one is the handling of SYS_READ in arm-semi.c After some debug/tracing, I have noticed that a few chars a swallowed from stdin by calls to stdio_read() because the stdin FD is monitored by the select() call in main_loop_wait(). This seems to be in conflict with the ARM semihosting support for SYS_READ which also tries to read FD 0. If I remove the call to qemu_set_fd_handler2(0, stdio_read_poll, stdio_read, NULL, chr); in qemu_chr_open_stdio() then my sample test works, but I wonder what I might have broken? Thanks and best regards, Christophe.