diff options
author | njl <njl@FreeBSD.org> | 2005-03-04 05:29:56 +0000 |
---|---|---|
committer | njl <njl@FreeBSD.org> | 2005-03-04 05:29:56 +0000 |
commit | de66a2d7daa7f2ba7c942fb43cd0864c383895cc (patch) | |
tree | 4e83f2995cd406a55988dc09b001d2e857c79151 /sys/dev/acpica/acpi_perf.c | |
parent | 1106efffc31f03d34e70770e615ab94af9858183 (diff) | |
download | FreeBSD-src-de66a2d7daa7f2ba7c942fb43cd0864c383895cc.zip FreeBSD-src-de66a2d7daa7f2ba7c942fb43cd0864c383895cc.tar.gz |
Check for some impossible frequencies that some systems use to indicate
they don't actually support Px states.
Diffstat (limited to 'sys/dev/acpica/acpi_perf.c')
-rw-r--r-- | sys/dev/acpica/acpi_perf.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/sys/dev/acpica/acpi_perf.c b/sys/dev/acpica/acpi_perf.c index ab17a56..629f036 100644 --- a/sys/dev/acpica/acpi_perf.c +++ b/sys/dev/acpica/acpi_perf.c @@ -273,7 +273,16 @@ acpi_perf_evaluate(device_t dev) device_printf(dev, "invalid _PSS package\n"); continue; } + + /* + * Check for some impossible frequencies that some systems + * use to indicate they don't actually support Px states. + */ p = &sc->px_states[i].core_freq; + if (*p == 9999 || *p == 0xffff) + goto out; + + /* Parse the rest of the package into the struct. */ for (j = 0; j < 6; j++, p++) acpi_PkgInt32(res, j, p); } |