Revision tags: release/13.2.0, release/12.4.0 |
|
#
7029f2c8 |
| 04-Jun-2022 |
Andrew Turner <andrew@FreeBSD.org> |
Allow pci_host_generic attachments to manage registers
To allow for attachments that don't use memory mapped registers add a flag they can set when the base driver shouldn't map them.
Sponsored by:
Allow pci_host_generic attachments to manage registers
To allow for attachments that don't use memory mapped registers add a flag they can set when the base driver shouldn't map them.
Sponsored by: Arm Ltd Differential Revision: https://reviews.freebsd.org/D39227
show more ...
|
#
527bf200 |
| 06-Mar-2023 |
Andrew Turner <andrew@FreeBSD.org> |
Remove a #error that sneaked in
|
#
cb894f74 |
| 05-Mar-2023 |
Andrew Turner <andrew@FreeBSD.org> |
Map arm64 pci config memory as non-posted
On arm64 PCI config memory is expected to be mapped with a non-posted device type. To handle this use the new bus_map_resource support in arm64 to map memor
Map arm64 pci config memory as non-posted
On arm64 PCI config memory is expected to be mapped with a non-posted device type. To handle this use the new bus_map_resource support in arm64 to map memory with the new VM_MEMATTR_DEVICE_NP attribute. This memory has already been allocated and activated, it just needs to be mapped.
Reviewed by: kevans, mmel Differential Revision: https://reviews.freebsd.org/D30079
show more ...
|
#
bd93b5f7 |
| 26-Sep-2022 |
Kyle Evans <kevans@FreeBSD.org> |
pci_host_generic: stop address translation in bus_alloc_resource
Translating the provided range prior to rman_reserve_resource(9) is decidedly wrong; the caller may be trying to do a wildcard alloca
pci_host_generic: stop address translation in bus_alloc_resource
Translating the provided range prior to rman_reserve_resource(9) is decidedly wrong; the caller may be trying to do a wildcard allocation, for which the implementation is expected to DTRT and clamp the range to what's actually feasible.
We don't use the resulting translation here anyways, so just remove it entirely -- the rman in the default implementation is derived from sc->ranges, so the translation should trivially succeed every time as long as the reservation succeeded. If something has gone awry in a derived driver, we'll detect it when we translate prior to activation, so there's likely no diagnostic value in retaining the translation after reservation either.
Reviewed by: andrew Noticed by: jhb Differential Revision: https://reviews.freebsd.org/D36618
show more ...
|
#
d843dd0e |
| 23-May-2022 |
Andrew Turner <andrew@FreeBSD.org> |
Clean up in the pci host generic driver
Add clean up on failure and a detach function to the pci host generic driver.
Reviewed by: jhb (earlier version) Sponsored by: The FreeBSD Foundation Differe
Clean up in the pci host generic driver
Add clean up on failure and a detach function to the pci host generic driver.
Reviewed by: jhb (earlier version) Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D35291
show more ...
|
Revision tags: release/13.1.0 |
|
#
f6abb39b |
| 09-Apr-2022 |
John Baldwin <jhb@FreeBSD.org> |
pci fdt host drivers: Remove unused variables.
|
Revision tags: release/12.3.0 |
|
#
1fb99e97 |
| 15-Nov-2021 |
Mark Johnston <markj@FreeBSD.org> |
bus: Make BUS_TRANSLATE_RESOURCE behave more like other bus methods
- Return an errno value upon failure, instead of 1. - Provide a bus_translate_resource() wrapper. - Implement the generic version,
bus: Make BUS_TRANSLATE_RESOURCE behave more like other bus methods
- Return an errno value upon failure, instead of 1. - Provide a bus_translate_resource() wrapper. - Implement the generic version, which traverses the hierarchy until a bus driver with a non-trivial implementation is found, in subr_bus.c like other similar default implementations. - Make ofw_pcib_translate_resource() return an error if a matching PCI address range is not found. - Make generic_pcie_translate_resource_common() return an int instead of a bool. Fix up callers.
No functional change intended.
Reviewed by: imp, jhb MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D32855
show more ...
|
#
aeb76076 |
| 12-Oct-2021 |
Ruslan Bukin <br@FreeBSD.org> |
Prevent repeated deallocation of a resource. Also deactivate resource if needed.
Discussed with: jrtc27 Differential Revision: https://reviews.freebsd.org/D32458
|
#
0eb901f7 |
| 20-Sep-2021 |
Greg V <greg@unrelenting.technology> |
pci_host_generic: implement bus_translate_resource (for LinuxKPI)
In D21096 BUS_TRANSLATE_RESOURCE was introduced to allow LinuxKPI to get physical addresses in pci_resource_start for PowerPC and im
pci_host_generic: implement bus_translate_resource (for LinuxKPI)
In D21096 BUS_TRANSLATE_RESOURCE was introduced to allow LinuxKPI to get physical addresses in pci_resource_start for PowerPC and implemented in ofw_pci. When the translation was implemented in pci_host_generic in 372c142b4fc, this method was not implemented; instead a local static function was added for a similar purpose. Rename the static function to "_common" and implement the bus function as a wrapper around that. With this a LinuxKPI driver using physical addresses correctly finds the configuration registers of the GPU. This unbreaks amdgpu on NXP Layerscape LX2160A SoC (SolidRun HoneyComb LX2K workstation) which has a Translation Offset in ACPI for below-4G PCI addresses.
More info: https://github.com/freebsd/drm-kmod/issues/84 Tested by: dan.kotowski_a9development.com Reviewed by: hselasky Differential Revision: https://reviews.freebsd.org/D30986
show more ...
|
#
2de4c7f6 |
| 13-Sep-2021 |
Pawel Anikiel <pan@semihalf.com> |
pci_host_generic: Add Synopsys Designware PCIe controller quirk
Due to the quirky nature of the Synopsys Designware PCIe IP, the type 0 configuration is broadcast and whatever device is plugged into
pci_host_generic: Add Synopsys Designware PCIe controller quirk
Due to the quirky nature of the Synopsys Designware PCIe IP, the type 0 configuration is broadcast and whatever device is plugged into slot, will appear at each 32 device positions of bus0. Mitigate the issue by filtering out duplicated devices on this bus for both DT and ACPI cases.
Reviewed by: mw Sponsored by: Semihalf MFC: after 3 weeks Differential revision: https://reviews.freebsd.org/D31887
show more ...
|
Revision tags: release/13.0.0, release/12.2.0 |
|
#
04e8183f |
| 02-Sep-2020 |
Mateusz Guzik <mjg@FreeBSD.org> |
pci: clean up empty lines in .c and .h files
|
#
372c142b |
| 22-Jun-2020 |
Andrew Turner <andrew@FreeBSD.org> |
Translaate the PCI address when activating a resource
When the PCI address != physical address we need to translate from the former to the latter before passing to the parent to map into the kernels
Translaate the PCI address when activating a resource
When the PCI address != physical address we need to translate from the former to the latter before passing to the parent to map into the kernels virtual address space.
Sponsored by: Innovate UK
show more ...
|
#
41b84341 |
| 19-Jun-2020 |
Andrew Turner <andrew@FreeBSD.org> |
Use the correct address when creating pci resources
When the PCI and CPU physical addresses are identical it doesn't matter which is used to create the resources, however on some systems, e.g. qemu
Use the correct address when creating pci resources
When the PCI and CPU physical addresses are identical it doesn't matter which is used to create the resources, however on some systems, e.g. qemu armv7 virt, they are different. This leads to a panic as we try to map the wrong physical address into the kernel address space.
Reported by: Jenkins via trasz Sponsored by: Innovate UK
show more ...
|
#
c794cdc0 |
| 18-Jun-2020 |
Andrew Turner <andrew@FreeBSD.org> |
Stop assuming we can print rman_res_t with %lx
This is not the case on armv6 and armv7, where we also build this driver. Fix by casting through uintmax_t and using %jx.
Sponsored by: Innovate UK
|
#
9a7053ce |
| 17-Jun-2020 |
Andrew Turner <andrew@FreeBSD.org> |
Clean up the pci host generic driver
- Support Prefetchable Memory. - Use the correct rman when allocating memory and ioports. - Translate PCI addresses in bus_alloc_resource to allow physical
Clean up the pci host generic driver
- Support Prefetchable Memory. - Use the correct rman when allocating memory and ioports. - Translate PCI addresses in bus_alloc_resource to allow physical addresses that are different than pci addresses.
Reviewed by: Robert Crowston <crowston_protonmail.com> Sponsored by: Innovate UK Differential Revision: https://reviews.freebsd.org/D25121
show more ...
|
Revision tags: release/11.4.0 |
|
#
051669e8 |
| 25-Jan-2020 |
Dimitry Andric <dim@FreeBSD.org> |
Merge ^/head r356931 through r357118.
|
#
9a82a56b |
| 24-Jan-2020 |
Ruslan Bukin <br@FreeBSD.org> |
Move the ECAM macroses to the header file.
These will be used by other PCI root complex drivers.
Sponsored by: DARPA, AFRL
|
Revision tags: release/12.1.0 |
|
#
f993ed2f |
| 09-Sep-2019 |
Dimitry Andric <dim@FreeBSD.org> |
Merge ^/head r351732 through r352104.
|
#
aa91d4b3 |
| 05-Sep-2019 |
Ed Maste <emaste@FreeBSD.org> |
pcie: return an error if a matching resource is not found
Submitted by: markj Reviewed by: manu Event: vBSDCon FreeBSD hackathon Sponsored by: The FreeBSD Foundation Differential Revision: https://
pcie: return an error if a matching resource is not found
Submitted by: markj Reviewed by: manu Event: vBSDCon FreeBSD hackathon Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D20884
show more ...
|
Revision tags: release/11.3.0 |
|
#
0269ae4c |
| 06-Jun-2019 |
Alan Somers <asomers@FreeBSD.org> |
MFHead @348740
Sponsored by: The FreeBSD Foundation
|
#
ec55b6c5 |
| 17-May-2019 |
Emmanuel Vadot <manu@FreeBSD.org> |
pci: ecam: Correctly parse memory and IO region
When activating a resource do not compare the resource id to the adress. Treat IO region as MEMORY region too.
Submitted by: Tuan Phan <tphan@amperec
pci: ecam: Correctly parse memory and IO region
When activating a resource do not compare the resource id to the adress. Treat IO region as MEMORY region too.
Submitted by: Tuan Phan <tphan@amperecomputing.com> (Original Version) Sponsored by: Ampere Computing, LLC Differential Revision: https://reviews.freebsd.org/D20214
show more ...
|
Revision tags: release/12.0.0 |
|
#
3d5db455 |
| 24-Nov-2018 |
Dimitry Andric <dim@FreeBSD.org> |
Merge ^/head r340427 through r340868.
|
#
bd158cdd |
| 19-Nov-2018 |
Jayachandran C. <jchandra@FreeBSD.org> |
pci_host_generic : move activate/release to generic code
Now that the ACPI and FDT implementations for activating and deactivating resources are the same, we can move it to pci_host_generic.c. No f
pci_host_generic : move activate/release to generic code
Now that the ACPI and FDT implementations for activating and deactivating resources are the same, we can move it to pci_host_generic.c. No functional changes.
Reviewed by: andrew Differential Revision: https://reviews.freebsd.org/D17793
show more ...
|
#
f916d057 |
| 19-Nov-2018 |
Jayachandran C. <jchandra@FreeBSD.org> |
pci_host_generic, acpi_resource: drop unneeded code
Now that we are handling PCI resources in pci_host_generic_acpi.c, we don't need these change (made by r336129)
Reviewed by: andrew Differential
pci_host_generic, acpi_resource: drop unneeded code
Now that we are handling PCI resources in pci_host_generic_acpi.c, we don't need these change (made by r336129)
Reviewed by: andrew Differential Revision: https://reviews.freebsd.org/D17792
show more ...
|
#
697c57e5 |
| 19-Nov-2018 |
Jayachandran C. <jchandra@FreeBSD.org> |
pci_host_generic*: basic implementation of bus range
Both ACPI and FDT support bus ranges for pci host bridges. Update pci_host_generic*.[ch] with a default implementation to support this. This will
pci_host_generic*: basic implementation of bus range
Both ACPI and FDT support bus ranges for pci host bridges. Update pci_host_generic*.[ch] with a default implementation to support this. This will be used in the next set of changes for ACPI based host bridge. No functional changes in this commit.
Reviewed by: andrew Differential Revision: https://reviews.freebsd.org/D17657
show more ...
|