This is what I intend to commit. Changed to D16719 are that I moved pci_early_quirks.* to amd64/pci, moved the function prototype to amd64 machine/md_var.h, added printf() to show results of quirks under bootverbose, and did some additional minor style adjustments.
If you are fine with these last editings, confirm and I will commit the patch.