Commit Graph

4 Commits

Author SHA1 Message Date
Lephe 03ef59521c
dma: add support for standard DMA access to SPU memory
* Mark SPU memory as sleep-blocking.
* Perform 4-byte accesses only in dma_memset() and dma_memcpy() (32-byte
  accesses freeze as one would expect).

This change does *NOT* implement support for SPU's integrated DMAC.
2021-06-17 14:32:27 +02:00
Lephe acc35d774f
dma: add an asynchronous API
This change adds asynchronous capabilities to the DMA API. Previously,
transfers would start asynchronously but could only be completed by a
call to dma_transfer_wait(). The API now supports a callback, as well
as the dma_transfer_sync() variant, to be consistent with the upcoming
USB API that has both _sync and _async versions of functions.

The interrupt handler of the DMA was changed to include a return to
userland, which is required to perform the callback.

* dma_transfer() is now an obsolete synonym for dma_transfer_async()
  with no callback.
* dma_transfer_noint() is now a synonym for dma_transfer_atomic(), for
  consistency with the upcoming USB API.
2021-05-12 09:17:24 +02:00
Lephe 74b2dbeb36
string: use __restrict instead of restrict for C++ compatibility 2021-04-27 14:48:34 +02:00
Lephe fc7aab6eba
dma: finalize dma_memset() and dma_memcpy()
Adds support for dma_memcpy(), and uses a proper ILRAM allocation scheme
(static linking here) for the temporary buffer in dma_memset().
2019-09-15 19:30:57 +02:00