All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot-Users] start.S code snippet doubt
@ 2004-11-22 13:52 Nishant Galange
  2004-11-22 16:52 ` Wolfgang Denk
  2004-11-23  9:58 ` [U-Boot-Users] start.S code snippet doubt Yuli Barcohen
  0 siblings, 2 replies; 6+ messages in thread
From: Nishant Galange @ 2004-11-22 13:52 UTC (permalink / raw)
  To: u-boot

Hi all,

What does the following code achieve: (Code snippet from start.S)
boot_cold:
#if defined(CONFIG_MPC8260ADS)
	lis	r3, CFG_DEFAULT_IMMR at 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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [U-Boot-Users] start.S code snippet doubt
  2004-11-22 13:52 [U-Boot-Users] start.S code snippet doubt Nishant Galange
@ 2004-11-22 16:52 ` Wolfgang Denk
  2004-11-23 14:40   ` [U-Boot-Users] Can the CPU load from flash without configuring it first? Peter Asemann
  2004-11-23  9:58 ` [U-Boot-Users] start.S code snippet doubt Yuli Barcohen
  1 sibling, 1 reply; 6+ messages in thread
From: Wolfgang Denk @ 2004-11-22 16:52 UTC (permalink / raw)
  To: u-boot

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 at 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

-- 
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
A person who is more than casually interested in computers should  be
well  schooled in machine language, since it is a fundamental part of
a computer.                                           -- Donald Knuth

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [U-Boot-Users] start.S code snippet doubt
  2004-11-22 13:52 [U-Boot-Users] start.S code snippet doubt Nishant Galange
  2004-11-22 16:52 ` Wolfgang Denk
@ 2004-11-23  9:58 ` Yuli Barcohen
  1 sibling, 0 replies; 6+ messages in thread
From: Yuli Barcohen @ 2004-11-23  9:58 UTC (permalink / raw)
  To: u-boot

>>>>> 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 at 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.

-- 
========================================================================
 Yuli Barcohen       | Phone +972-9-765-1788 |  Software Project Leader
 yuli at arabellasw.com | Fax   +972-9-765-7494 | Arabella Software, Israel
========================================================================

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [U-Boot-Users] Can the CPU load from flash without configuring it first?
  2004-11-22 16:52 ` Wolfgang Denk
@ 2004-11-23 14:40   ` Peter Asemann
  2004-11-23 14:46     ` Steven Scholz
  2004-11-23 15:46     ` Wolfgang Denk
  0 siblings, 2 replies; 6+ messages in thread
From: Peter Asemann @ 2004-11-23 14:40 UTC (permalink / raw)
  To: u-boot

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [U-Boot-Users] Can the CPU load from flash without configuring it first?
  2004-11-23 14:40   ` [U-Boot-Users] Can the CPU load from flash without configuring it first? Peter Asemann
@ 2004-11-23 14:46     ` Steven Scholz
  2004-11-23 15:46     ` Wolfgang Denk
  1 sibling, 0 replies; 6+ messages in thread
From: Steven Scholz @ 2004-11-23 14:46 UTC (permalink / raw)
  To: u-boot

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [U-Boot-Users] Can the CPU load from flash without configuring it first?
  2004-11-23 14:40   ` [U-Boot-Users] Can the CPU load from flash without configuring it first? Peter Asemann
  2004-11-23 14:46     ` Steven Scholz
@ 2004-11-23 15:46     ` Wolfgang Denk
  1 sibling, 0 replies; 6+ messages in thread
From: Wolfgang Denk @ 2004-11-23 15:46 UTC (permalink / raw)
  To: u-boot

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

-- 
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Successful and fortunate crime is called virtue.             - Seneca

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2004-11-23 15:46 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-11-22 13:52 [U-Boot-Users] start.S code snippet doubt Nishant Galange
2004-11-22 16:52 ` Wolfgang Denk
2004-11-23 14:40   ` [U-Boot-Users] Can the CPU load from flash without configuring it first? Peter Asemann
2004-11-23 14:46     ` Steven Scholz
2004-11-23 15:46     ` Wolfgang Denk
2004-11-23  9:58 ` [U-Boot-Users] start.S code snippet doubt Yuli Barcohen

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.