From 84ae1cff969c3ee72661ca85cf4ea2d23d9ac7ea Mon Sep 17 00:00:00 2001 From: Arthur Hanson Rasmusson Date: Thu, 1 Oct 2026 07:40:07 -0400 Subject: gsp-phys: FWSEC failure diagnostics (falcon scratch/mailbox, DMEM/IMEM readback) --- kernel/gsp_phys_gpu.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'kernel/gsp_phys_gpu.c') 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); -- cgit v1.2.3