First import (compiles, seems to run correctly) Taken from FreeBSD r222544:218590 (patch applied), not from acpica repository. One problem shown (no more reproducible, skew build?): in bootverbose mode 'domain0 misses processors, should be 2, got 1' sysctl shows hw.acpi.cpu0 only, other cpus are missing; seems an error in evaluating C009 Method in aml code... TODO: * iasl compiler Makefile has to be reworked because of specific YASL flags for new files dtparser.[yl] * 'EVENTHANDLER_INVOKE(power_suspend)' to be integrated in acpi.c * atomic_load_acq_64 isn't implemented (used in acpi_hpet.c) * sc->tc.tc_quality isn't available; to be investigated * acpi_timer_test() improved implementation not integrated * ACPI_CAP_SMP_C3_NATIVE and CPI_CAP_PX_HW_COORD in acpivar.h left out, as FreeBSD don't use it either
kernel/acpi: Remove the redefinition of kthread_create(). It's a relict from an old pile of #ifdefs that defined various incarnations of kthread_create()s for various FreeBSD versions. The #ifdefs have since been removed and this #define is what used to be the __DragonFly__ case. There are only 3 places where kthread_create() is used in ACPI, so remove it because it's just confusing. While here, fix a non-constant format string in one of the kthread_create()s.
acpi/pstate: Fix the long standing P-State detection problem on Intel CPUs - Rename the ACPI_CAP to ACPI_PDC according to Intel's document. While I'm here, update the document revision. - Remove unapplied comment about _OSC and _PDC's revision; Intel's document states clearly that it should be 1 - Fix the 'Count' argument for _OSC evaluation; the intergers in 'Capabilities buffer' argument is 2 - Fix the buffer length of _OSC's 'Capabilities buffer'; we only pass 2 intergers. - Perfer _OSC evaluation, fall back to _PDC evaluation only if _OSC evaluation fails. - Add MD cpu features, so MD code could deliver proper settings. For AMD CPUs, the old configuration just works (AMD actually has no documents about _PDC and _OSC). For Intel CPUs w/ EST, it looks like P-State's _PCT will appear only when bit0 (P-State MSR), bit5 (P-State software coordination) and bit11 (P-State hardware coordination) are turned on.
acpi: sync GPE with FreeBSD 8.0 (and according the acpi api) * use AcpiSetGpeWakeMask(), as AcpiEnableGpe() is already done in embedded controller initialization code. AcpiSetGpeWakeMask() is needed anyway to mark the gpe as wakable. (AcpiEnableGpe() enableas automatically only runtime GPEs now) * using AcpiFinishGpe() in EcGpeQueryHandler() (as fbsd does) seems to make the system reactive as it should (was sensibly slowly without that)