(Missing) power states of an Atom N455-based netbook

Andriy Gapon avg at FreeBSD.org
Tue Jun 28 21:18:47 UTC 2011


on 29/06/2011 00:13 Jung-uk Kim said the following:
> On Tuesday 28 June 2011 03:37 pm, Vitaly Magerya wrote:
>>> I think that part (but not all) of the differences between
>>> FreeBSD and Linux can be explained by the fact that FreeBSD
>>> currently doesn't advertise itself as featuring
>>> ACPI_CAP_SMP_C1_NATIVE and ACPI_CAP_SMP_C3_NATIVE.  I am not sure
>>> what it would take to actually support these features.  I think
>>> that Linux does support (or at least advertise support) for these
>>> features.
>>
>> Is there some simple way of sending fake advertisement? Or will
>> that lead to disaster?
> 
> Actually, ACPI_CAP_SMP_C1_NATIVE is kinda supported but without hints
> from ACPI _CST FFH.  It sits in machdep.c as cpu_idle_mwait().  So,
> I think you can advertise them.  The easist way is this (not tested):

But don't we currently ignore FFH-type C state definitions?
I am not sure that mwait that we use (its parameters) would be the same as the
system would expect us to use unless we actually parse FFH data.  Even for C1
sate.  Also I am not sure if that would give much gain/difference.

> Index: sys/dev/acpica/acpi_cpu.c
> ===================================================================
> --- sys/dev/acpica/acpi_cpu.c   (revision 223651)
> +++ sys/dev/acpica/acpi_cpu.c   (working copy)
> @@ -339,6 +339,10 @@ acpi_cpu_attach(device_t dev)
>       * SMP control where each CPU can have different settings.
>       */
>      sc->cpu_features = ACPI_CAP_SMP_SAME | ACPI_CAP_SMP_SAME_C3;
> +#if defined(__amd64__) || defined(__i386__)
> +    if ((cpu_feature2 & CPUID2_MON) != 0)
> +	sc->cpu_features |= ACPI_CAP_SMP_C1_NATIVE;
> +#endif
>      if (devclass_get_drivers(acpi_cpu_devclass, &drivers, &drv_count) == 0) {
> 	for (i = 0; i < drv_count; i++) {
> 	    if (ACPI_GET_FEATURES(drivers[i], &features) == 0)
> 
> ACPI_CAP_SMP_C3_NATIVE is also kinda supported without hints from
> the GAS.

-- 
Andriy Gapon


More information about the freebsd-acpi mailing list