Message ID | 57582266.8020105@gmail.com |
---|---|
State | Accepted |
Headers | show |
On 08/06/2016 15:49, Michał Osowiecki wrote: > 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@gmail.com> > Hi Michał, how much memory does the board have ? maybe they just forgot the "<< 20" part ? John > --- 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; > > > _______________________________________________ > Lede-dev mailing list > Lede-dev@lists.infradead.org > http://lists.infradead.org/mailman/listinfo/lede-dev
--- 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;
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@gmail.com>