Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 28 Jun 2011 17:13:11 -0400
From:      Jung-uk Kim <jkim@FreeBSD.org>
To:        freebsd-acpi@FreeBSD.org
Cc:        Vitaly Magerya <vmagerya@gmail.com>, Andriy Gapon <avg@freebsd.org>
Subject:   Re: (Missing) power states of an Atom N455-based netbook
Message-ID:  <201106281713.20698.jkim@FreeBSD.org>
In-Reply-To: <BANLkTin_%2BZH%2Bo7rdR9ijHMtrXcSdH9ZSdQ@mail.gmail.com>
References:  <BANLkTim%2B1UwquMJ32WP8wZBGkYxPv78MLA@mail.gmail.com> <4E09BADF.7050702@FreeBSD.org> <BANLkTin_%2BZH%2Bo7rdR9ijHMtrXcSdH9ZSdQ@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201106281713.20698.jkim>