Thread (38 messages) 38 messages, 5 authors, 2021-02-12

Re: [PATCH v17 02/10] of: Add a common kexec FDT setup function

From: Thiago Jung Bauermann <hidden>
Date: 2021-02-10 23:28:26
Also in: linux-devicetree, linux-integrity, linuxppc-dev, lkml

Lakshmi Ramasubramanian [off-list ref] writes:
From: Rob Herring <robh@kernel.org>

Both arm64 and powerpc do essentially the same FDT /chosen setup for
kexec.  The differences are either omissions that arm64 should have
or additional properties that will be ignored.  The setup code can be
combined and shared by both powerpc and arm64.

The differences relative to the arm64 version:
 - If /chosen doesn't exist, it will be created (should never happen).
 - Any old dtb and initrd reserved memory will be released.
 - The new initrd and elfcorehdr are marked reserved.
 - "linux,booted-from-kexec" is set.

The differences relative to the powerpc version:
 - "kaslr-seed" and "rng-seed" may be set.
 - "linux,elfcorehdr" is set.
 - Any existing "linux,usable-memory-range" is removed.

Combine the code for setting up the /chosen node in the FDT and updating
the memory reservation for kexec, for powerpc and arm64, in
of_kexec_alloc_and_setup_fdt() and move it to "drivers/of/kexec.c".

Signed-off-by: Rob Herring <robh@kernel.org>
Signed-off-by: Lakshmi Ramasubramanian <redacted>
---
 drivers/of/Makefile |   6 ++
 drivers/of/kexec.c  | 258 ++++++++++++++++++++++++++++++++++++++++++++
 include/linux/of.h  |  13 +++
 3 files changed, 277 insertions(+)
 create mode 100644 drivers/of/kexec.c
Reviewed-by: Thiago Jung Bauermann <redacted>

-- 
Thiago Jung Bauermann
IBM Linux Technology Center

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help