[LEDE-DEV] cavium: Ignore MEM boot param when too small

Michał Osowiecki michal.osowiecki at gmail.com
Wed Jun 8 06:49:26 PDT 2016


Cisco RV0XX u-boot sets MEM=2048 as boot param. We assume that at least 
4MB (mem_alloc_size) of ram is needed to run linux on cavium boards, so 
if mem < 4M - ignore it and set default value


Signed-off-by: Michał Osowiecki <michal.osowiecki at gmail.com>

--- a/arch/mips/cavium-octeon/setup.c   2016-06-06 18:15:32.000000000 +0200
+++ b/arch/mips/cavium-octeon/setup.c   2016-06-08 15:28:56.642919151 +0200
@@ -941,6 +941,11 @@
          * to consistently work.
          */
         mem_alloc_size = 4 << 20;
+
+       /* Ignore bootarg MEM <= 4MB */
+       if (MAX_MEMORY <= mem_alloc_size)
+               MAX_MEMORY = 512ull << 20;
+
         if (mem_alloc_size > MAX_MEMORY)
                 mem_alloc_size = MAX_MEMORY;




More information about the Lede-dev mailing list