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.

Reply via email to