<html>
<head>
<style>
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
FONT-SIZE: 9pt;
FONT-FAMILY:Tahoma
}
</style>
</head>
<body class='hmmessage'>hi all:<BR>
i'm new,i'm porting u-boot for s3c2410 base board . The u-boot relocate code<BR>
<SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #333333; FONT-FAMILY: Simsun; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">#ifndef CONFIG_SKIP_RELOCATE_UBOOT <?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p></SPAN><BR>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #333333; FONT-FAMILY: Simsun; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">relocate:<SPAN style="mso-spacerun: yes"> </SPAN>/* relocate U-Boot to RAM<SPAN style="mso-spacerun: yes"> </SPAN>*/ <o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #333333; FONT-FAMILY: Simsun; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes"> </SPAN>adr<SPAN style="mso-spacerun: yes"> </SPAN>r0, _start<SPAN style="mso-spacerun: yes"> </SPAN>/* r0 <- current position of code<SPAN style="mso-spacerun: yes"> </SPAN>*/ <o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #333333; FONT-FAMILY: Simsun; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes"> </SPAN>ldr<SPAN style="mso-spacerun: yes"> </SPAN>r1, _TEXT_BASE<SPAN style="mso-spacerun: yes"> </SPAN>/* test if we run from flash or RAM */ <o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #333333; FONT-FAMILY: Simsun; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes"> </SPAN>cmp<SPAN style="mso-spacerun: yes"> </SPAN>r0, r1<SPAN style="mso-spacerun: yes"> </SPAN>/* don't reloc during debug<SPAN style="mso-spacerun: yes"> </SPAN>*/ <o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #333333; FONT-FAMILY: Simsun; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes"> </SPAN>beq<SPAN style="mso-spacerun: yes"> </SPAN>stack_setup <o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #333333; FONT-FAMILY: Simsun; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes"> </SPAN>ldr<SPAN style="mso-spacerun: yes"> </SPAN>r2, _armboot_start <o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #333333; FONT-FAMILY: Simsun; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes"> </SPAN>ldr<SPAN style="mso-spacerun: yes"> </SPAN>r3, _bss_start <SPAN style="mso-spacerun: yes"> </SPAN><o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #333333; FONT-FAMILY: Simsun; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes"> </SPAN>sub<SPAN style="mso-spacerun: yes"> </SPAN>r2, r3, r2<SPAN style="mso-spacerun: yes"> </SPAN>/* r2 <- size of armboot<SPAN style="mso-spacerun: yes"> </SPAN>*/ <o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #333333; FONT-FAMILY: Simsun; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes"> </SPAN>add<SPAN style="mso-spacerun: yes"> </SPAN>r2, r0, r2<SPAN style="mso-spacerun: yes"> </SPAN>/* r2 <- source end address<SPAN style="mso-spacerun: yes"> </SPAN>*/ <o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #333333; FONT-FAMILY: Simsun; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">copy_loop: <o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN style="FONT-SIZE: 9pt; COLOR: #333333; FONT-FAMILY: 宋体; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt; mso-ascii-font-family: Simsun; mso-hansi-font-family: Simsun">……………</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #333333; FONT-FAMILY: Simsun; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">.<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #333333; FONT-FAMILY: Simsun; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">#endif<SPAN style="mso-spacerun: yes"> </SPAN>/* CONFIG_SKIP_RELOCATE_UBOOT */ </SPAN><SPAN lang=EN-US style="DISPLAY: none; FONT-SIZE: 9pt; COLOR: #333333; FONT-FAMILY: Simsun; mso-hide: all">#ifndef CONFIG_SKIP_RELOCATE_UBOOT</SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="DISPLAY: none; FONT-SIZE: 9pt; COLOR: #333333; FONT-FAMILY: Simsun; mso-hide: all"> </SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #333333; FONT-FAMILY: Simsun; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt"><o:p></o:p></SPAN></P>
<P>Are these codes useful in the nand flash boot mode?<BR>
best regards<BR>
liang<BR>
<BR></P><br /><hr />“七件武器,七种完美” <a href='http://get.live.cn' target='_new'>立刻体验!</a></body>
</html>