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

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

手机号码,快捷登录

手机号码,快捷登录

找回密码

  登录   注册  

快捷导航
搜帖子
芯片精品文章合集(500篇!)    创芯人才网--重磅上线啦!
12
返回列表 发新帖
楼主: Sauce

MPC8272的上电起动过程解析(一)

[复制链接]
发表于 2010-3-31 23:16:49 | 显示全部楼层
你理解的可能有问题
我所说的启动地址,是通过HRCW配置的高低地址
是CPU初始化自动跳转的位置,0xfff000000 0x00000000两种选择
你说的0xfe000000应该是通过BR0和OR0配置的地址映射空间
也就是把Flash的地址以0xfe000000作为基地址进行映射吧?
发表于 2010-4-26 12:48:27 | 显示全部楼层
正看这方面的东西呢,学习。
发表于 2010-4-28 15:47:02 | 显示全部楼层
mark...
发表于 2010-4-28 17:08:44 | 显示全部楼层
看了下代码,根据硬件配置的地址应该是INTERNAL_MEM_MAP_ADDR,然后在rominit.s里面通过INTERNAL_MEM_MAP_ADDR配置BR、OR

/*
* Internal Memory Map base Address calculation
*
* If config.h has IMMAP_REMAP defined, then the internal mamory map
* is defined to be 0x04700000, as defined in the ADS8266-PCI manual.
*
* Otherwise the memory map is defined by the Hard Reset Configuration Word
* and must be determined by looking at bits 13:15 of the configuration word.
* Bits 13:15 are bits 5:7 of the second byte of the config word: HRCW_BYTE_1
*/

#if   ((HRCW_BYTE_1 & 0x07) == 0)
#        define        RST_INTERNAL_MEM_MAP_ADDR        0x00000000
#elif ((HRCW_BYTE_1 & 0x07) == 1)
#        define        RST_INTERNAL_MEM_MAP_ADDR        0x00F00000
#elif ((HRCW_BYTE_1 & 0x07) == 2)
#        define        RST_INTERNAL_MEM_MAP_ADDR        0x0F000000
#elif ((HRCW_BYTE_1 & 0x07) == 3)
#        define        RST_INTERNAL_MEM_MAP_ADDR        0x0FF00000
#elif ((HRCW_BYTE_1 & 0x07) == 4)
#        define        RST_INTERNAL_MEM_MAP_ADDR        0xF0000000
#elif ((HRCW_BYTE_1 & 0x07) == 5)
#        define        RST_INTERNAL_MEM_MAP_ADDR        0xF0F00000
#elif ((HRCW_BYTE_1 & 0x07) == 6)
#        define        RST_INTERNAL_MEM_MAP_ADDR        0xFF000000
#elif ((HRCW_BYTE_1 & 0x07) == 7)
#        define        RST_INTERNAL_MEM_MAP_ADDR        0xFFF00000
#endif

#if defined (IMMAP_REMAP)
#        define INTERNAL_MEM_MAP_ADDR        0x04700000        /* defined by bsp */
#else
#        define INTERNAL_MEM_MAP_ADDR        RST_INTERNAL_MEM_MAP_ADDR
#endif




        /* load the base register 0 */
        lis                r5, HIADJ (ROM_BASE_ADRS | 0x00000801)
        addi        r5,        r5, LO (ROM_BASE_ADRS | 0x00000801)
        lis         r6, HIADJ (M8260_BR0 (INTERNAL_MEM_MAP_ADDR))
        addi        r6,        r6, LO (M8260_BR0 (INTERNAL_MEM_MAP_ADDR))
       
        /* load the option register 0 */
        stw         r5, 0(r6)
发表于 2010-4-28 17:13:48 | 显示全部楼层
看了下代码,根据硬件配置的地址应该是INTERNAL_MEM_MAP_ADDR,然后在rominit.s里面通过INTERNAL_MEM_MAP_ADDR配置BR、OR

/*
* Internal Memory Map base Address calculation
*
* If config.h has IMMAP_REMAP defined, then the internal mamory map
* is defined to be 0x04700000, as defined in the ADS8266-PCI manual.
*
* Otherwise the memory map is defined by the Hard Reset Configuration Word
* and must be determined by looking at bits 13:15 of the configuration word.
* Bits 13:15 are bits 5:7 of the second byte of the config word: HRCW_BYTE_1
*/

#if   ((HRCW_BYTE_1 & 0x07) == 0)
#        define        RST_INTERNAL_MEM_MAP_ADDR        0x00000000
#elif ((HRCW_BYTE_1 & 0x07) == 1)
#        define        RST_INTERNAL_MEM_MAP_ADDR        0x00F00000
#elif ((HRCW_BYTE_1 & 0x07) == 2)
#        define        RST_INTERNAL_MEM_MAP_ADDR        0x0F000000
#elif ((HRCW_BYTE_1 & 0x07) == 3)
#        define        RST_INTERNAL_MEM_MAP_ADDR        0x0FF00000
#elif ((HRCW_BYTE_1 & 0x07) == 4)
#        define        RST_INTERNAL_MEM_MAP_ADDR        0xF0000000
#elif ((HRCW_BYTE_1 & 0x07) == 5)
#        define        RST_INTERNAL_MEM_MAP_ADDR        0xF0F00000
#elif ((HRCW_BYTE_1 & 0x07) == 6)
#        define        RST_INTERNAL_MEM_MAP_ADDR        0xFF000000
#elif ((HRCW_BYTE_1 & 0x07) == 7)
#        define        RST_INTERNAL_MEM_MAP_ADDR        0xFFF00000
#endif

#if defined (IMMAP_REMAP)
#        define INTERNAL_MEM_MAP_ADDR        0x04700000        /* defined by bsp */
#else
#        define INTERNAL_MEM_MAP_ADDR        RST_INTERNAL_MEM_MAP_ADDR
#endif




        /* load the base register 0 */
        lis                r5, HIADJ (ROM_BASE_ADRS | 0x00000801)
        addi        r5,        r5, LO (ROM_BASE_ADRS | 0x00000801)
        lis         r6, HIADJ (M8260_BR0 (INTERNAL_MEM_MAP_ADDR))
        addi        r6,        r6, LO (M8260_BR0 (INTERNAL_MEM_MAP_ADDR))
       
        /* load the option register 0 */
        stw         r5, 0(r6)
发表于 2010-5-1 15:55:57 | 显示全部楼层
好帖,顶一顶
发表于 2010-10-20 11:31:38 | 显示全部楼层
真不错 学习了 全有用
发表于 2010-10-31 19:44:33 | 显示全部楼层
一个是启动过程中cpu固化的动作,配基址时已经是软件动作。
发表于 2010-11-9 19:40:03 | 显示全部楼层
配置字。
您需要登录后才可以回帖 登录 | 注册

本版积分规则

关闭

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

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

GMT+8, 2024-5-7 10:25 , Processed in 0.027075 second(s), 8 queries , Gzip On, Redis On.

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