summaryrefslogtreecommitdiffstats
path: root/sys/dev
diff options
context:
space:
mode:
authornjl <njl@FreeBSD.org>2004-03-04 05:17:52 +0000
committernjl <njl@FreeBSD.org>2004-03-04 05:17:52 +0000
commite46b6ea21b7116a8c46c4178c0106e239e5ba8fa (patch)
tree8b806c00fb1eb321b8a05c6c06134390b1f1dd30 /sys/dev
parent2b5556f4cf850806c9b7c36ce854bb1b76c6c8d9 (diff)
downloadFreeBSD-src-e46b6ea21b7116a8c46c4178c0106e239e5ba8fa.zip
FreeBSD-src-e46b6ea21b7116a8c46c4178c0106e239e5ba8fa.tar.gz
Don't disable Cx support and throttling on machines with a P_BLK_LEN != 6
even though the spec mandates this. Some have a value of 5 to indicate throttling + C2 and some have 7 to indicate an extra C3 state. Support throttling if the value is >= 4, C2 for >= 5, and C3 for >= 6.
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/acpica/acpi_cpu.c19
1 files changed, 16 insertions, 3 deletions
diff --git a/sys/dev/acpica/acpi_cpu.c b/sys/dev/acpica/acpi_cpu.c
index 5601b35..29dc322 100644
--- a/sys/dev/acpica/acpi_cpu.c
+++ b/sys/dev/acpica/acpi_cpu.c
@@ -394,8 +394,12 @@ acpi_cpu_throttle_probe(struct acpi_cpu_softc *sc)
/* If _PTC not present or other failure, try the P_BLK. */
if (sc->cpu_p_cnt == NULL) {
- /* The spec says P_BLK must be at least 6 bytes long. */
- if (sc->cpu_p_blk == 0 || sc->cpu_p_blk_len != 6)
+ /*
+ * The spec says P_BLK must be 6 bytes long. However, some
+ * systems use it to indicate a fractional set of features
+ * present so we take anything >= 4.
+ */
+ if (sc->cpu_p_blk_len < 4)
return (ENXIO);
gas.Address = sc->cpu_p_blk;
gas.AddressSpaceId = ACPI_ADR_SPACE_SYSTEM_IO;
@@ -447,7 +451,14 @@ acpi_cpu_cx_probe(struct acpi_cpu_softc *sc)
cx_ptr++;
sc->cpu_cx_count++;
- if (sc->cpu_p_blk_len != 6)
+ /*
+ * The spec says P_BLK must be 6 bytes long. However, some systems
+ * use it to indicate a fractional set of features present so we
+ * take 5 as C2. Some may also have a value of 7 to indicate
+ * another C3 but most use _CST for this (as required) and having
+ * "only" C1-C3 is not a hardship.
+ */
+ if (sc->cpu_p_blk_len < 5)
goto done;
/* Validate and allocate resources for C2 (P_LVL2). */
@@ -465,6 +476,8 @@ acpi_cpu_cx_probe(struct acpi_cpu_softc *sc)
sc->cpu_cx_count++;
}
}
+ if (sc->cpu_p_blk_len < 6)
+ goto done;
/* Validate and allocate resources for C3 (P_LVL3). */
if (AcpiGbl_FADT->Plvl3Lat < 1000 &&
OpenPOWER on IntegriCloud