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
Unknown Object (File)
Fri, Dec 13, 3:18 AM
Unknown Object (File)
Wed, Nov 20, 9:02 AM
Unknown Object (File)
Oct 27 2024, 9:53 PM
Unknown Object (File)
Oct 25 2024, 2:25 AM
Unknown Object (File)
Sep 21 2024, 4:47 AM
Unknown Object (File)
Sep 5 2024, 5:03 PM
Unknown Object (File)
Sep 5 2024, 4:04 PM
Unknown Object (File)
Sep 5 2024, 3:48 AM
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.