qemu-e2k/hw/mips
Jason A. Donenfeld 6233a13859 mips/malta: pass RNG seed via env var and re-randomize on reboot
As of the kernel commit linked below, Linux ingests an RNG seed
passed as part of the environment block by the bootloader or firmware.
This mechanism works across all different environment block types,
generically, which pass some block via the second firmware argument. On
malta, this has been tested to work when passed as an argument from
U-Boot's linux_env_set.

As is the case on most other architectures (such as boston), when
booting with `-kernel`, QEMU, acting as the bootloader, should pass the
RNG seed, so that the machine has good entropy for Linux to consume. So
this commit implements that quite simply by using the guest random API,
which is what is used on nearly all other archs too. It also
reinitializes the seed on reboot, so that it is always fresh.

Link: https://git.kernel.org/torvalds/c/056a68cea01
Cc: Aleksandar Rikalo <aleksandar.rikalo@syrmia.com>
Cc: Paul Burton <paulburton@kernel.org>
Cc: Philippe Mathieu-Daudé <f4bug@amsat.org>
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2022-10-27 11:47:45 +01:00
..
bootloader.c
boston.c mips/boston: re-randomize rng-seed on reboot 2022-10-27 11:34:31 +01:00
cps.c
fuloong2e.c Warn user if the vga flag is passed but no vga device is created 2022-05-09 08:21:14 +02:00
fw_cfg.c
fw_cfg.h
gt64xxx_pci.c Replace TARGET_WORDS_BIGENDIAN 2022-04-06 10:50:37 +02:00
jazz.c pckbd: remove legacy i8042_mm_init() function 2022-07-18 19:28:46 +01:00
Kconfig
loongson3_bootp.c
loongson3_bootp.h
loongson3_virt.c Remove qemu-common.h include from most units 2022-04-06 14:31:55 +02:00
malta.c mips/malta: pass RNG seed via env var and re-randomize on reboot 2022-10-27 11:47:45 +01:00
meson.build
mips_int.c
mipssim.c Remove qemu-common.h include from most units 2022-04-06 14:31:55 +02:00
trace-events
trace.h