qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] Re: [PATCH] hpet: Clean up initial hpet counter


From: Jan Kiszka
Subject: Re: [Qemu-devel] Re: [PATCH] hpet: Clean up initial hpet counter
Date: Thu, 17 Jun 2010 10:42:34 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686 (x86_64); de; rv:1.8.1.12) Gecko/20080226 SUSE/2.0.0.12-1.1 Thunderbird/2.0.0.12 Mnenhy/0.7.5.666

Gleb Natapov wrote:
> 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.

For x86 with its port-based access, we are on the safe side as (pre-pnp)
device probing used to work this way. Can't tell for the other archs
that support fw-cfg.

> 
>>> 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.

Yes, read-back would mean returning FWCfgState::cur_entry. And that will
be -1 when selected an invalid one.

Jan

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]