[U-Boot] lowlevel_init.s for ARM920t/S3C2410

kevin.morfitt at fearnside-systems.co.uk kevin.morfitt at fearnside-systems.co.uk
Thu Sep 17 11:26:52 CEST 2009



J.Hwan.Kim wrote:
> Hi, everyone
> 
> I'm running u-boot (2009.03) in S3C2410 board now.
> But I have a problem.
> 
> It seems that "bl lowlevel_init" routine in ARM920t/start.s is not working.
> The label, lowlevel_init, is  defined as global label in 
> /board/samsung/s3c2410/lowlevel_init.s
> and is seen system.map file.
> 
> I think the code does not jump to lowlevel_init in 
> /board/samsung/s3c2410/lowlevel_init.S from start.S
> When I copy lowlevel_init subroutine into ARM920t/start.S instead of "bl 
> lowlevel_init",
> it does work.
> 
> Why does the "bl lowlevel_init" not work?
> 
> How can  I solve this problem ?
> 
> Thanks in advance.
> 
> Regards,
> J.Hwan Kim
> 
> 
> 
> _______________________________________________
> U-Boot mailing list
> U-Boot at lists.denx.de
> http://lists.denx.de/mailman/listinfo/u-boot
> 

Hi

I wonder if your board is booting from NAND flash? If it is, then at start-up
the s3c2410's Steppingstone feature will read a 4Kb block of data from the base
of NAND flash to the base of RAM bank 0 then jump to the base of that RAM bank.
The idea is that the first 4Kb of the code in NAND flash should contain a small
code loader that initialises the NAND flash controller, reads the rest of the
code from NAND flash into RAM, and then executes it. This will only work if the
whole of this code loader is forced into the first 4Kb at link time.

Unfortunately u-boot for s3c2410 doesn't support this at the moment, it only
really supports booting from NOR flash. I've just done a build for the s3c2410x
board and looking at the link map the start.S code is located at the linker base
address of 0x33f80000, but lowlevel_init.S is linked at 0x33f91610, so
lowlevel_init.S isn't in the first 4Kb of the u-boot image and it won't get
loaded into RAM at start-up. When the Steppingstone function loads the first
4Kb of NAND flash into RAM at start-up it will have loaded start.S but not
lowlevel_init.S, so when start.S branches to the RAM address where lowlevel_init
should be lowlevel_init won't be there and it will crash.

When you copied lowlevel_init into start.S the "bl lowlevel_init" worked because
this forced it to be linked into the bottom 4Kb of code, but I'm guessing that
u-boot still didn't work because u-boot for s3c2410 doesn't contain any code
that reads the rest of u-boot from NAND flash to RAM

The simplest way around this would be to load u-boot into NOR flash and
configure the board jumpers to boot from NOR flash, not NAND flash. Then u-boot
would just copy itself from NOR flash to RAM at start-up and would boot normally.

Alternatively, I have seen some unofficial u-boot ports for s3c24x0 cpu's that
do support u-boot booting from NAND flash but I don't have the source code for them.

Regards
Kevin Morfitt




More information about the U-Boot mailing list