Comment #135 for bugzilla 237666 : a USB3-handling problem with a investigatory fix for a cortex-a72 context

Mark Millard marklmi at yahoo.com
Fri Sep 25 20:00:44 UTC 2020



On 2020-Sep-19, at 14:49, Robert Crowston <crowston at protonmail.com> wrote:

> . . .
> 
> My question, which may be irrelevant or misguided: The flags field in the dma tag has an option for specifying if the hardware is cache coherent (BUS_DMA_COHERENT). Does the UEFI-derived tag passed through to the xhci driver have this bit set?
> 
> . . .

This is answering in a different direction than the prior
reply to the overall material:

# acpidump -dt | grep -i _CCA
            Name (_CCA, Zero)  // _CCA: Cache Coherency Attribute
                Name (_CCA, Zero)  // _CCA: Cache Coherency Attribute
            Name (_CCA, Zero)  // _CCA: Cache Coherency Attribute
                Name (_CCA, Zero)  // _CCA: Cache Coherency Attribute
                Name (_CCA, Zero)  // _CCA: Cache Coherency Attribute
                Name (_CCA, Zero)  // _CCA: Cache Coherency Attribute
                Name (_CCA, Zero)  // _CCA: Cache Coherency Attribute
                Name (_CCA, Zero)  // _CCA: Cache Coherency Attribute
                Name (_CCA, Zero)  // _CCA: Cache Coherency Attribute
                Name (_CCA, Zero)  // _CCA: Cache Coherency Attribute
                Name (_CCA, Zero)  // _CCA: Cache Coherency Attribute
                Name (_CCA, Zero)  // _CCA: Cache Coherency Attribute
                Name (_CCA, Zero)  // _CCA: Cache Coherency Attribute
                Name (_CCA, Zero)  // _CCA: Cache Coherency Attribute
                Name (_CCA, Zero)  // _CCA: Cache Coherency Attribute
                Name (_CCA, Zero)  // _CCA: Cache Coherency Attribute
                Name (_CCA, Zero)  // _CCA: Cache Coherency Attribute
                Name (_CCA, Zero)  // _CCA: Cache Coherency Attribute
            Name (_CCA, Zero)  // _CCA: Cache Coherency Attribute
            Name (_CCA, Zero)  // _CCA: Cache Coherency Attribute

for a rpi4-uefi-devel v1.20 context. So it appears that code like:

	if (ACPI_FAILURE(acpi_GetInteger(handle, "_CCA", &coherent)))
		coherent = 0;

	if (bus_dma_tag_create(NULL, 1, 0,
		limits.lowaddr, BUS_SPACE_MAXADDR, NULL, NULL,
		BUS_SPACE_MAXSIZE, BUS_SPACE_UNRESTRICTED, BUS_SPACE_MAXSIZE,
		coherent ? BUS_DMA_COHERENT : 0, NULL, NULL,
		result) != 0)
		return (ENOMEM);

will always end up without BUS_DMA_COHERENT as things are currently
for uefi/ACPI based RPi4B booting.

===
Mark Millard
marklmi at yahoo.com
( dsl-only.net went
away in early 2018-Mar)



More information about the freebsd-arm mailing list