VPU memory description structure from vpu_io.h

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

VPU memory description structure from vpu_io.h

ソリューションへジャンプ
2,094件の閲覧回数
thalex
Contributor I

Hello,

I am using i.MX6 VPU for some video processing applications running under Linux.

Here is an extract from vpu_io.h :

typedef struct vpu_mem_desc {

  int size; /*!requested memory size */

  unsigned long phy_addr; /*!physical memory address allocated */

  unsigned long cpu_addr; /*!cpu addr for system free usage */

  unsigned long virt_uaddr; /*!virtual user space address */

} vpu_mem_desc;

I would like to know what exactly is cpu_addr, when and by whom it is used.

Where should i localize it in the management system described here: ARM® Developer Suite Developer Guide 7.5.1. Virtual to physical address mapping (Are phy_addr and virt_uaddr corresponding to virtual memory and physical memory addresses this document is referring to?)

Is cpu_addr would be used in a bare metal system, with no OS?

I hope my question is clear enough...

Alex

ラベル(2)
0 件の賞賛
返信
1 解決策
1,789件の閲覧回数
igorpadykov
NXP Employee
NXP Employee

HI Alex

vpu example with no OS one can find in SDK, it also has vpu_io.h:

phy_addr;     /*!physical memory address allocated */
virt_addr;   /*!virtual user space address */

cpu_addr is not used

Software Development Kits (3)

i.MX 6Series Platform SDK (REV 1.1)

SABRE Board Reference Design|Freescale

Best regards

igor

-----------------------------------------------------------------------------------------------------------------------

Note: If this post answers your question, please click the Correct Answer button. Thank you!

-----------------------------------------------------------------------------------------------------------------------

元の投稿で解決策を見る

0 件の賞賛
返信
3 返答(返信)
1,790件の閲覧回数
igorpadykov
NXP Employee
NXP Employee

HI Alex

vpu example with no OS one can find in SDK, it also has vpu_io.h:

phy_addr;     /*!physical memory address allocated */
virt_addr;   /*!virtual user space address */

cpu_addr is not used

Software Development Kits (3)

i.MX 6Series Platform SDK (REV 1.1)

SABRE Board Reference Design|Freescale

Best regards

igor

-----------------------------------------------------------------------------------------------------------------------

Note: If this post answers your question, please click the Correct Answer button. Thank you!

-----------------------------------------------------------------------------------------------------------------------

0 件の賞賛
返信
1,789件の閲覧回数
thalex
Contributor I

Thank you for this answer. I'm not planning to use my system with no OS and just wanted to understand what exactly this address is doing.

So, if I get it right, cpu_addr is only used by the OS and included in vpu_io.h for some rare case since we shouldn't deal with the Operating System memory management. On the other hand, (in a lower level,) there is the ARM Memory Management Unit (MMU) that handle the virtual to physical address mapping with phy_addr and virt_uaddr (equivalent to phy_addr and virt_addr when no OS are involved)? The proper way for the user would be to only use the virtual address (whence virt_addr -> virt_uaddr)?

0 件の賞賛
返信
1,789件の閲覧回数
igorpadykov
NXP Employee
NXP Employee

you are right, in application one should use virtual address

~igor

0 件の賞賛
返信