Re: [SeaBIOS] [PATCH v2] add acpi pmtimer support

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

 



  Hi,

>>>> +    u32 pmtimer = inl(ioport);
>>>> +    return (u64)wraps << 24 | pmtimer;
>>> BTW, why is this "<< 24", and if it should be that way, shouldn't the
>>> pmtimer be "inl(ioport) & 0xffffff" ?
>> The pmtimer is defined to be 24 bits wide, so the shift is correct.
> This is not true in general.  It can be either 24 or 32 bits.  What it
> is depends on ACPI data (acpi_gbl_FADT->tmr_val_ext).

The piix4 emulated by qemu has 24 bits.

>  However it is
> valid to only used 24 bits.

And we certainly want to mask the ioport read (as suggested by kevin and
done in v3 of the patch) so we only pick up the 24 bits we actually use.

thanks
  Gerd

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux