Beispiel #1
0
static void
acpi_cst_cx_probe(struct acpi_cst_softc *sc)
{
    ACPI_FUNCTION_TRACE((char *)(uintptr_t)__func__);

    /* Use initial sleep value of 1 sec. to start with lowest idle state. */
    sc->cst_prev_sleep = 1000000;
    sc->cst_cx_lowest = 0;
    sc->cst_cx_lowest_req = 0;

    /*
     * Check for the ACPI 2.0 _CST sleep states object.  If we can't find
     * any, we'll revert to FADT/P_BLK Cx control method which will be
     * handled by acpi_cst_postattach.  We need to defer to after having
     * probed all the cpus in the system before probing for Cx states from
     * FADT as we may already have found cpus with valid _CST packages.
     */
    if (!acpi_cst_use_fadt && acpi_cst_cx_probe_cst(sc, 0) != 0) {
	/*
	 * We were unable to find a _CST package for this cpu or there
	 * was an error parsing it. Switch back to generic mode.
	 */
	acpi_cst_use_fadt = TRUE;
	if (bootverbose)
	    device_printf(sc->cst_dev, "switching to FADT Cx mode\n");
    }

    /*
     * TODO: _CSD Package should be checked here.
     */
}
Beispiel #2
0
static void
acpi_cst_cx_reprobe_cst_handler(struct cpuhelper_msg *msg)
{
    int error;

    error = acpi_cst_cx_probe_cst(msg->ch_cbarg, 1);
    cpuhelper_replymsg(msg, error);
}
Beispiel #3
0
static void
acpi_cst_cx_reprobe_cst_handler(netmsg_t msg)
{
    struct netmsg_acpi_cst *rmsg = (struct netmsg_acpi_cst *)msg;
    int error;

    error = acpi_cst_cx_probe_cst(rmsg->sc, 1);
    lwkt_replymsg(&rmsg->base.lmsg, error);
}