From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:43905) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TB6RI-00032Q-27 for qemu-devel@nongnu.org; Mon, 10 Sep 2012 12:02:25 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TB6R5-00034S-FJ for qemu-devel@nongnu.org; Mon, 10 Sep 2012 12:02:20 -0400 Received: from mail-ob0-f173.google.com ([209.85.214.173]:44385) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TB6R5-00034O-AX for qemu-devel@nongnu.org; Mon, 10 Sep 2012 12:02:07 -0400 Received: by obbta14 with SMTP id ta14so2958225obb.4 for ; Mon, 10 Sep 2012 09:02:05 -0700 (PDT) From: Anthony Liguori In-Reply-To: <504B1F34.7000101@redhat.com> References: <1346917367-24691-1-git-send-email-kraxel@redhat.com> <1346917367-24691-4-git-send-email-kraxel@redhat.com> <50487F59.701@redhat.com> <504B1F34.7000101@redhat.com> Date: Mon, 10 Sep 2012 11:02:02 -0500 Message-ID: <87txv5zx1h.fsf@codemonkey.ws> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: Re: [Qemu-devel] [PATCH 3/4] wakeup: make serial configurable List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini , Blue Swirl Cc: Peter Maydell , Gerd Hoffmann , qemu-devel@nongnu.org Paolo Bonzini writes: > Il 08/09/2012 09:15, Blue Swirl ha scritto: >>> Preferably some which don't >>> > break on 'qemu -nodefault -device isa-serial,chardev=foo'. >> Add a qdev property? The base address check can't be correct, the >> serial device could be the only one in the board and wired to wakeup >> but still use a different iobase. > > Could work, but the default value for the property would still be > "depending on the iobase". > >> One way could be to check if chr == serial_hds[0] or rather, pass the >> wakeup reason code from board level based on this check. > > That doesn't work for -device. I think the wiring is wrong here. Why would a device assert the wakeup reason? I assume on bare metal, the device asserts a single line and then something devices how to treat the output from a given device. IOW, shouldn't it be something more like, SerialState exports a qemu_irq and then the machine code decides whether to route that irq to a call to qemu_system_wakeup(). Then depending on whether this is coming from serial[1], determines which reason is used. Regards, Anthony Liguori > > Paolo