From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=34970 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OPAaC-0002vu-CP for qemu-devel@nongnu.org; Thu, 17 Jun 2010 04:36:21 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OPAaA-0006gO-J8 for qemu-devel@nongnu.org; Thu, 17 Jun 2010 04:36:19 -0400 Received: from mx1.redhat.com ([209.132.183.28]:9382) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OPAaA-0006gG-BK for qemu-devel@nongnu.org; Thu, 17 Jun 2010 04:36:18 -0400 Date: Thu, 17 Jun 2010 11:36:16 +0300 From: Gleb Natapov Subject: Re: [Qemu-devel] Re: [PATCH] hpet: Clean up initial hpet counter Message-ID: <20100617083616.GL523@redhat.com> References: <4C1883EF.10109@web.de> <20100616090658.GC21797@redhat.com> <4C189A59.3040300@web.de> <20100616093516.GD21797@redhat.com> <20100616153607.GG523@redhat.com> <4C18F538.1090709@web.de> <20100617054857.GH523@redhat.com> <4C19CC1F.9040209@web.de> <20100617080758.GK523@redhat.com> <4C19DD17.3000408@web.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4C19DD17.3000408@web.de> List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Jan Kiszka Cc: qemu-devel On Thu, Jun 17, 2010 at 10:30:15AM +0200, Jan Kiszka wrote: > > Sorry, I lost you here. What "works for IO-based fw-cfg, but not for > > MMIO-based". > > Undefined IO ports return -1, undefined (/wrt read access) MMIO 0. So > you need to select a key that is different from both. > But can we rely on it? Is this defined somewhere or if it happens to be the case in current qemu for x86 arch. > > Can you write pseudo logic of how you think it > > all should work? > > The firmware should do this: > > write(CTL_BASE, FW_CFG_ID); > if (read(CTL_BASE) != FW_CFG_ID) > deal_with_old_qemu(); > else > check_for_supported_keys(); > Ah, I thought about read() returning 0/1, not key itself, so any key that always existed would do. -- Gleb.