[U-Boot-Users] linux doesn't boot when CS for initial cache disabled

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@giga-stream.de

Hi Thomas!
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.
An easier option would have been to use the OCM (CFG_TEMP_STACK_OCM - on chip memory). This should work in all configurations!
If the changes are of some use for the project, I can provide a patch.
I also had these problems once (can't remember exactly were right now) so please send the changes to me, so that I can take a look at the code.
Best regards (Viele Grüße), Stefan Roese.
PS: I am on vacation until next monday! :-)
participants (2)
-
Stefan Roese
-
Thomas Schäfer