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
F134810411: D39228.id.diff
Tue, Nov 4, 6:08 PM
F134810361: D39228.id120922.diff
Tue, Nov 4, 6:08 PM
F134810354: D39228.id119320.diff
Tue, Nov 4, 6:08 PM
F134810215: D39228.diff
Tue, Nov 4, 6:07 PM
Unknown Object (File)
Mon, Oct 27, 5:08 PM
Unknown Object (File)
Mon, Oct 27, 12:20 PM
Unknown Object (File)
Sat, Oct 25, 11:06 PM
Unknown Object (File)
Sat, Oct 25, 11:00 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?