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

Mark Millard via freebsd-arm <[email protected]>
Newsgroups gmane.os.freebsd.devel.arm
Message-ID <[email protected]>

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)

_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-arm
To unsubscribe, send any mail to "[email protected]"
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.