Re: VL805 xHCI DMA read faults

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 16/10/2017 20:23, Robin Murphy wrote:
> On 16/10/17 12:54, Hao Wei Tee wrote:
>> On 12/10/2017 21:36, Mathias Nyman wrote:
>>> You could try booting with xhci_hcd.dyndbg=+p added to the kernel command line.
>>
>> I can't find anything relevant... Hmm.
> 
> Is your VL805 on the motherboard or an add-on card? One other possibly
> important difference that comes to mind is that on my arm64 system Linux
> is the only agent to ever touch the xHCI - UEFI doesn't even try to
> probe it. It seems likely that a full-featured PC firmware might have
> been more hands-on, especially if the controller is on-board.
> 
> It seems noteworthy that these RMRRs are within about 10MB of the
> faulting address...
> 
> ...and that correspondingly for this to be a Linux-allocated IOVA would
> mean over 540MB having been mapped for DMA already, which seems somewhat
> less likely than it being some leftover physical address from firmware.
> 
> Can you try instrumenting xhci_segment_alloc() to get an idea of what
> the actual DMA addresses of the various queues are at this point?
> 
> Robin
Sorry for taking so long, I got caught up with other stuff..

Anyway, I think you may be right about the addresses coming from UEFI. With the IOMMU
on, xhci_segment_alloc is never called (the DMA faults happen in very early xHCI init).

With the IOMMU off, the allocated segments look something like this:

xhci_segment_alloc() = (xhci_segment) {
    .dma = 0x00000002136b9000
    .bounce_dma = 0x0000000000000000
    .bounce_buf =           (null)
    .bounce_offs = 0
    .bounce_len = 0
}
xhci_segment_alloc() = (xhci_segment) {
    .dma = 0x00000002136bb000
    .bounce_dma = 0x0000000000000000
    .bounce_buf =           (null)
    .bounce_offs = 0
    .bounce_len = 0
}
xhci_segment_alloc() = (xhci_segment) {
    .dma = 0x000000021377e000
    .bounce_dma = 0x0000000000000000
    .bounce_buf =           (null)
    .bounce_offs = 0
    .bounce_len = 0
}
xhci_segment_alloc() = (xhci_segment) {
    .dma = 0x0000000213776000
    .bounce_dma = 0x0000000000000000
    .bounce_buf =           (null)
    .bounce_offs = 0
    .bounce_len = 0
}
xhci_segment_alloc() = (xhci_segment) {
    .dma = 0x00000002126ec000
    .bounce_dma = 0x0000000000000000
    .bounce_buf = ffff9887d4d91d30
    .bounce_offs = 0
    .bounce_len = 0
}
xhci_segment_alloc() = (xhci_segment) {
    .dma = 0x00000002126ed000
    .bounce_dma = 0x0000000000000000
    .bounce_buf = ffff9887d4d91140
    .bounce_offs = 0
    .bounce_len = 0
}

.. which is nowhere near the address the DMA faults occur at,
although I'm not sure if having the IOMMU on affects this (??).

Thanks.

-- 
Hao Wei
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux