diff options
| author | Alexander Motin <mav@FreeBSD.org> | 2020-06-26 19:55:11 +0000 |
|---|---|---|
| committer | Alexander Motin <mav@FreeBSD.org> | 2020-06-26 19:55:11 +0000 |
| commit | 4cee4598e7d7819ccc10eb353a33623fcbf84e09 (patch) | |
| tree | bbfca96fd960152fd43d4baf3c08a53e8f7a6759 /sys | |
| parent | 85a2ea3f5785a299db029b84eee6d33d174e38da (diff) | |
Notes
Diffstat (limited to 'sys')
| -rw-r--r-- | sys/dev/acpica/acpi_pcib_acpi.c | 4 | ||||
| -rw-r--r-- | sys/dev/pci/pci.c | 4 | ||||
| -rw-r--r-- | sys/dev/pci/pcivar.h | 1 |
3 files changed, 9 insertions, 0 deletions
diff --git a/sys/dev/acpica/acpi_pcib_acpi.c b/sys/dev/acpica/acpi_pcib_acpi.c index 54fd2000617b..59f255cdba16 100644 --- a/sys/dev/acpica/acpi_pcib_acpi.c +++ b/sys/dev/acpica/acpi_pcib_acpi.c @@ -326,6 +326,10 @@ acpi_pcib_osc(struct acpi_hpcib_softc *sc, uint32_t osc_ctl) /* Support Field: Extended PCI Config Space, PCI Segment Groups, MSI */ cap_set[PCI_OSC_SUPPORT] = PCIM_OSC_SUPPORT_EXT_PCI_CONF | PCIM_OSC_SUPPORT_SEG_GROUP | PCIM_OSC_SUPPORT_MSI; + /* Active State Power Management, Clock Power Management Capability */ + if (pci_enable_aspm) + cap_set[PCI_OSC_SUPPORT] |= PCIM_OSC_SUPPORT_ASPM | + PCIM_OSC_SUPPORT_CPMC; /* Control Field */ cap_set[PCI_OSC_CTL] = sc->ap_osc_ctl | osc_ctl; diff --git a/sys/dev/pci/pci.c b/sys/dev/pci/pci.c index e2da392fed75..e740caa7fc8a 100644 --- a/sys/dev/pci/pci.c +++ b/sys/dev/pci/pci.c @@ -408,6 +408,10 @@ static int pci_enable_ari = 1; SYSCTL_INT(_hw_pci, OID_AUTO, enable_ari, CTLFLAG_RDTUN, &pci_enable_ari, 0, "Enable support for PCIe Alternative RID Interpretation"); +int pci_enable_aspm; +SYSCTL_INT(_hw_pci, OID_AUTO, enable_aspm, CTLFLAG_RDTUN, &pci_enable_aspm, + 0, "Enable support for PCIe Active State Power Management"); + static int pci_clear_aer_on_attach = 0; SYSCTL_INT(_hw_pci, OID_AUTO, clear_aer_on_attach, CTLFLAG_RWTUN, &pci_clear_aer_on_attach, 0, diff --git a/sys/dev/pci/pcivar.h b/sys/dev/pci/pcivar.h index a5d644d1a585..37ad9242ebe1 100644 --- a/sys/dev/pci/pcivar.h +++ b/sys/dev/pci/pcivar.h @@ -257,6 +257,7 @@ typedef struct { } pcih2cfgregs; extern uint32_t pci_numdevs; +extern int pci_enable_aspm; /* * The bitfield has to be stable and match the fields below (so that |
