diff options
author | Jason Yan <yanaijie@huawei.com> | 2019-09-20 17:45:40 +0800 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2019-11-13 19:27:40 +1100 |
commit | 2b0e86cc5de6dabadc2d64cefa429fc227c8a756 (patch) | |
tree | fe20c15ad210f0b7aa7aa402ff0ad0e9eaa80bbe /arch/powerpc/include/asm/nohash/mmu-book3e.h | |
parent | c061b38a3e48663c29611e3b60afffe624d7c830 (diff) | |
download | lwn-2b0e86cc5de6dabadc2d64cefa429fc227c8a756.tar.gz lwn-2b0e86cc5de6dabadc2d64cefa429fc227c8a756.zip |
powerpc/fsl_booke/32: implement KASLR infrastructure
This patch add support to boot kernel from places other than KERNELBASE.
Since CONFIG_RELOCATABLE has already supported, what we need to do is
map or copy kernel to a proper place and relocate. Freescale Book-E
parts expect lowmem to be mapped by fixed TLB entries(TLB1). The TLB1
entries are not suitable to map the kernel directly in a randomized
region, so we chose to copy the kernel to a proper place and restart to
relocate.
The offset of the kernel was not randomized yet(a fixed 64M is set). We
will randomize it in the next patch.
Signed-off-by: Jason Yan <yanaijie@huawei.com>
Tested-by: Diana Craciun <diana.craciun@nxp.com>
Reviewed-by: Christophe Leroy <christophe.leroy@c-s.fr>
Signed-off-by: Scott Wood <oss@buserror.net>
[mpe: Use PTRRELOC() in early_init()]
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Diffstat (limited to 'arch/powerpc/include/asm/nohash/mmu-book3e.h')
-rw-r--r-- | arch/powerpc/include/asm/nohash/mmu-book3e.h | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/arch/powerpc/include/asm/nohash/mmu-book3e.h b/arch/powerpc/include/asm/nohash/mmu-book3e.h index fa3efc2d310f..b41004664312 100644 --- a/arch/powerpc/include/asm/nohash/mmu-book3e.h +++ b/arch/powerpc/include/asm/nohash/mmu-book3e.h @@ -75,7 +75,6 @@ #define MAS2_E 0x00000001 #define MAS2_WIMGE_MASK 0x0000001f #define MAS2_EPN_MASK(size) (~0 << (size + 10)) -#define MAS2_VAL(addr, size, flags) ((addr) & MAS2_EPN_MASK(size) | (flags)) #define MAS3_RPN 0xFFFFF000 #define MAS3_U0 0x00000200 |