mirror of
https://git.rtems.org/rtems-libbsd/
synced 2025-05-13 05:54:34 +08:00
busdma: Don't sync nocache memory on ARM
The busdma shouldn't try to flush or invalidate cache in a nocache area.
This commit is contained in:
parent
36b588eb8b
commit
beaacb5c30
@ -48,6 +48,8 @@
|
||||
#include <machine/rtems-bsd-kernel-space.h>
|
||||
#include <machine/rtems-bsd-cache.h>
|
||||
#include <machine/rtems-bsd-bus-dma.h>
|
||||
#include <bsp.h>
|
||||
#include <bsp/linker-symbols.h>
|
||||
|
||||
#include <rtems/malloc.h>
|
||||
|
||||
@ -400,6 +402,12 @@ bus_dmamap_sync(bus_dma_tag_t dmat, bus_dmamap_t map, bus_dmasync_op_t op)
|
||||
uintptr_t size = map->buffer_size;
|
||||
uintptr_t begin = (uintptr_t) map->buffer_begin;
|
||||
uintptr_t end = begin + size;
|
||||
#ifdef __arm__
|
||||
if (begin >= (uintptr_t)bsp_section_nocache_begin &&
|
||||
end <= (uintptr_t)bsp_section_nocachenoload_end) {
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
if ((map->flags & DMAMAP_CACHE_ALIGNED) != 0) {
|
||||
begin &= ~CLMASK;
|
||||
|
Loading…
x
Reference in New Issue
Block a user