Page MenuHomeFreeBSD

Only set the PCI bus end when we are reducing it
ClosedPublic

Authored by andrew on Nov 19 2020, 11:08 AM.
Tags
None
Referenced Files
F81652754: D27274.id.diff
Fri, Apr 19, 12:16 PM
Unknown Object (File)
Fri, Apr 12, 1:26 PM
Unknown Object (File)
Thu, Mar 28, 11:53 AM
Unknown Object (File)
Mar 12 2024, 1:41 PM
Unknown Object (File)
Feb 24 2024, 8:13 AM
Unknown Object (File)
Feb 24 2024, 8:00 AM
Unknown Object (File)
Feb 20 2024, 10:00 PM
Unknown Object (File)
Feb 9 2024, 6:33 PM
Subscribers

Details

Summary

We read the bus end value from the _CRS method. On some systems we need
to further limit it based on the MCFG table.

Support this by setting a default value, then update it if needed in the
_CRS table, and finally reduce it if it is past the end of the MCFG tabel.
This will allow for both systems that use either method to encode this
value.

This partially reverts r347929, removing the error printf.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

andrew created this revision.

Based on my reading of the ACPI tables I expect this will work on eMAG and the Huawei Taishan, however I don't have access to either to test.

I don't have access to an eMAG system anymore.
Also review this would mean that I have to re-read all the ecam code and the ACPI spec. which I really don't want to do tbh.

Load success

root@huawei:~ # uname -a
FreeBSD huawei.aarch64.local 13.0-CURRENT FreeBSD 13.0-CURRENT #0 r367851M: Thu Nov 19 20:07:57 UTC 2020     root@fclean.local:/usr/obj/usr/src/arm64.aarch64/sys/GENERIC  arm64
root@huawei:~ # gpart show
=>     9  138577  cd0  MBR  (271M)
       9  138577       - free -  (271M)

=>     9  138577  iso9660/13_0_CURRENT_AARCH64_BO  MBR  (271M)
       9  138577                                   - free -  (271M)

=>         40  15628053088  da0  GPT  (7.3T)
           40  15628053088       - free -  (7.3T)

=>         40  15628053088  diskid/DISK-ZA1GYTNA  GPT  (7.3T)
           40  15628053088                        - free -  (7.3T)
philip added a subscriber: philip.

Tested on ampere1.nyi.freebsd.org and ampere2.nyi.freebsd.org. Both eMAG systems. They boot and PCIe still works.

This revision is now accepted and ready to land.Nov 29 2020, 3:48 PM
This revision was automatically updated to reflect the committed changes.