当载xip.bin,nk.bin,eboot.bin时在这里执行
if (!memcmp (hdr, "B000FF\x0A", BL_HDRSIG_SIZE))
{
g_bBINDownload = TRUE;
//2012.2.2 YANGQI
EdbgOutputDebugString ("B000FF\x0A OK \r\n");
if (!OEMReadData (sizeof (DWORD), (LPBYTE) &dwImageStart)//
|| !OEMReadData (sizeof (DWORD), (LPBYTE) &dwImageLength))
{
EdbgOutputDebugString ("Unable to read image start/length\r\n");
HALT (BLERR_MAGIC);
return (FALSE);
}
具体分析一下:
memcmp (hdr, "B000FF\x0A", BL_HDRSIG_SIZE)
内存比较函数,就不多说了,功能,比较hdr和B000FF\x0A在内存区域中的前BL_HDRSIG_SIZE = 7个字节是否相同。
当str1<str12时,返回值<0;当str11=str12时,返回值=0;当str11>str12时,返回值>0。
所以这里if (