[U-Boot-Users] linux doesn't boot when CS for initial cache disabled
Thomas Schäfer
tschaefer at giga-stream.de
Tue May 27 15:39:46 CEST 2003
Hi all,
I'm testing with an IBM Walnut board (PPC405GP) with u-boot 0.3.0 and 2.4.17
kernel from Montavista. After booting u-boot and loading the kernel via
tftp, I submit the following commands on the console:
=> setdcr 12
0012: 00000004 ? 7
0012: 00000007 ? .
=> setdcr 13
0013: 400da000 ? 0
0013: 00000000 ? .
This disables CS7, which is used for the temporary stack in my
configuration.
After that, I can still load a linux kernel via tftp, but it hangs in the
early bootup sequence when turning the MMU on.
I found that the data cache for the temporary stack has to be flushed and
disabled before the CS for the temporary stack is disabled. I changed the
u-boot code at this point and everything worked fine.
Here the changes in the code are summarized:
/board/walnut405/walnut405.c:
- The function board_pre_init was divided and a new function
board_pre_init_r was created, which contains the EBC programming
/include/common.h:
- The prototype for board_pre_init_r was added
/cpu/ppc4xx/cpu_init.c
- In the cpu_init_r function, data cache is flushed and disabled first.
After that the CS for the temporary stack is disabled and board_pre_init is
called to program the EBC. This means that the EBC is programmed later in
the boot process than before, but EBC programming seems not to be necessary
that early (with the exception of the CS for the NVRAM, where the
programming was left in board_pre_init).
- In the cpu_init_f function, the EBC programming code was moved into
cpu_init_r.
I had to do those changes, because all available CS lines are used on one of
our custom boards. Now I have the possibility to use a CS for the temporary
stack in early boot stage and for hardware devices after relocation.
If the changes are of some use for the project, I can provide a patch.
Best regards,
Thomas Schäfer
____________________________________
GIGA STREAM - UMTS Technologies GmbH
Konrad-Zuse-Str. 7
66115 Saarbrücken
Tel.: + 49 (0)681 / 95916 - 203
Fax: + 49 (0)681 / 95916 - 100
E-mail: tschaefer at giga-stream.de
More information about the U-Boot
mailing list