请教一个io_p2v io_v2p的地址转换问题

51 views
Skip to first unread message

. dyron

unread,
Nov 7, 2012, 6:44:30 AM11/7/12
to linux...@googlegroups.com, linux-kernel
hi, all:

       在网上查了些资料, 得知 io_p2v 里的0xa0000000, 是由VIO_BASE - PIO_START得出的,
  但是如果自己设计芯片地址的话, 这个PIO_START可以从手册中得知, 但是VIO_BASE是如何算出来的呢?
  

#define VIO_BASE  0xe8000000 /* virtual start of IO space */
#define PIO_START  0x48000000 /* physical start of IO space */

#define io_p2v(x) ((x) | 0xa0000000)

chengdong diao

unread,
Nov 7, 2012, 7:21:49 AM11/7/12
to linux...@googlegroups.com, linux-kernel
应该是自己定的吧。根据内存的布局。



--
_______________________________________________
Linux设备驱动开发邮件列表 linux...@googlegroups.com
http://groups.google.gr/group/linuxdriver?hl=zh-CN
退订请使用原订阅邮箱发邮件至:linuxdriver...@googlegroups.com

. dyron

unread,
Nov 7, 2012, 8:08:13 PM11/7/12
to linux...@googlegroups.com, linux-kernel
这个根据内存布局定的, 也是有依据的吧, 根据什么依据呢? 还请指教!

chengdong diao

unread,
Nov 7, 2012, 9:07:31 PM11/7/12
to linux...@googlegroups.com, linux-kernel
这个我也不清楚,没有做过这部分。

. dyron

unread,
Nov 8, 2012, 12:48:38 AM11/8/12
to linux...@googlegroups.com, linux-kernel
还是谢谢你, 大家有知道的吗, 请帮忙解答一下。 谢谢。

James W.

unread,
Nov 27, 2012, 3:29:45 AM11/27/12
to linux...@googlegroups.com, linux-kernel
because 0xe0000000 is kernel space .


2012/11/27 James W. <wjn...@gmail.com>
by yourself,





2012/11/7 . dyron <dyron...@gmail.com>

. dyron

unread,
Nov 27, 2012, 5:21:52 AM11/27/12
to linux...@googlegroups.com, linux-kernel
hi;

      kernel space 有很多地方, 为什么单单选择0xe0000000
Reply all
Reply to author
Forward
0 new messages