1
0
mirror of https://git.FreeBSD.org/src.git synced 2025-01-02 12:20:51 +00:00

arm: switch the BUSDMA buffers to normal uncached memory

The BUSDMA buffer is treated as normal memory during compilation and compiler
is free to inline/optimize basic functions (i.e. memset, memcpy) accessing
buffers, including when an instruction is generated that performs a word
access to unaligned data. We support this, but only if the buffer in question
is mapped as normal memory (cached or not), but not to memory mapped as
strongly ordered or device type.

MFC after:	1 month
Differential Revision:	https://reviews.freebsd.org/D47485
This commit is contained in:
Michal Meloun 2024-11-08 13:00:57 +01:00
parent 114080d199
commit 248109448f

View File

@ -36,7 +36,7 @@
#define VM_MEMATTR_WRITE_THROUGH ((vm_memattr_t)4)
#define VM_MEMATTR_DEFAULT VM_MEMATTR_WB_WA
#define VM_MEMATTR_UNCACHEABLE VM_MEMATTR_SO /* misused by DMA */
#define VM_MEMATTR_UNCACHEABLE VM_MEMATTR_NOCACHE /* used by BUSDMA */
#ifdef _KERNEL
/* Don't export aliased VM_MEMATTR to userland */
#define VM_MEMATTR_WRITE_COMBINING VM_MEMATTR_WRITE_THROUGH /* for DRM */