Skip to content

Commit

Permalink
PCI PM: PCIe PME root port service driver
Browse files Browse the repository at this point in the history
PCIe native PME detection mechanism is based on interrupts generated
by root ports or event collectors every time a PCIe device sends a
PME message upstream.

Once a PME message has been sent by an endpoint device and received
by its root port (or event collector in the case of root complex
integrated endpoints), the Requester ID from the message header is
registered in the root port's Root Status register.  At the same
time, the PME Status bit of the Root Status register is set to
indicate that there's a PME to handle.  If PCIe PME interrupt is
enabled for the root port, it generates an interrupt once the PME
Status has been set.  After receiving the interrupt, the kernel can
identify the PCIe device that generated the PME using the Requester
ID from the root port's Root Status register. [For details, see PCI
Express Base Specification, Rev. 2.0.]

Implement a driver for the PCIe PME root port service working in
accordance with the above description.

Based on a patch from Shaohua Li <shaohua.li@intel.com>.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
  • Loading branch information
Rafael J. Wysocki authored and Jesse Barnes committed Feb 23, 2010
1 parent 58ff463 commit c7f4865
Show file tree
Hide file tree
Showing 8 changed files with 596 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Documentation/kernel-parameters.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1998,6 +1998,12 @@ and is between 256 and 4096 characters. It is defined in the file
force Enable ASPM even on devices that claim not to support it.
WARNING: Forcing ASPM on may cause system lockups.

pcie_pme= [PCIE,PM] Native PCIe PME signaling options:
off Do not use native PCIe PME signaling.
force Use native PCIe PME signaling even if the BIOS refuses
to allow the kernel to control the relevant PCIe config
registers.

pcmv= [HW,PCMCIA] BadgePAD 4

pd. [PARIDE]
Expand Down
4 changes: 4 additions & 0 deletions drivers/pci/pcie/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -46,3 +46,7 @@ config PCIEASPM_DEBUG
help
This enables PCI Express ASPM debug support. It will add per-device
interface to control ASPM.

config PCIE_PME
def_bool y
depends on PCIEPORTBUS && PM_RUNTIME && EXPERIMENTAL && ACPI
2 changes: 2 additions & 0 deletions drivers/pci/pcie/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,5 @@ obj-$(CONFIG_PCIEPORTBUS) += pcieportdrv.o

# Build PCI Express AER if needed
obj-$(CONFIG_PCIEAER) += aer/

obj-$(CONFIG_PCIE_PME) += pme/
8 changes: 8 additions & 0 deletions drivers/pci/pcie/pme/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#
# Makefile for PCI-Express Root Port PME signaling driver
#

obj-$(CONFIG_PCIE_PME) += pmedriver.o

pmedriver-objs := pcie_pme.o
pmedriver-$(CONFIG_ACPI) += pcie_pme_acpi.o
Loading

0 comments on commit c7f4865

Please sign in to comment.