Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 11 Nov 2010 12:39:35 -0800
From:      "Moore, Robert" <robert.moore@intel.com>
To:        Andriy Gapon <avg@freebsd.org>, "freebsd-acpi@freebsd.org" <freebsd-acpi@freebsd.org>
Cc:        "Lin, Ming M" <ming.m.lin@intel.com>
Subject:   RE: fixup for missing C1 in _CST
Message-ID:  <4911F71203A09E4D9981D27F9D830858BC5E9503@orsmsx503.amr.corp.intel.com>
In-Reply-To: <4911F71203A09E4D9981D27F9D830858BC5E94D3@orsmsx503.amr.corp.intel.com>
References:  <4CDC25F2.6080409@freebsd.org> <4911F71203A09E4D9981D27F9D830858BC5E94D3@orsmsx503.amr.corp.intel.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Oops, missed it.

"_CST defines ascending C-states..."

Could it be that the problem is that the platform is returning a _CST packa=
ge that is not sorted or even is sorted descending?

Bob


>-----Original Message-----
>From: owner-freebsd-acpi@freebsd.org [mailto:owner-freebsd-
>acpi@freebsd.org] On Behalf Of Moore, Robert
>Sent: Thursday, November 11, 2010 12:20 PM
>To: Andriy Gapon; freebsd-acpi@freebsd.org
>Cc: Lin, Ming M
>Subject: RE: fixup for missing C1 in _CST
>
>It's not clear to me from reading the ACPI spec that the Cstate sub-
>packages are required to be in any specific order.
>
>This means that
>
>sc->cpu_cx_states[0]
>
>Does not necessarily have to be of type ACPI_STATE_C1, if ACPI_STATE_C1 is
>present on the machine. (unless the driver has sorted the list already.)
>
>This looks like an area where ACPICA could sort the packages by type befor=
e
>handing off the _CST package to the driver.
>
>Bob
>
>
>>-----Original Message-----
>>From: owner-freebsd-acpi@freebsd.org [mailto:owner-freebsd-
>>acpi@freebsd.org] On Behalf Of Andriy Gapon
>>Sent: Thursday, November 11, 2010 9:21 AM
>>To: freebsd-acpi@freebsd.org
>>Subject: fixup for missing C1 in _CST
>>
>>
>>Dear fellow FreeBSD ACPI hackers,
>>what is your opinion about the following patch?
>>
>>The idea is to add a C1 state to available states if a bugggy BIOS
>supplies
>>us
>>with _CST that has states with C2, C3, etc types, but no state with C1
>>type.
>>
>>Thanks!
>>
>>diff --git a/sys/dev/acpica/acpi_cpu.c b/sys/dev/acpica/acpi_cpu.c
>>index 3c675df..6c771d9 100644
>>--- a/sys/dev/acpica/acpi_cpu.c
>>+++ b/sys/dev/acpica/acpi_cpu.c
>>@@ -724,8 +724,21 @@ acpi_cpu_cx_cst(struct acpi_cpu_softc *sc)
>> 	    sc->cpu_cx_count++;
>> 	}
>>     }
>>-    AcpiOsFree(buf.Pointer);
>>
>>+    if (sc->cpu_cx_count > 0 && sc->cpu_cx_states[0].type !=3D
>>ACPI_STATE_C1) {
>>+	memmove(&sc->cpu_cx_states[1], &sc->cpu_cx_states[0],
>>+	    sc->cpu_cx_count * sizeof(sc->cpu_cx_states[0]));
>>+	sc->cpu_cx_states[0].type =3D ACPI_STATE_C1;
>>+	sc->cpu_cx_states[0].trans_lat =3D 0;
>>+	sc->cpu_cx_states[0].power =3D 0;
>>+	sc->cpu_cx_states[0].p_lvlx =3D NULL;
>>+	sc->cpu_cx_states[0].res_type =3D 0;
>>+	sc->cpu_cx_count++;
>>+	if (sc->cpu_cx_states[1].type <=3D ACPI_STATE_C2)
>>+	    sc->cpu_non_c3++;
>>+    }
>>+
>>+    AcpiOsFree(buf.Pointer);
>>     return (0);
>> }
>>
>>
>>--
>>Andriy Gapon
>>_______________________________________________
>>freebsd-acpi@freebsd.org mailing list
>>http://lists.freebsd.org/mailman/listinfo/freebsd-acpi
>>To unsubscribe, send any mail to "freebsd-acpi-unsubscribe@freebsd.org"
>_______________________________________________
>freebsd-acpi@freebsd.org mailing list
>http://lists.freebsd.org/mailman/listinfo/freebsd-acpi
>To unsubscribe, send any mail to "freebsd-acpi-unsubscribe@freebsd.org"



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