VPU memory description structure from vpu_io.h

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

VPU memory description structure from vpu_io.h

跳至解决方案
2,103 次查看
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,798 次查看
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,799 次查看
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,798 次查看
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,798 次查看
igorpadykov
NXP Employee
NXP Employee

you are right, in application one should use virtual address

~igor

0 项奖励
回复