|
CardSight 0.1.0
C API reference for the CardSight firmware and application
|
Data cache maintenance for DMA. More...
#include <stddef.h>Go to the source code of this file.
Macros | |
| #define | CACHE_LINE_BYTES 64U |
| Size of one data cache line in bytes. | |
Functions | |
| void | dcache_clean_range (const void *address, size_t length) |
| Write the dirty lines of the range back to memory. | |
| void | dcache_invalidate_range (const void *address, size_t length) |
| Drop the cached copy of the range. | |
Data cache maintenance for DMA.
The C907 has the T-Head cache maintenance operations, which work on physical addresses; the range operations round outwards to whole cache lines.
| void dcache_clean_range | ( | const void * | address, |
| size_t | length ) |
Write the dirty lines of the range back to memory.
The start is rounded down and the end up to whole cache lines; the range is fenced before and after the T-Head clean operations.
| [in] | address | Physical start address of the range. |
| [in] | length | Length in bytes; zero does nothing. |
| void dcache_invalidate_range | ( | const void * | address, |
| size_t | length ) |
Drop the cached copy of the range.
Data written to memory by a device is read back on the next access. The range is rounded outwards to whole cache lines and fenced before and after the T-Head invalidate operations.
| [in] | address | Physical start address of the range. |
| [in] | length | Length in bytes; zero does nothing. |