Page MenuHomeFreeBSD

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

Authored by andrew on Nov 19 2020, 11:08 AM.

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
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; 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.