aboutsummaryrefslogtreecommitdiffstats
path: root/src/include/ipxe/elf.h
diff options
context:
space:
mode:
authorMichael Brown <mcb30@ipxe.org>2021-11-12 15:57:51 +0000
committerMichael Brown <mcb30@ipxe.org>2021-11-12 15:57:51 +0000
commiteff6a07aa2d681b21609a9c58c555a5d62db865a (patch)
tree502765d9cc5f64412e3322976f223e9e1a93cd84 /src/include/ipxe/elf.h
parent1844aacc837bf81cb1959fa65f2e52dcc70a0cae (diff)
downloadipxe-thunderbolt_workaround.tar.gz
[xhci] Avoid DMA during shutdown if firmware has disabled bus masteringthunderbolt_workaround
On some systems (observed with the Thunderbolt ports on a ThinkPad X1 Extreme Gen3 and a ThinkPad P53), the system firmware will disable bus mastering on the xHCI controller and all PCI bridges at the point that ExitBootServices() is called if the IOMMU is enabled. This leaves the xHCI controller unable to shut down cleanly since all commands will fail with a timeout. Commit 85eb961 ("[xhci] Allow for permanent failure of the command mechanism") allows us to detect that this has happened and respond cleanly. However, some unidentified hardware component (either the xHCI controller or one of the PCI bridges) seems to manage to enqueue the attempted DMA operation and eventually complete it after the operating system kernel has reenabled bus mastering. This results in a DMA operation to an area of memory that the hardware is no longer permitted to access. On Windows with the Driver Verifier enabled, this will result in a STOP 0xE6 (DRIVER_VERIFIER_DMA_VIOLATION). Work around this problem by detecting when bus mastering has been disabled, and immediately failing the device to avoid initiating any further DMA attempts. Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/include/ipxe/elf.h')
0 files changed, 0 insertions, 0 deletions