Commit 1614959f authored by Pingfan Liu's avatar Pingfan Liu Committed by Simon Horman
Browse files

arm64/crashdump: deduce paddr of _text based on kernel code size



kexec-tools commit 61b8c79b ("arm64/crashdump-arm64: deduce the
paddr of _text") tries to deduce the paddr of _text, but turns out
partially.

That commit is based on "The Image must be placed text_offset bytes from
a 2MB aligned base address anywhere in usable system RAM and called
there" in linux/Documentation/arm64/booting.rst, plus text_offset field
is zero.

But in practice, some boot loaders does not obey the convention, and
still boots up the kernel successfully.

Revisiting kernel commit e2a073dde921 ("arm64: omit [_text, _stext) from
permanent kernel mapping"), the kernel code size changes from (unsigned
long)__init_begin - (unsigned long)_text to (unsigned long)__init_begin
- (unsigned long)_stext

And it should be a better factor to decide which label starts the
"Kernel code" in /proc/iomem.

Signed-off-by: default avatarPingfan Liu <piliu@redhat.com>
Signed-off-by: default avatarSimon Horman <horms@verge.net.au>
parent 10b7e1fb
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment