Lines Matching +full:smi +full:- +full:based
1 /*-
2 * SPDX-License-Identifier: BSD-2-Clause
28 * This driver is based upon information found by examining speedstep-0.5
143 *sig = -1; in int15_gsic_call()
144 *smi_cmd = -1; in int15_gsic_call()
145 *command = -1; in int15_gsic_call()
146 *smi_data = -1; in int15_gsic_call()
147 *flags = -1; in int15_gsic_call()
161 /* Perform actual SMI call to enable SpeedStep. */
169 data->result = error; in set_ownership_cb()
173 /* Copy in the magic string and send it by writing to the SMI port. */ in set_ownership_cb()
174 strlcpy(data->buf, smist_magic, PAGE_SIZE); in set_ownership_cb()
176 "movl $-1, %%edi\n\t" in set_ownership_cb()
178 : "=D" (data->result) in set_ownership_cb()
179 : "a" (data->command), in set_ownership_cb()
182 "d" (data->smi_cmd), in set_ownership_cb()
197 * passed to the BIOS in a 32-bit register, we have to make sure it is in set_ownership()
216 cb_data.smi_cmd = sc->smi_cmd; in set_ownership()
217 cb_data.command = sc->command; in set_ownership()
245 DPRINT(sc->dev, "calling GSI\n"); in getset_state()
248 "movl $-1, %%edi\n\t" in getset_state()
253 : "a" (sc->command), in getset_state()
256 "d" (sc->smi_cmd) in getset_state()
259 DPRINT(sc->dev, "GSI returned: eax %.8x ebx %.8x edi %.8x\n", in getset_state()
297 /* Check for a supported PCI-ISA bridge */ in smist_identify()
298 for (id = piix4_pci_devices; id->desc != NULL; ++id) { in smist_identify()
299 if ((piix4 = pci_find_device(id->vendor, id->device)) != NULL) in smist_identify()
306 printf("smist: found supported isa bridge %s\n", id->desc); in smist_identify()
308 if (device_find_child(parent, "smist", -1) != NULL) in smist_identify()
333 perf_dev = device_find_child(device_get_parent(dev), "acpi_perf", -1); in smist_probe()
339 ichss_dev = device_find_child(device_get_parent(dev), "ichss", -1); in smist_probe()
349 if (sig != -1) { in smist_probe()
350 sc->smi_cmd = smi_cmd; in smist_probe()
351 sc->smi_data = smi_data; in smist_probe()
363 sc->command = (sig & 0xffffff00) | (command & 0xff); in smist_probe()
364 sc->flags = flags; in smist_probe()
367 sc->smi_cmd = 0xb2; in smist_probe()
368 sc->smi_data = 0xb3; in smist_probe()
369 sc->command = 0x47534982; in smist_probe()
370 sc->flags = 0; in smist_probe()
373 device_set_desc(dev, "SpeedStep SMI"); in smist_probe()
375 return (-1500); in smist_probe()
384 sc->dev = dev; in smist_attach()
391 sc->sets[0].freq = CPUFREQ_VAL_UNKNOWN; in smist_attach()
392 sc->sets[0].volts = CPUFREQ_VAL_UNKNOWN; in smist_attach()
393 sc->sets[0].power = CPUFREQ_VAL_UNKNOWN; in smist_attach()
394 sc->sets[0].lat = 1000; in smist_attach()
395 sc->sets[0].dev = dev; in smist_attach()
396 sc->sets[1] = sc->sets[0]; in smist_attach()
430 if (sc->sets[i].freq == CPUFREQ_VAL_UNKNOWN) { in smist_settings()
432 smist_set(dev, &sc->sets[i]); in smist_settings()
434 smist_set(dev, &sc->sets[first]); in smist_settings()
438 bcopy(sc->sets, sets, sizeof(sc->sets)); in smist_settings()
450 /* Look up appropriate bit value based on frequency. */ in smist_set()
452 if (CPUFREQ_CMP(set->freq, sc->sets[0].freq)) in smist_set()
454 else if (CPUFREQ_CMP(set->freq, sc->sets[1].freq)) in smist_set()
472 } while (rv && --try); in smist_set()
474 rv, 4 - try); in smist_set()
493 if (sc->sets[state].freq == CPUFREQ_VAL_UNKNOWN) { in smist_get()
495 sc->sets[state].freq = rate / 1000000; in smist_get()
497 sc->sets[state].freq); in smist_get()
499 *set = sc->sets[state]; in smist_get()