)]}'
{
  "commit": "2fa08affe9a1a1422766f54b2fb045234b571f06",
  "tree": "ac5b40b3d0541d0a40e562eb206e43eca3e17f72",
  "parents": [
    "fe159d0910cac1cd49bab8d4b9296dbe2d9d3cc2"
  ],
  "author": {
    "name": "Michael Brown",
    "email": "mcb30@ipxe.org",
    "time": "Tue Oct 20 12:34:39 2026 +0100"
  },
  "committer": {
    "name": "Michael Brown",
    "email": "mcb30@ipxe.org",
    "time": "Tue Oct 20 12:34:39 2026 +0100"
  },
  "message": "[pci] Check device presence before checking for multi-function device\n\nThere are two checks that we perform to see whether a PCI device\nexists at a given bus:dev.fn address.  We check to see if the vendor\nand device IDs read as either all-zeros or all-ones, and for a\nnon-zero function number we also check that the device is actually a\nmulti-function device by reading the header type from the device\u0027s\nfunction zero.\n\nFor historical reasons, the multi-function header type check is\ncurrently performed before the existence check.  (The code originally\nsupported only a one-time linear enumeration of the PCI bus, and so\nthe header type for function zero was already known: checking the\nheader type first therefore used to allow the read of the vendor and\ndevice IDs to be elided completely.)\n\nOn some UEFI systems (observed on an AWS a1.metal instance in\neu-central-1), attempting to read the vendor and device IDs for a\nnon-existent device will work as expected, but attempting to read the\nheader type will lock up the system.  (No further diagnostics are\navailable: the a1.metal instance type has no serial port and does not\nsupport taking a screenshot, and so the only available output is from\nthe iPXE disk log console.)\n\nWork around this curious defect by swapping the order of the existence\nand header type checks.\n\nSigned-off-by: Michael Brown \u003cmcb30@ipxe.org\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "9e47dd93ca2dd4e51a8bb13a64013894181887f1",
      "old_mode": 33188,
      "old_path": "src/drivers/bus/pci.c",
      "new_id": "013b5014f06bc4e7c9154e85fbf81e791485bbf6",
      "new_mode": 33188,
      "new_path": "src/drivers/bus/pci.c"
    }
  ]
}
