mips/malta: leave space for the bootmap after the initrd
authorAurelien Jarno <aurelien@aurel32.net>
Mon, 31 Jul 2017 22:52:10 +0000 (00:52 +0200)
committerYongbok Kim <yongbok.kim@imgtec.com>
Wed, 2 Aug 2017 16:01:27 +0000 (17:01 +0100)
commit9652ef24bfaf59ba179787503fdf7eae6e95475b
tree7c0a64975b900ad68c6b8a29066b5b138715fc37
parentcb539fd241900f51de7d21244f7a55422ad0d40a
mips/malta: leave space for the bootmap after the initrd

Since commit 9768e2abf7 the initrd is loaded at the end of the low
memory to avoid clash for the kernel relocation when kaslr is used.

However this in turn conflicts with the bootmap memory that the kernel
tries to place after initrd, but in low memory. The bootmap spans the
whole usable physical address space. The machine can have at most 2GiB
of memory, 256MiB of low memory mapped at 0x00000000, and 1792MiB of
high memory mapped at 0x90000000. The biggest bootmap therefore
corresponds to the adresses 0x00000000 -> 0xffffffff, which at 1 bit
per 4kiB page corresponds to 128kiB in memory.

Therefore reserve 128kiB after the initrd.

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Tested-by: Yongbok Kim <yongbok.kim@imgtec.com>
Signed-off-by: Yongbok Kim <yongbok.kim@imgtec.com>
hw/mips/mips_malta.c