summaryrefslogtreecommitdiffstats
path: root/sys/dev/acpica/acpi_cpu.c
diff options
context:
space:
mode:
authormsmith <msmith@FreeBSD.org>2001-07-21 04:05:32 +0000
committermsmith <msmith@FreeBSD.org>2001-07-21 04:05:32 +0000
commit4cd3fb742ee475431198f7bcc90346691e61565d (patch)
treee123f161e0c2eceb3171f1e03d7b96ea461315c5 /sys/dev/acpica/acpi_cpu.c
parent463a32bf0dc7d8704b16f256d69cccad6a91e140 (diff)
downloadFreeBSD-src-4cd3fb742ee475431198f7bcc90346691e61565d.zip
FreeBSD-src-4cd3fb742ee475431198f7bcc90346691e61565d.tar.gz
Use our saved copy of the FADT rather than fetching it again.
Diffstat (limited to 'sys/dev/acpica/acpi_cpu.c')
-rw-r--r--sys/dev/acpica/acpi_cpu.c18
1 files changed, 5 insertions, 13 deletions
diff --git a/sys/dev/acpica/acpi_cpu.c b/sys/dev/acpica/acpi_cpu.c
index f37815d..a780438 100644
--- a/sys/dev/acpica/acpi_cpu.c
+++ b/sys/dev/acpica/acpi_cpu.c
@@ -154,18 +154,10 @@ acpi_cpu_attach(device_t dev)
* Get global parameters from the FADT.
*/
if (device_get_unit(sc->cpu_dev) == 0) {
- /* get the FADT */
- if (ACPI_FAILURE(status = acpi_GetTableIntoBuffer(ACPI_TABLE_FADT, 1, &buf))) {
- device_printf(sc->cpu_dev, "couldn't get FADT - %s\n", acpi_strerror(status));
- if (buf.Pointer != NULL)
- AcpiOsFree(buf.Pointer);
- return_VALUE(ENXIO);
- }
- cpu_duty_offset = ((FADT_DESCRIPTOR_REV2 *)buf.Pointer)->DutyOffset;
- cpu_duty_width = ((FADT_DESCRIPTOR_REV2 *)buf.Pointer)->DutyWidth;
- cpu_smi_cmd = ((FADT_DESCRIPTOR_REV1 *)buf.Pointer)->SmiCmd;
- cpu_pstate_cnt = ((FADT_DESCRIPTOR_REV2 *)buf.Pointer)->PstateCnt;
- AcpiOsFree(buf.Pointer);
+ cpu_duty_offset = AcpiGbl_FADT->DutyOffset;
+ cpu_duty_width = AcpiGbl_FADT->DutyWidth;
+ cpu_smi_cmd = AcpiGbl_FADT->SmiCmd;
+ cpu_pstate_cnt = AcpiGbl_FADT->PstateCnt;
/* validate the offset/width */
duty_end = cpu_duty_offset + cpu_duty_width - 1;
@@ -281,7 +273,7 @@ acpi_cpu_init_throttling(void *arg)
/* if ACPI 2.0+, signal platform that we are taking over throttling */
if (cpu_pstate_cnt != 0) {
/* XXX should be a generic interface for this */
- AcpiOsOut8(cpu_smi_cmd, cpu_pstate_cnt);
+ AcpiOsWritePort(cpu_smi_cmd, cpu_pstate_cnt, 8);
}
ACPI_UNLOCK;
OpenPOWER on IntegriCloud