]> git.dujemihanovic.xyz Git - u-boot.git/commit
Add fdt_kaslrseed function to add kaslr-seed to chosen node
authorTim Harvey <tharvey@gateworks.com>
Tue, 18 Jun 2024 21:06:06 +0000 (14:06 -0700)
committerTom Rini <trini@konsulko.com>
Fri, 28 Jun 2024 23:30:45 +0000 (17:30 -0600)
commit00afd1ec82161aa7702d184fc6acdad256c44c82
tree4cc15ebc21c2baf331f3580cb3f5b6b77bf4381e
parent9e9f78f7aa0124ef0e622532043acf87e84008dc
Add fdt_kaslrseed function to add kaslr-seed to chosen node

If RANDOMIZE_BASE is enabled in the Linux kernel instructing it to
randomize the virtual address at which the kernel image is loaded, it
expects entropy to be provided by the bootloader by populating
/chosen/kaslr-seed with a 64-bit value from source of entropy at boot.

Add a fdt_kaslrseed function to accommodate this allowing an existing
node to be overwritten if present. For now use the first rng device
but it would be good to enhance this in the future to allow some sort
of selection or policy in choosing the rng device used.

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Cc: Michal Simek <michal.simek@amd.com>
Cc: Andy Yan <andy.yan@rock-chips.com>
Cc: Akash Gajjar <gajjar04akash@gmail.com>
Cc: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Cc: Simon Glass <sjg@chromium.org>
Cc: Patrick Delaunay <patrick.delaunay@foss.st.com>
Cc: Patrice Chotard <patrice.chotard@foss.st.com>
Cc: Devarsh Thakkar <devarsht@ti.com>
Cc: Heinrich Schuchardt <xypron.glpk@gmx.de>
Cc: Hugo Villeneuve <hvilleneuve@dimonoff.com>
Cc: Marek Vasut <marex@denx.de>
Cc: Tom Rini <trini@konsulko.com>
Cc: Chris Morgan <macromorgan@hotmail.com>
Reviewed-by: Caleb Connolly <caleb.connolly@linaro.org>
boot/fdt_support.c
include/fdt_support.h