Differences in RT_HEAP_INFO struct between Xenomai2.4/2.5
Quoted 2 lines · Rus V. Brushkoff
Trying to backport Xenomai app from 2.5 to 2.4 noticed that
rt_heap_infostruct has nophys_addrfield. Is this interface
difference
Quoted 1 line
supposed to exist ?
At the cost of ABI disruption, you may backport the phys_addr field support with the attached patch.
Signature · 1 line
Stephane
native/heap.h +2 -0
@@ -53,6 +53,8 @@ typedef struct rt_heap_info {char name[XNOBJECT_NAME_LEN ];/* !< Symbolic name. */ +unsigned long phys_addr;/* !< Physical address. */ + }RT_HEAP_INFO ; typedef struct rt_heap_placeholder {
skins/native/heap.c +3 -2
@@ -202,8 +202,8 @@ static void __heap_flush_private(xnheap_* * - H_DMA causes the block pool associated to the heap to be * allocated in physically contiguous memory, suitable for DMA -* operations with I/O devices. @a heapsize beyond 128KiB will -* be rounded up to a two expononent allocation. +* operations with I/O devices. The physical address of the +* heap can be obtained through a call to rt_heap_inquire(). * * - H_NONCACHED causes the heap not to be cached. This is necessary on * platforms such as ARM to share a heap between kernel and user-space.
@@ -751,6 +751,7 @@ int rt_heap_inquire(RT_HEAP *heap, RT_HE info->usablemem =xnheap_usable_mem (&heap->heap_base); info->usedmem =xnheap_used_mem (&heap->heap_base); info->mode = heap->mode; + info->phys_addr = (heap->mode &H_SINGLE ) ?virt_to_phys (heap->sba):0 ; unlock_and_exit:
On Thu, 3 Sep 2009, Fillod Stephane wrote:
:> Trying to backport Xenomai app from 2.5 to 2.4 noticed that
:> rt_heap_info struct has no phys_addr field. Is this interface :difference
:> supposed to exist ?
:At the cost of ABI disruption, you may backport the phys_addr field :support with the attached patch.
Thanks, I was interested in fact that such ABI difference will exist
forever.
Rus