summaryrefslogtreecommitdiff
path: root/src/drivers/pcie/generic
AgeCommit message (Collapse)Author
2023-08-06drivers: Add SPDX license headers to MakefilesMartin Roth
To help identify the licenses of the various files contained in the coreboot source, we've added SPDX headers to the top of all of the .c and .h files. This extends that practice to Makefiles. Any file in the coreboot project without a specific license is bound to the license of the overall coreboot project, GPL Version 2. This patch adds the GPL V2 license identifier to the top of all makefiles in the drivers directory that don't already have an SPDX license line at the top. Signed-off-by: Martin Roth <gaumless@gmail.com> Change-Id: I8442bc18ce228eca88a084660be84bcd1c5de928 Reviewed-on: https://review.coreboot.org/c/coreboot/+/68980 Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de> Reviewed-by: Eric Lai <eric_lai@quanta.corp-partner.google.com> Reviewed-by: Tim Crawford <tcrawford@system76.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Elyes Haouas <ehaouas@noos.fr>
2023-05-11drivers/pcie/generic: Add DmaProperty to configMark Hasemeyer
Adds the option to set the 'DmaProperty' in the device's _DSD. This can be done by setting "add_acpi_dma_property"="true". If not set (or set to false), the device descriptor generation behavior will remain unchanged. The naming convention for the config option was chosen to match that of other drivers. This partially reverts commit 5609f7a684c6 ("drivers/pcie/generic: Clean up driver") as the driver is now used on a couple mainboards which need the DmaProperty. Change-Id: I996fe4923948d13a20bf8b6b1a93dab0866d0fd4 Signed-off-by: Mark Hasemeyer <markhas@google.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/75094 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Jan Samek <jan.samek@siemens.com> Reviewed-by: Karthik Ramasubramanian <kramasub@google.com>
2022-07-20drivers/pci/generic: Add support for `_PRW`Robert Zieba
This commit adds support for `_PRW` in this driver. BUG=b:237682766 TEST=Built and booted on Skyrim device, dumped SSDT Change-Id: Ife4ba48994cbf993bc88df8354576336438e4258 Signed-off-by: Robert Zieba <robertzieba@google.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/65799 Reviewed-by: Raul Rangel <rrangel@chromium.org> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2022-07-20drivers/pcie/generic: Add support for custom ACPI nameRobert Zieba
This commit adds code to allow the driver to use an ACPI device name that is set in the device tree. BUG=b:237682766 TEST=Boot changes on Skyrim device, dumped SSDT Signed-off-by: Robert Zieba <robertzieba@google.com> Change-Id: Ie40a335e35b8ac83658e67d7cfba0750dd4784ad Reviewed-on: https://review.coreboot.org/c/coreboot/+/65798 Reviewed-by: Raul Rangel <rrangel@chromium.org> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2022-07-20drivers/pcie/generic: Clean up driverRobert Zieba
This removes unneeded and unused functionality in the driver as part of an effort to make the driver more generic and useful. The things that have been removed are: `DmaProperty` and its associated `is_untrusted` config, `_DSD` generation, and the companion device functionality. This driver isn't currently used anywhere so there won't be any issues from removing the above functionality. BUG=b:237682766 TEST=Built and booted coreboot on Skyrim device Change-Id: I0abd9148ab66ea9426069102ecc8c2fa77fea98e Signed-off-by: Robert Zieba <robertzieba@google.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/65797 Reviewed-by: Raul Rangel <rrangel@chromium.org> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2022-03-10drivers/pcie/generic: Add support to generate code under companion device ↵Cliff Huang
instead Only one ACPI device should be added to a PCIe root port. For the root ports which already have device created, the generated code from this driver needs to be merged with the existing device. By default, this driver will create new device named DEV0. This change allows to generate code under an existing device. ex: (generate code under PXSX): Scope (\_SB.PCI0.RP01.PXSX) { Name (_DSD, Package (0x02) // _DSD: Device-Specific Data { ToUUID ("daffd814-6eba-4d8c-8a91-bc9bbf4aa301") Package (0x01) { Package (0x02) { "UntrustedDevice", One } } }) } BUG=b:221250331 BRANCH=firmware-brya-14505.B Signed-off-by: Cliff Huang <cliff.huang@intel.com> Change-Id: I80634bbfc2927f26f2a55a9c244eca517c437079 Reviewed-on: https://review.coreboot.org/c/coreboot/+/62301 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
2022-03-03drivers/{pcie,wifi}/generic: Update untrusted property nameTim Wawrzynczak
In order to align with established standards for establishing DMA boundaries[1] from ACPI, the UntrustedDevice property has been renamed to DmaProperty, which follows Microsoft's implementation. After discussions with Microsoft, they have agreed to make the `UID` property optional, so it is left out here, and instead it can be applied to: 1) Internal PCI devices 2) PCIe root ports 3) Downstream PCI(e) devices [1]: https://docs.microsoft.com/en-us/windows-hardware/drivers/pci/dsd-for-pcie-root-ports BUG=b:215424986 Signed-off-by: Tim Wawrzynczak <twawrzynczak@chromium.org> Change-Id: Id70e916532e3d3d70305fc61473da28c702fc397 Reviewed-on: https://review.coreboot.org/c/coreboot/+/62435 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: EricR Lai <ericr_lai@compal.corp-partner.google.com>
2022-02-09drivers/pcie/generic: Add new pcie generic chip driverTim Wawrzynczak
This new chip driver will be used for attaching ACPI properties to PCIe endpoints. The first property it supports is "UntrustedDevice." This property can be used by a payload to, e.g., restrict the device to its own IOMMU domain for security purposes. The new property is added by adding a _DSD and an integer property set to 1. Example of the property from google/brya0: Scope (\_SB.PCI0.RP01) { Device (DEV0) { Name (_ADR, 0x0000000000000000) // _ADR: Address Name (_DSD, Package (0x02) // _DSD: Device-Specific Data { ToUUID ("daffd814-6eba-4d8c-8a91-bc9bbf4aa301") /* Device Properties for _DSD */, Package (0x01) { Package (0x02) { "UntrustedDevice", One } } }) } } BUG=b:215424986 TEST=boot patch train on google/brya0, dump SSDT, see above for snippet Signed-off-by: Tim Wawrzynczak <twawrzynczak@chromium.org> Change-Id: I53986614dcbf4d10a6bb4010e131f5ff5a9d25cf Reviewed-on: https://review.coreboot.org/c/coreboot/+/61627 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Nick Vaccaro <nvaccaro@google.com>