summaryrefslogtreecommitdiffstats
path: root/kernel/gsp_phys_gpu.c
diff options
context:
space:
mode:
authorArthur Hanson Rasmusson <arthur@vgpu.io>2026-10-01 07:40:07 -0400
committerArthur Hanson Rasmusson <arthur@vgpu.io>2026-10-01 07:40:07 -0400
commit84ae1cff969c3ee72661ca85cf4ea2d23d9ac7ea (patch)
tree9b83acb354e4cd53a4453ec948d44e89de117cd8 /kernel/gsp_phys_gpu.c
parent9bf53de2719784b62fa99cb0d954841f672b433e (diff)
downloadopen-iov-84ae1cff969c3ee72661ca85cf4ea2d23d9ac7ea.tar.gz
open-iov-84ae1cff969c3ee72661ca85cf4ea2d23d9ac7ea.zip
gsp-phys: FWSEC failure diagnostics (falcon scratch/mailbox, DMEM/IMEM readback)
Diffstat (limited to 'kernel/gsp_phys_gpu.c')
-rw-r--r--kernel/gsp_phys_gpu.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/kernel/gsp_phys_gpu.c b/kernel/gsp_phys_gpu.c
index 9726b84..0936cf4 100644
--- a/kernel/gsp_phys_gpu.c
+++ b/kernel/gsp_phys_gpu.c
@@ -356,6 +356,7 @@ static void gsp_phys_dump_falcon(void)
static int gsp_phys_probe(struct pci_dev *pdev, const struct pci_device_id *id)
{
u32 boot0, boot1;
+ u16 pci_cmd = 0;
int ret;
pr_info("gsp-phys: probe %s\n", pci_name(pdev));
@@ -367,6 +368,20 @@ static int gsp_phys_probe(struct pci_dev *pdev, const struct pci_device_id *id)
}
phys.enabled = true;
+ /*
+ * Read-only observability for the host->GPU DMA path: the previous
+ * driver's remove clears PCI_COMMAND_MASTER and this probe does not
+ * set it (no pci_set_master here on purpose yet), so any GPU-initiated
+ * sysmem DMA (the FWSEC generic-BL code/data fetch) would never
+ * complete. Log the command register at claim so the state is
+ * provable from the cycle log.
+ */
+ pci_read_config_word(pdev, PCI_COMMAND, &pci_cmd);
+ pr_info("gsp-phys: claim PCI_COMMAND=0x%04x [bus_master=%s mem=%s io=%s] dev->is_busmaster=%u\n",
+ pci_cmd, pci_cmd & PCI_COMMAND_MASTER ? "on" : "OFF",
+ pci_cmd & PCI_COMMAND_MEMORY ? "on" : "off",
+ pci_cmd & PCI_COMMAND_IO ? "on" : "off", pdev->is_busmaster);
+
ret = pci_request_regions(pdev, "open-iov-gsp-phys");
if (ret) {
pr_err("gsp-phys: pci_request_regions failed: %d\n", ret);