Re: REGRESSION: initrd is disabled due to memory overlap
From: Corentin Labbe
Date: Tue May 18 2021 - 07:02:16 EST
Le Tue, May 18, 2021 at 11:35:46AM +0100, Russell King (Oracle) a écrit :
> On Tue, May 18, 2021 at 12:24:12PM +0200, Corentin Labbe wrote:
> > Hello
> >
> > On my SSI1328 gemini board, I use initrd=0x800000,9M in cmdline.
> > On next-20210518 and 5.13-rc1 I got:
> > Booting Linux on physical CPU 0x0
> > Linux version 5.13.0-rc2-next-20210518+ (compile@Red) (armv7a-unknown-linux-gnueabihf-gcc (Gentoo 10.2.0-r5 p6) 10.2.0, GNU ld (Gentoo 2.35.2 p1) 2.35.2) #77 PREEMPT Tue May 18 12:14:41 CEST 2021
> > CPU: FA526 [66015261] revision 1 (ARMv4), cr=0000397f
> > CPU: VIVT data cache, VIVT instruction cache
> > OF: fdt: Machine model: SSI 1328
> > Memory policy: Data cache writeback
> > INITRD: 0x00800000+0x00900000 overlaps in-use memory region - disabling initrd
> > Zone ranges:
> > Normal [mem 0x0000000000000000-0x0000000007ffffff]
> > HighMem empty
> > Movable zone start for each node
> > Early memory node ranges
> > node 0: [mem 0x0000000000000000-0x0000000007ffffff]
> > Initmem setup node 0 [mem 0x0000000000000000-0x0000000007ffffff]
> > Built 1 zonelists, mobility grouping on. Total pages: 32512
> > Kernel command line: console=ttyS0,19200n8 initrd=0x800000,9M
> > Dentry cache hash table entries: 16384 (order: 4, 65536 bytes, linear)
> > Inode-cache hash table entries: 8192 (order: 3, 32768 bytes, linear)
> > mem auto-init: stack:off, heap alloc:off, heap free:off
> > Memory: 117480K/131072K available (5459K kernel code, 595K rwdata, 1508K rodata, 180K init, 376K bss, 13592K reserved, 0K cma-reserved, 0K highmem)
> >
> > On 5.12, initrd is used and works.
>
> I think this is caused by the normal growth of the size of the kernel.
> If you look in the System.map for the _end symbol, I think you'll find
> that its address is larger than PAGE_OFFSET + 0x800000, causing the
> overlap.
>
> If so, the only realistic thing to do is to move the initrd higher up
> in memory - I don't think you'll get much traction with the idea of
> reducing the kernel's memory footprint.
>
Thanks, moving initrd to 0x90000 made it works.
next:
cat /proc/iomem
00000000-07ffffff : System RAM
00008000-006f8fff : Kernel code
00726000-00818edb : Kernel data
v5.12:
# cat /proc/iomem
00000000-07ffffff : System RAM
00008000-006d5fff : Kernel code
00704000-007ee2b3 : Kernel data
So yes, it seems getting bigger.
Thanks for your help.