Remove query flag from acpi_EvaluateOSC(). This function does not support

return buffer (yet).
This commit is contained in:
Jung-uk Kim 2016-04-20 21:21:47 +00:00
parent 4357a5d1ef
commit cad6d22280
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=298377
4 changed files with 8 additions and 6 deletions

View File

@ -2482,7 +2482,7 @@ acpi_AppendBufferResource(ACPI_BUFFER *buf, ACPI_RESOURCE *res)
ACPI_STATUS
acpi_EvaluateOSC(ACPI_HANDLE handle, uint8_t *uuid, int revision, int count,
uint32_t *caps, bool query)
uint32_t *caps)
{
ACPI_OBJECT arg[4];
ACPI_OBJECT_LIST arglist;
@ -2499,7 +2499,6 @@ acpi_EvaluateOSC(ACPI_HANDLE handle, uint8_t *uuid, int revision, int count,
arg[3].Type = ACPI_TYPE_BUFFER;
arg[3].Buffer.Length = count * sizeof(uint32_t);
arg[3].Buffer.Pointer = (uint8_t *)caps;
caps[0] = query ? 1 : 0;
return (AcpiEvaluateObject(handle, "_OSC", &arglist, NULL));
}

View File

@ -391,9 +391,9 @@ acpi_cpu_attach(device_t dev)
* Intel Processor Vendor-Specific ACPI Interface Specification.
*/
if (sc->cpu_features) {
cap_set[0] = 0;
cap_set[1] = sc->cpu_features;
status = acpi_EvaluateOSC(sc->cpu_handle, cpu_oscuuid, 1, 2, cap_set,
false);
status = acpi_EvaluateOSC(sc->cpu_handle, cpu_oscuuid, 1, 2, cap_set);
if (ACPI_SUCCESS(status)) {
if (cap_set[0] != 0)
device_printf(dev, "_OSC returned status %#x\n", cap_set[0]);

View File

@ -306,6 +306,9 @@ acpi_pcib_osc(struct acpi_hpcib_softc *sc)
0x96, 0x57, 0x74, 0x41, 0xc0, 0x3d, 0xd7, 0x66
};
/* Query Support Flag */
cap_set[0] = 0;
/* Support Field: Extended PCI Config Space, MSI */
cap_set[1] = 0x11;
@ -313,7 +316,7 @@ acpi_pcib_osc(struct acpi_hpcib_softc *sc)
cap_set[2] = 0;
status = acpi_EvaluateOSC(sc->ap_handle, pci_host_bridge_uuid, 1,
nitems(cap_set), cap_set, false);
nitems(cap_set), cap_set);
if (ACPI_FAILURE(status)) {
if (status == AE_NOT_FOUND)
return;

View File

@ -336,7 +336,7 @@ ACPI_STATUS acpi_FindIndexedResource(ACPI_BUFFER *buf, int index,
ACPI_STATUS acpi_AppendBufferResource(ACPI_BUFFER *buf,
ACPI_RESOURCE *res);
ACPI_STATUS acpi_EvaluateOSC(ACPI_HANDLE handle, uint8_t *uuid,
int revision, int count, uint32_t *caps, bool query);
int revision, int count, uint32_t *caps);
ACPI_STATUS acpi_OverrideInterruptLevel(UINT32 InterruptNumber);
ACPI_STATUS acpi_SetIntrModel(int model);
int acpi_ReqSleepState(struct acpi_softc *sc, int state);