[U-Boot-Users] u-boot hangs in ./cpu/mpc8xx/cpu_init.c when changing br0
MannJ at embeddedplanet.com
Thu Jun 22 23:04:35 CEST 2006
SOLUTION (or at least an explanation, and it has nothing to do with the
longish comment in this source file)
Form the MPC866 data sheet:
"When the MPC866 internal core begins accessing memory at system reset,
CS0 is asserted for every address, unless an internal register is
accessed...CS0 operates this way until the first write to OR0 and it can
be used as any other chip-select register once the preferred address
range is loaded into BR0."
All of this is already loaded by the BDI debugger, so that is what is
throwing off the processor. OR0 already has an address range set, so
when BR0's address mask is changed, the program gets "lost" because the
next instruction cannot be found. Of course, the instruction cache has
already been enabled, so the lost instruction is not an issue until a
few lines later.
Before clearing BR0, include the following:
[temp] = [OR0]
[temp] |= 0x0000ffff
[OR0] = [temp]
The next e-mail will be a patch
From: wd at denx.de [mailto:wd at denx.de]
Sent: Wednesday, June 21, 2006 4:57 PM
To: Jeff Mann
Cc: u-boot-users at lists.sourceforge.net
Subject: Re: [U-Boot-Users] u-boot hangs in ./cpu/mpc8xx/cpu_init.c when
<1628E43D99629C46988BE46087A3FBB95C58A9 at ep-01.EmbeddedPlanet.local> you
> But back to the problem.
There is a longish commet in this source file, lines 127...149.
> r28 holds the value 0xfa200100 (the location of br0) At line 118, br0
> is loaded into r0. r0 then holds 0xfc000001.
> At line 119, r0 becomes 0x00000000. <<-- This is the problem, I think
> At line 120, r0 becomes 0x00000001 At line 121, r0 is saved to br0
> (the address pointed to by r28).
> (br0 becomes 0x00000001)
The C comment says: "Clear everything except Port Size bits, then add
just the "Bank Valid" bit". Looks as if exactly this was happening.
What's the problem?
> The program fails at ln 180 with:
> "Program received signal SIGABRT, aborted."
> But by this time, br0 was reloaded with CFG_BR0_PRELIM from line 176.
> Any more ideas?
> -----Original Message-----
> From: wd at denx.de [mailto:wd at denx.de]
> Sent: Tuesday, June 20, 2006 5:53 PM
> To: Jeff Mann
> Cc: u-boot-users at lists.sourceforge.net
> Subject: Re: [U-Boot-Users] u-boot hangs in ./cpu/mpc8xx/cpu_init.c
> when changing br0
Please don't top post / full quote. Read
Software Engineering: Embedded and Realtime Systems, Embedded Linux
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
"Gravitation cannot be held responsible for people falling in love."
- Albert Einstein
More information about the U-Boot