在线咨询
eetop公众号 创芯大讲堂 创芯人才网
切换到宽版

EETOP 创芯网论坛 (原名:电子顶级开发网)

手机号码,快捷登录

手机号码,快捷登录

找回密码

  登录   注册  

快捷导航
搜帖子
芯片精品文章合集(500篇!)    创芯人才网--重磅上线啦!
查看: 3048|回复: 0

请教:PCI到cpu的地址映射问题!

[复制链接]
发表于 2008-12-31 14:09:55 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?注册

x
下面是bsp包里的配置文件,谁能帮忙解释一下pci的空间是怎么映射到系统空间的?
谢谢!


#ifdef  INCLUDE_PCI
#define INCLUDE_PCI_AUTOCONF
/*
cpu Addr     PCI Addr
PCI_LOCAL_MEM_BUS ------------------------- PCI_MSTR_MEM_BUS
   -          -
         -          -
PCI_LOCAL_MEM_BUS + ------------------------- PCI_MSTR_MEM_BUS +
PCI_LOCAL_MEM_SIZE ----IMMR               - PCI_MSTR_MEM_SIZE
         -          -
          -          -----PIMMR
          -          -
          -          -
CPU_PCI_MEM_ADRS ------------------------- PCI_MEM_ADRS
                 -   -
         -   -
CPU_PCI_MEMIO_ADRS ------------------------- PCI_MEMIO_ADRS
                -   -
          -          -
CPU_PCI_IO_ADRS  ------------------------- PCI_IO_ADRS
          -          -
          -         -
CPU_PCI_IO_ADRS + ------------------------- PCI_IO_ADRS +
CPU_PCI_IO_SIZE  -        - PCI_IO_SIZE
          -        -
          -        -
          -        -
          -------------------------- 4GBytes
*/

/* for custom sysPciAutoConfig.c */

/* PCI based addresses */
#define PCI_MEM_ADRS  0x50000000
#define PCI_MEM_SIZE  0x01000000   /*16MB */
#define PCI_MEM_SIZE_MASK PCI_SIZE_MASK_16M /* This should match PCI_MEM_SIZE */
#define PCI_MEMIO_ADRS  0x60000000
#define PCI_MEMIO_SIZE  0x01000000   /*16MB */
#define PCI_MEMIO_SIZE_MASK PCI_SIZE_MASK_16M /* This should match PCI_MEMIO_SIZE */
#define PCI_IO_ADRS 0x70000000
#define PCI_IO_SIZE 0x00100000 /* IO Space is not available */

/* CPU based addresses */
#define CPU_PCI_MEM_ADRS  0x80000000
#define CPU_PCI_MEM_SIZE  PCI_MEM_SIZE
#define CPU_PCI_MEMIO_ADRS  0x90000000
#define CPU_PCI_MEMIO_SIZE  PCI_MEMIO_SIZE
#define CPU_PCI_IO_ADRS   0xa0000000
#define CPU_PCI_IO_SIZE   PCI_IO_SIZE

/* CPU from PCI bus */
#define PCI_MSTR_MEM_BUS  0x00000000
#define PCI_MSTR_MEM_SIZE  PCI_LOCAL_MEM_SIZE
#define PCI_BRIDGE_PIMMR_BASE_ADRS      0x40000000

/* CPU Address that is visible from PCI */
#define PCI_LOCAL_MEM_BUS LOCAL_MEM_LOCAL_ADRS
#define PCI_LOCAL_MEM_SIZE LOCAL_MEM_SIZE
/* This should match LOCAL_MEM_SIZE - if not statically defined buffers
   need to be used for PCI devices */
#define PCI_MSTR_MEM_SIZE_MASK PCI_SIZE_MASK_64M
#ifndef PCI_CFG_TYPE
# ifdef INCLUDE_PCI_AUTOCONF
#  define PCI_CFG_TYPE PCI_CFG_AUTO
# else
#  define PCI_CFG_TYPE PCI_CFG_FORCE
# endif /* INCLUDE_PCI_AUTOCONF */
#endif /* PCI_CFG_TYPE */
#endif /* INCLUDE_PCI */
您需要登录后才可以回帖 登录 | 注册

本版积分规则

关闭

站长推荐 上一条 /2 下一条

小黑屋| 关于我们| 联系我们| 在线咨询| 隐私声明| EETOP 创芯网
( 京ICP备:10050787号 京公网安备:11010502037710 )

GMT+8, 2024-5-12 15:01 , Processed in 0.017841 second(s), 8 queries , Gzip On, Redis On.

eetop公众号 创芯大讲堂 创芯人才网
快速回复 返回顶部 返回列表