]> git.baikalelectronics.ru Git - kernel.git/commit
MIPS: Octeon: Enable KASLR
authorSteven J. Hill <steven.hill@cavium.com>
Tue, 13 Dec 2016 20:25:37 +0000 (14:25 -0600)
committerRalf Baechle <ralf@linux-mips.org>
Tue, 3 Jan 2017 15:34:35 +0000 (16:34 +0100)
commit361ce12a6f3e10e4d93381750b93e74e184b5dde
tree24c14cb9ca8c081670310277b252ea3c9027bf30
parent54745f76f1f0931284596b7156fd43e1a7ad55d9
MIPS: Octeon: Enable KASLR

This patch enables KASLR for Octeon systems. The SMP startup code is
such that the secondaries monitor the volatile variable
'octeon_processor_relocated_kernel_entry' for any non-zero value.
The 'plat_post_relocation hook' is used to set that value to the
kernel entry point of the relocated kernel. The secondary CPUs will
then jusmp to the new kernel, perform their initialization again
and begin waiting for the boot CPU to start them via the relocated
loop 'octeon_spin_wait_boot'. Inspired by Steven's code from Cavium.

Signed-off-by: Matt Redfearn <matt.redfearn@imgtec.com>
Signed-off-by: Steven J. Hill <steven.hill@cavium.com>
Acked-by: David Daney <david.daney@cavium.com>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/14669/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
arch/mips/Kconfig
arch/mips/cavium-octeon/smp.c
arch/mips/include/asm/mach-cavium-octeon/kernel-entry-init.h