[U-Boot-Users] start.S code snippet doubt

Hi all,
What does the following code achieve: (Code snippet from start.S) boot_cold: #if defined(CONFIG_MPC8260ADS) lis r3, CFG_DEFAULT_IMMR@h nop lwz r4, 0(r3) nop rlwinm r4, r4, 0, 8, 5 nop oris r4, r4, 0x0200 nop stw r4, 0(r3) nop #endif /* CONFIG_MPC8260ADS */
Can anyone please tell me the importance/significance of this code?
Regards, Nishant

In message 1101131529.23c64d7cnishant.subs@myrealbox.com you wrote:
What does the following code achieve: (Code snippet from start.S)
Which start.S? There are at least 25 files with this name.
boot_cold: #if defined(CONFIG_MPC8260ADS) lis r3, CFG_DEFAULT_IMMR@h nop lwz r4, 0(r3) nop rlwinm r4, r4, 0, 8, 5 nop oris r4, r4, 0x0200 nop stw r4, 0(r3) nop #endif /* CONFIG_MPC8260ADS */
Did you try to understand what the code is doing? And what CFG_DEFAULT_IMMR might mean?
Can anyone please tell me the importance/significance of this code?
The code is very important and significant - without it U-Boot will not run on this board.
Best regards,
Wolfgang Denk

Well, I think it *must* be that way, but to be sure I ask this probably question, though:
If a MPC875 starts, it will try to boot from the device selected by chip-select 0 (CS0), unless otherwise stated in the hard reset configuration word. It will then try to access a flash/eprom/something device via the "GPCM" memory controller. In order for this to work, the GPCM of the CPU must be possible to access a flash/eprom without prior configuration when booting.
Is that right?
Best regards,
Peter Asemann

Peter Asemann wrote:
Well, I think it *must* be that way, but to be sure I ask this probably question, though:
If a MPC875 starts, it will try to boot from the device selected by chip-select 0 (CS0), unless otherwise stated in the hard reset configuration word. It will then try to access a flash/eprom/something device via the "GPCM" memory controller. In order for this to work, the GPCM of the CPU must be possible to access a flash/eprom without prior configuration when booting.
How else could it boot otherwise? ;-)
Have a look at the power up default values of the GPCM config registers. You will see that their (most probably) set to meet the requirements for standard flash devices...
-- Steven

In message 41A34BE4.1050305@web.de you wrote:
Well, I think it *must* be that way, but to be sure I ask this probably question, though:
If a MPC875 starts, it will try to boot from the device selected by chip-select 0 (CS0), unless otherwise stated in the hard reset configuration word.
Don't speculate. RTFM. Read the User's manual for the processor. All these issues are there explained in great detail.
Best regards,
Wolfgang Denk

Nishant Galange writes:
Nishant> Hi all, What does the following code achieve: (Code snippet Nishant> from start.S) boot_cold: Nishant> #if defined(CONFIG_MPC8260ADS) Nishant> lis r3, CFG_DEFAULT_IMMR@h Nishant> nop Nishant> lwz r4, 0(r3) Nishant> nop Nishant> rlwinm r4, r4, 0, 8, 5 Nishant> nop Nishant> oris r4, r4, 0x0200 Nishant> nop Nishant> stw r4, 0(r3) Nishant> nop Nishant> #endif /* CONFIG_MPC8260ADS */
Nishant> Can anyone please tell me the importance/significance of Nishant> this code?
This code fixes incorrect BADDR configuration caused by wrong HRCW supplied by BCSR (FPGA) on some MPC8260ADS boards. It's configured as if there was L2 cache so that lower address lines are not functional (64-bit data bus). Without this code, such a board can't start from 32-bit flash SIMM. This code is for MPC8260ADS only so there should not be any problem.
participants (5)
-
Nishant Galange
-
Peter Asemann
-
Steven Scholz
-
Wolfgang Denk
-
Yuli Barcohen