[U-Boot-Users] [PATCH] ppc4xx: Don't use last 256 bytes of SDRAM, workaround for 440EPx CHIP 11 errata
Kumar Gala
galak at kernel.crashing.org
Thu Mar 20 13:55:45 CET 2008
On Mar 20, 2008, at 6:16 AM, Wolfgang Denk wrote:
> In message <200803201129.06602.sr at denx.de> you wrote:
>>
>> I don't like this either. But I have not come up with a "generic"
>> solution
>> till now. It's not so easy since the 440EPx SDRAM setup code is
>> sometimes
>> common (cpu/ppc4xx/denali_spd_ddr2.c) and sometimes board specific.
>> And it
>> gets even more complicated when ECC initialization is needed too. So
>> currently I have no "better" solution as to do it in a board
>> specific way.
>>
>> As always, patches implementing a "better" more generic solution
>> are welcome.
>
> At the cost of an #ifdef, this could be added to the memory
> reservation code in "lib_ppc/board.c", i. e. somewhere after
>
> ...
> 427 * Reserve memory at end of RAM for (top down in that
> order):
> 428 * - kernel log buffer
> 429 * - protected RAM
> 430 * - LCD framebuffer
> 431 * - monitor code
> 432 * - board info struct
> 433 */
> 434 len = (ulong)&_end - CFG_MONITOR_BASE;
> 435
> 436 addr = CFG_SDRAM_BASE + get_effective_memsize();
>
> Of course you need to make sure that the linux kernel understands
> this changed behaviour / shifted addresses, too.
I haven't looked at the exact details but with the new-image branch of
u-boot-testing the introduction of using the lmb to keep track of
memory regions used might make this a little easier. It clearly will
not help in determining when to do a lmb_reserve().
- k
More information about the U-Boot
mailing list