From owner-freebsd-acpi@FreeBSD.ORG Tue Jun 28 21:13:27 2011 Return-Path: Delivered-To: freebsd-acpi@FreeBSD.org Received: from [127.0.0.1] (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by hub.freebsd.org (Postfix) with ESMTP id 6D7E7106564A; Tue, 28 Jun 2011 21:13:26 +0000 (UTC) (envelope-from jkim@FreeBSD.org) From: Jung-uk Kim To: freebsd-acpi@FreeBSD.org Date: Tue, 28 Jun 2011 17:13:11 -0400 User-Agent: KMail/1.6.2 References: <4E09BADF.7050702@FreeBSD.org> In-Reply-To: MIME-Version: 1.0 Content-Disposition: inline Message-Id: <201106281713.20698.jkim@FreeBSD.org> Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Cc: Vitaly Magerya , Andriy Gapon Subject: Re: (Missing) power states of an Atom N455-based netbook X-BeenThere: freebsd-acpi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: ACPI and power management development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Jun 2011 21:13:27 -0000 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