您的位置:首页 > 其它

X86下vxworks的romStart分析:

2010-03-09 10:46 113 查看
vxworks 压缩型BOOT的romStart分析:

binArrayStart:压缩的二进制image的起始地址

binArrayEnd:压缩的二进制image的结束地址

压缩的二进制image中没有romInit.o和bootInit.o

将ROM_OFFSET(binArrayStart)开始解压RAM_DST_ADRS地址,即RAM_HIGH_ADRS地址,

然后直接跳转到usrInit().

下面这段拷贝,具体含义是:

/*

* copy text to uncached locations to avoid problems with

* copy back caches

* copy the entire data segment because there is no way to ensure that

* binArray is the last thing in the data segment because of GP relative

* addressing

*/

知道可以说一下!呵呵

((FUNCPTR)ROM_OFFSET(copyLongs)) (ROM_TEXT_ADRS, (UINT)romInit,

((UINT)binArrayStart - (UINT)romInit)/ sizeof (long));

((FUNCPTR)ROM_OFFSET(copyLongs))

((UINT *)((UINT)ROM_TEXT_ADRS + ((UINT)BINARRAYEND_ROUNDOFF -

(UINT)romInit)), (UINT *)BINARRAYEND_ROUNDOFF,

((UINT)wrs_kernel_data_end - (UINT)binArrayEnd) / sizeof (long));
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: