From: Wolfgang Denk Date: Mon, 7 Apr 2008 21:59:10 +0000 (+0200) Subject: Merge branch 'master' of git://www.denx.de/git/u-boot-mpc83xx X-Git-Tag: v1.3.3-rc1~117 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=e59af4b611408adcdfb5e19bc5194a7d1f8b4dc3;p=oweals%2Fu-boot.git Merge branch 'master' of git://denx.de/git/u-boot-mpc83xx Conflicts: lib_ppc/board.c Signed-off-by: Wolfgang Denk --- e59af4b611408adcdfb5e19bc5194a7d1f8b4dc3 diff --cc lib_ppc/board.c index f27397614e,7ebf74abfe..7d33914492 --- a/lib_ppc/board.c +++ b/lib_ppc/board.c @@@ -120,10 -120,7 +120,11 @@@ DECLARE_GLOBAL_DATA_PTR #define TOTAL_MALLOC_LEN CFG_MALLOC_LEN #endif +#if !defined(CFG_MEM_TOP_HIDE) +#define CFG_MEM_TOP_HIDE 0 +#endif + + extern ulong _start; extern ulong __init_end; extern ulong _end; ulong monitor_flash_len; @@@ -439,20 -435,8 +440,20 @@@ void board_init_f (ulong bootflag * - monitor code * - board info struct */ - len = (ulong)&_end - CFG_MONITOR_BASE; + len = (ulong)&_end - (ulong)&_start + EXC_OFF_SYS_RESET; + /* + * Subtract specified amount of memory to hide so that it won't + * get "touched" at all by U-Boot. By fixing up gd->ram_size + * the Linux kernel should now get passed the now "corrected" + * memory size and won't touch it either. This should work + * for arch/ppc and arch/powerpc. Only Linux board ports in + * arch/powerpc with bootwrapper support, that recalculate the + * memory size from the SDRAM controller setup will have to + * get fixed. + */ + gd->ram_size -= CFG_MEM_TOP_HIDE; + #ifndef CONFIG_MAX_MEM_MAPPED #define CONFIG_MAX_MEM_MAPPED (256 << 20) #endif