[RTEMS Project] #4243: rtems_cache_coherent_allocate fallback is to return heap memory

RTEMS trac trac at rtems.org
Sat Feb 13 06:22:28 UTC 2021


#4243: rtems_cache_coherent_allocate fallback is to return heap memory
--------------------------+--------------------
  Reporter:  Chris Johns  |      Owner:  (none)
      Type:  defect       |     Status:  new
  Priority:  normal       |  Milestone:  6.1
 Component:  lib          |    Version:  6
  Severity:  normal       |   Keywords:
Blocked By:               |   Blocking:
--------------------------+--------------------
 The `rtems_cache_coherent_allocate()` call in `libcsupport` uses the
 `malloc` heap if a BSP has not added any cache coherent memory to its
 local specialised heap. As a result memory may or may not be cache
 coherent.

 A call to return cache coherent memory should do so or fail so it is clear
 what is failing and why.

 I do not understand why the call is falling back to memory that is not
 coherent?

 These links explain my position ...

 https://git.rtems.org/rtems/tree/cpukit/libcsupport/src/cachecoherentalloc.c#n48
 https://git.rtems.org/rtems-libbsd/tree/rtemsbsd/rtems/rtems-kernel-bus-
 dma.c#n244

 The FreeBSD flag `BUS_DMA_COHERENT` could be redefined as
 `BUS_DMA_COHERENT_MAYBE`.

--
Ticket URL: <http://devel.rtems.org/ticket/4243>
RTEMS Project <http://www.rtems.org/>
RTEMS Project


More information about the bugs mailing list