From: Dale Farnsworth <redacted>
The CONFIG_FSL_BOOKE mmu setup code fails when CONFIG_HIGHMEM=y
and the 3 fixed TLB entries cannot exactly map the lowmem size.
Each TLB entry can map 4MB, 16MB, 64MB or 256MB, so the failure
is observed when the kernel lowmem size is not equal to the
sum of up to 3 of those values.
Normally, memory is sized in nice numbers, but I observed this
problem while testing a crash dump kernel. The failure can
also be observed by artificially reducing the kernel's main
memory via the mem= kernel command line parameter.
This commit fixes the problem by setting __initial_memory_limit
in adjust_total_lowmem().
Signed-off-by: Dale Farnsworth <redacted>
---
arch/powerpc/mm/fsl_booke_mmu.c | 2 ++
1 file changed, 2 insertions(+)
Index: linux-2.6.21/arch/powerpc/mm/fsl_booke_mmu.c
===================================================================
From: Dale Farnsworth
=20
The CONFIG_FSL_BOOKE mmu setup code fails when CONFIG_HIGHMEM=3Dy
and the 3 fixed TLB entries cannot exactly map the lowmem size.
Each TLB entry can map 4MB, 16MB, 64MB or 256MB, so the failure
is observed when the kernel lowmem size is not equal to the
sum of up to 3 of those values.
Does this mean you cannot run 1G of lowmem on a 85xx?
On 82xx I run 1G of lowmem, and when we finaly upgrade our product to a
85xx something, Iw was planning on doing the same.
(For those interested:
To run 1G lowmwm on 82xx (at least under arch/ppc)
CONFIG_ADVANCED_OPTIONS=3Dy
CONFIG_HIGHMEM_START=3D0xfe000000
CONFIG_LOWMEM_SIZE_BOOL=3Dy
CONFIG_LOWMEM_SIZE=3D0x40000000
CONFIG_KERNEL_START_BOOL=3Dy
CONFIG_KERNEL_START=3D0xa0000000
On Wed, Oct 03, 2007 at 02:34:42PM -0500, Rune Torgersen wrote:
quoted
From: Dale Farnsworth
The CONFIG_FSL_BOOKE mmu setup code fails when CONFIG_HIGHMEM=y
and the 3 fixed TLB entries cannot exactly map the lowmem size.
Each TLB entry can map 4MB, 16MB, 64MB or 256MB, so the failure
is observed when the kernel lowmem size is not equal to the
sum of up to 3 of those values.
Does this mean you cannot run 1G of lowmem on a 85xx?
I think you can, and maybe I should have added 1GB to my list of
sizes above. But, my 85xx system only has 256MB, so I can't test
it.
-Dale
From: Kumar Gala <hidden> Date: 2007-10-03 20:50:03
On Oct 3, 2007, at 2:34 PM, Rune Torgersen wrote:
quoted
From: Dale Farnsworth
The CONFIG_FSL_BOOKE mmu setup code fails when CONFIG_HIGHMEM=y
and the 3 fixed TLB entries cannot exactly map the lowmem size.
Each TLB entry can map 4MB, 16MB, 64MB or 256MB, so the failure
is observed when the kernel lowmem size is not equal to the
sum of up to 3 of those values.
Does this mean you cannot run 1G of lowmem on a 85xx?
On 82xx I run 1G of lowmem, and when we finaly upgrade our product
to a
85xx something, Iw was planning on doing the same.
The code would have to change to allow for 1G of lowmem.
Max lowmem with KERNELBASE @ 0xc000_0000 is 768M.
- k
From: Kumar Gala
The code would have to change to allow for 1G of lowmem.
Max lowmem with KERNELBASE @ 0xc000_0000 is 768M.
Which is why I asked. On 82xx it is supported without a codechange by
setting KERNELBASE to 0xa000_0000 in Kconfig menu (and also changing
start of virtual mem, also done by config option).
From: Kumar Gala <hidden> Date: 2007-10-03 22:48:34
On Oct 3, 2007, at 4:45 PM, Rune Torgersen wrote:
quoted
From: Kumar Gala
The code would have to change to allow for 1G of lowmem.
Max lowmem with KERNELBASE @ 0xc000_0000 is 768M.
Which is why I asked. On 82xx it is supported without a codechange by
setting KERNELBASE to 0xa000_0000 in Kconfig menu (and also changing
start of virtual mem, also done by config option).
we could make this work. Its just no one's griped about needing it
to date.
Its a bit of testing to make sure we respect the kernel config
changes and a slight be of code to handle using up to 1G TLB sizes on
e500v2 or greater.
- k