diff options
author | Wolfgang Denk <wd@denx.de> | 2008-04-07 23:52:32 +0200 |
---|---|---|
committer | Wolfgang Denk <wd@denx.de> | 2008-04-07 23:52:32 +0200 |
commit | 6de5420370f0a796c325579f49a47d859ea1b1da (patch) | |
tree | b650aafbf9b3a57344d6658a912732d21837160f /lib_ppc | |
parent | 74d1e66d22dac91388bc538b2fe19f735edc5b82 (diff) | |
parent | e54ec0f016803e4d9524ff71f7971bda0c51b287 (diff) | |
download | u-boot-imx-6de5420370f0a796c325579f49a47d859ea1b1da.zip u-boot-imx-6de5420370f0a796c325579f49a47d859ea1b1da.tar.gz u-boot-imx-6de5420370f0a796c325579f49a47d859ea1b1da.tar.bz2 |
Merge branch 'master' of git://www.denx.de/git/u-boot-ppc4xx
Diffstat (limited to 'lib_ppc')
-rw-r--r-- | lib_ppc/board.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/lib_ppc/board.c b/lib_ppc/board.c index 3038302..f273976 100644 --- a/lib_ppc/board.c +++ b/lib_ppc/board.c @@ -120,6 +120,10 @@ 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 __init_end; extern ulong _end; ulong monitor_flash_len; @@ -428,6 +432,7 @@ void board_init_f (ulong bootflag) * relocate the code and continue running from DRAM. * * Reserve memory at end of RAM for (top down in that order): + * - area that won't get touched by U-Boot and Linux (optional) * - kernel log buffer * - protected RAM * - LCD framebuffer @@ -436,6 +441,18 @@ void board_init_f (ulong bootflag) */ len = (ulong)&_end - CFG_MONITOR_BASE; + /* + * 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 |