On Wed, 20 Mar 2002 11:41:34 +0100
fg...@ti... wrote:
> Hi,
> how you can easily understand, I'm bot an expert but I'd like to understand
> more.
>
> Following the suggestion of Stuart Menefy, I'm starting from sesh3 version
> of sh-ipl+g for booting my card.
> I have two question:
> 1) to make working the sh-stub necessarely I need to execute :
>
> mov.l RTCSR_A,r1 /* RTCSR Address */
> mov.l RTCSR_D,r0 /* RTCSR Data */
> mov.w r0,@r1
>
> mov.l RTCNT_A,r1 /* RTCNT Address */
> mov.l RTCNT_D,r0 /* RTCNT Data */
> mov.w r0,@r1
>
> mov.l RTCOR_A,r1 /* RTCOR Address */
> mov.l RTCOR_D,r0 /* RTCOR Data */
> mov.w r0,@r1
>
> mov.l RFCR_A,r1 /* RFCR Address */
> mov.l RFCR_D,r0 /* RFCR Data */
> mov.w r0,@r1 /* Clear reflesh counter */
>
> /* Wait DRAM refresh 8 times */
> mov.l RFCR_A,r1 /* RFCR Address */
> mov #8,r3
> 1:
> mov.w @r1,r0
> extu.w r0,r2
> cmp/hi r3,r2
> bf 1b
>
> mov.l SDMR3_A,r1 /* Set SDRAM mode */
> mov #0,r0
> mov.b r0,@r1
>
>
> I think so because I need SDRAM.
You'll need something like this, but the exact values which are programmed
into the registers will depend on the hardware on your board. So you'll
need the timings for the memory you're using.
> 2) what's the meaning of :
>
> mov.l BOOT_CONFIG_WORD,r1
> mov.w @r1,r0
> exts.b r0,r0
> cmp/eq #0xde,r0 ! MAGIC # for "doDEs"
> bf 1f
> mov.l 0f,r5
> mov.l 0f,r6
> mov.l 0f,r7
> bra 1f
> nop
> .align 2
> 0: .long 0xbabeface
> 1:
> rts
> nop
When the IPL starts up, it looks at some registers, and if they are
set to a particular pattern, it assumes it has been asked to reboot
the OS, and doesn't go into the interactive boot prompt part of the code.
Have a look at where the the get_boot_signature() function is called from.
These registers are normally set by trapping into the IPL to issue a
'shutdown' call, but from the code above, it looks like the SolutionEngines
have a second way of setting this pattern at boot time.
I know there are some switches on the board which can be read from software,
so maybe that is what it being tested in this bit of assembler code.
I'd remove this bit of code from your version until you have eveything
else working, and then decide if you need a similar mechanism for your
board.
Stuart
>
>
> Thanks a lot.
>
> _______________________________________________
> linuxsh-dev mailing list
> lin...@li...
> https://lists.sourceforge.net/lists/listinfo/linuxsh-dev
--
Stuart Menefy stu...@st...
STMicroelectronics Ltd ST Intranet: mo.bri.st.com
Bristol, UK Rest of the World: www.linuxsh.st.com
|