Page MenuHomeFreeBSD

Add a PCI driver that follows the Arm DEN0115 spec
ClosedPublic

Authored by andrew on Mar 23 2023, 9:57 AM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Mar 13, 2:59 PM
Unknown Object (File)
Jan 26 2024, 12:56 AM
Unknown Object (File)
Dec 27 2023, 6:39 PM
Unknown Object (File)
Dec 23 2023, 9:19 AM
Unknown Object (File)
Dec 12 2023, 10:00 PM
Unknown Object (File)
Nov 6 2023, 6:42 AM
Unknown Object (File)
Oct 5 2023, 5:27 AM
Unknown Object (File)
Sep 6 2023, 8:24 AM

Details

Summary

Add a n attachment to the pci_host_generic driver for the Arm DEN0115
PCI Configuration Space Access Firmware Interface [1]. This can be used
when PCI controllers need to implement quirks in the PCI root bus.
To handle this the firmware implements a SMCCC interface the driver can
use to read and write the configuration register.

This has been tested on a Raspberry Pi 4 booting with EDK2.

[1] https://developer.arm.com/documentation/den0115/latest

Sponsored by: Arm Ltd

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

This revision was not accepted when it landed; it landed in state Needs Review.Apr 24 2023, 11:35 AM
This revision was automatically updated to reflect the committed changes.
markmi_dsl-only.net added inline comments.
sys/dev/pci/pci_host_generic_den0115.c
87

The comment's reference to >= v1.1 ("at least") vs. the code's check for v1.0 seem mismatched:

. . . ||
(SMCCC_VERSION_MAJOR(smccc_version) == 1 &&
	     SMCCC_VERSION_MINOR(smccc_version) == 0)

As a matter of curiosity, did something specific prompt having this form of PCI Configuration Space Access added? FreeBSD has been able to boot the RPi4B's for a long time, even via EDK2. So the test case does not seem to be a driving use case. Are there other known examples of this form of PCI Configuration Space Access needing-to-be/being-able-to-be used?