[SeaBIOS] [PATCH 3/3] acpi: revert d9f5cdbdf (DSDT: Fix HPET _CRS Method)

Alexander Graf agraf at suse.de
Tue Dec 11 09:33:21 CET 2012



On 11.12.2012, at 09:21, Gerd Hoffmann <kraxel at redhat.com> wrote:

>  Hi,
> 
>>> Sounds sensible.  Although the smc emulation in qemu looks
>>> incomplete, there are a bunch of #defines which are never ever
>>> used.  Maybe a more complete emulation offers a way to detect the
>>> smc without side effects. Failing that some magic register looks ok
>>> to me.  We should makes sure this doesn't conflict with anything
>>> the real hardware does though.
>> 
>> So what if SeaBIOS maps some PCI BAR to 0x300
> 
> It wouldn't.
> 
>> The whole point of a DSDT is to free the OS from probing devices.
> 
> Or provide safe methods to probe devices.
> 
> For serial/parallel/floppy there are bits in the piix4/q35 chipset which
> indicate whenever those devices are present.  We are using that, and
> this is actually similar to real hardware.
> 
> For the hpet we are accessing the hardware directly and checking for a
> valid vendor id to figure whenever the device is present or not (due to
> -no-hpet).
> 
> Assuming there is a side-effect free way to detect the applesmc I can't
> see what is wrong with using that.  If we can't detect it without side
> effects we'll need a paravirtualized way to handle it.  The options I
> see are:
> 
>  (1) as suggested add a special detection register to our applesmc
>      emulation.

This means we are different than real hw.

>  (2) find a spare bit in q35, next to the present bits for
>      serial/parallel/floppy

Which means we differ from real hw -> bad.

> (osx wouldn't boot on piix4 anyway,
>      so we don't have to care, right?)

It could, but you need to manually add an lpc device. I don't think we really care about the piix4 case though :).

>  (3) use fw_cfg.
> 
> (1) + (2) are easy to handle from AML code.

Why if accessing fw_cfg harder than accessing the applesmc? Poking fw_cfg pios rather than applesmc pios shouldn't be an issue, right? After all, fw_cfg's purpose in life is to tell us details about the device model we can't easily find out otherwise.


Alex

> 
> cheers,
>  Gerd
> 



More information about the SeaBIOS mailing list