Page MenuHomeFreeBSD

D6023.id.diff
No OneTemporary

D6023.id.diff

Index: head/sys/dev/acpica/acpi_pcib_acpi.c
===================================================================
--- head/sys/dev/acpica/acpi_pcib_acpi.c
+++ head/sys/dev/acpica/acpi_pcib_acpi.c
@@ -295,6 +295,40 @@
}
#endif
+static void
+acpi_pcib_osc(struct acpi_hpcib_softc *sc)
+{
+ ACPI_STATUS status;
+ uint32_t cap_set[3];
+
+ static uint8_t pci_host_bridge_uuid[ACPI_UUID_LENGTH] = {
+ 0x5b, 0x4d, 0xdb, 0x33, 0xf7, 0x1f, 0x1c, 0x40,
+ 0x96, 0x57, 0x74, 0x41, 0xc0, 0x3d, 0xd7, 0x66
+ };
+
+ /* Support Field: Extended PCI Config Space, MSI */
+ cap_set[1] = 0x11;
+
+ /* Control Field */
+ cap_set[2] = 0;
+
+ status = acpi_EvaluateOSC(sc->ap_handle, pci_host_bridge_uuid, 1,
+ nitems(cap_set), cap_set, false);
+ if (ACPI_FAILURE(status)) {
+ if (status == AE_NOT_FOUND)
+ return;
+ device_printf(sc->ap_dev, "_OSC failed: %s\n",
+ AcpiFormatException(status));
+ return;
+ }
+
+ if (cap_set[0] != 0) {
+ device_printf(sc->ap_dev, "_OSC returned error %#x\n",
+ cap_set[0]);
+ return;
+ }
+}
+
static int
acpi_pcib_acpi_attach(device_t dev)
{
@@ -321,6 +355,8 @@
if (!acpi_DeviceIsPresent(dev))
return (ENXIO);
+ acpi_pcib_osc(sc);
+
/*
* Get our segment number by evaluating _SEG.
* It's OK for this to not exist.

File Metadata

Mime Type
text/plain
Expires
Sat, Apr 11, 5:24 AM (11 h, 7 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
31252130
Default Alt Text
D6023.id.diff (1 KB)

Event Timeline