(Missing) power states of an Atom N455-based netbook
Jung-uk Kim
jkim at FreeBSD.org
Tue Jun 28 21:13:27 UTC 2011
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):
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.
Jung-uk Kim
More information about the freebsd-acpi
mailing list