summaryrefslogtreecommitdiff
path: root/arch/arm64/kernel/setup.c
diff options
context:
space:
mode:
authorMiles Chen <miles.chen@mediatek.com>2018-12-12 13:56:49 +0300
committerWill Deacon <will.deacon@arm.com>2018-12-14 12:33:49 +0300
commit12f799c8c739518e12248bbd000eb0a246e8e5f8 (patch)
tree8e899cb33d47d7921e0b0e1d511101d178fbe43d /arch/arm64/kernel/setup.c
parent97bebc5facf7d495e72df0b7c50be3699c7bdd73 (diff)
downloadlinux-12f799c8c739518e12248bbd000eb0a246e8e5f8.tar.xz
arm64: kaslr: print PHYS_OFFSET in dump_kernel_offset()
When debug with kaslr, it is sometimes necessary to have PHYS_OFFSET to perform linear virtual address to physical address translation. Sometimes we're debugging with only few information such as a kernel log and a symbol file, print PHYS_OFFSET in dump_kernel_offset() for that case. Tested by: echo c > /proc/sysrq-trigger [ 11.996161] SMP: stopping secondary CPUs [ 11.996732] Kernel Offset: 0x2522200000 from 0xffffff8008000000 [ 11.996881] PHYS_OFFSET: 0xffffffeb40000000 Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org> Signed-off-by: Miles Chen <miles.chen@mediatek.com> Signed-off-by: Will Deacon <will.deacon@arm.com>
Diffstat (limited to 'arch/arm64/kernel/setup.c')
-rw-r--r--arch/arm64/kernel/setup.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/arm64/kernel/setup.c b/arch/arm64/kernel/setup.c
index f4fc1e0544b7..4b0e1231625c 100644
--- a/arch/arm64/kernel/setup.c
+++ b/arch/arm64/kernel/setup.c
@@ -388,6 +388,7 @@ static int dump_kernel_offset(struct notifier_block *self, unsigned long v,
if (IS_ENABLED(CONFIG_RANDOMIZE_BASE) && offset > 0) {
pr_emerg("Kernel Offset: 0x%lx from 0x%lx\n",
offset, KIMAGE_VADDR);
+ pr_emerg("PHYS_OFFSET: 0x%llx\n", PHYS_OFFSET);
} else {
pr_emerg("Kernel Offset: disabled\n");
}