[U-Boot] problem with mpc837x start.S

Scott Wood scottwood at freescale.com
Mon Aug 1 20:48:22 CEST 2011


On Wed, 27 Jul 2011 06:21:13 +0000
shawn Bai <programassem at hotmail.com> wrote:

> The question is about arch\powerpc\cpu\83xx\start.S.
> the demo board I use is MPC837xERDB, there is 8MBytes Nor flash on it.
> by default, uboot is booted from lower address, it means BMS field in HRCW is 0, which will affect value of MSR[IP] later.
> First instruction locates at _start label in uboot.
> Before first instruction runs, hardware reset configuration word will be loaded to make some basic configuration.
> Before branching to MONITOR_BASE+in_flash using blr instruction, size of LCS0 is inflated to 4GBytes,
> and eLBC access window 1 is configured with BAR MONITOR_BASE, and SIZE 8MBytes.
> After this is done, blr to MONITOR_BASE+in_flash.
> after branching to MONITOR_BASE+in_flash, LCS0 BAR is modified to MONITOR_BASE, and its size is configured with 8Mbytes again.
> This is what I know.
> But the problem which is confused to me is
> after reset, the default value of LCS0 BAR is 0x0000_0000, and its size is 8Mbytes.
> In order to branch to MONITOR_BASE+in_flash, inlarge Nor flash to 4GB, and configure eLBC access window 1. 
> But the actual size of Nor flash is 8MB , even after inlarging it, where (MONITOR_BASE+in_flash) points to? why?
> why does branching to in_flash need absolute address? and make absolute address like this?

When flash is enlarged to 4GiB, it repeats throughout the address space.
We branch to the absolute address because that's where flash is going to
end up after it's shrunk to its normal size.

-Scott



More information about the U-Boot mailing list