diff options
| author | Peter Maydell <peter.maydell@linaro.org> | 2022-07-25 13:49:41 +0100 |
|---|---|---|
| committer | Peter Maydell <peter.maydell@linaro.org> | 2022-07-25 13:49:41 +0100 |
| commit | 616a6459d878999b37c7cfbf1ed8d4ca84b3751f (patch) | |
| tree | 298a156beaf064924fe109524932123bc0b369eb /hw/nios2/boot.c | |
| parent | 5288bee45fbd33203b61f8c76e41b15bb5913e6e (diff) | |
| parent | 67f7e426e53833a5db75b0d813e8d537b8a75bd2 (diff) | |
| download | focaccia-qemu-616a6459d878999b37c7cfbf1ed8d4ca84b3751f.tar.gz focaccia-qemu-616a6459d878999b37c7cfbf1ed8d4ca84b3751f.zip | |
Merge tag 'for-upstream2' of https://gitlab.com/bonzini/qemu into staging
* Bug fixes * Pass random seed to x86 and other FDT platforms # gpg: Signature made Fri 22 Jul 2022 18:26:45 BST # gpg: using RSA key F13338574B662389866C7682BFFBD25F78C7AE83 # gpg: issuer "pbonzini@redhat.com" # gpg: Good signature from "Paolo Bonzini <bonzini@gnu.org>" [full] # gpg: aka "Paolo Bonzini <pbonzini@redhat.com>" [full] # Primary key fingerprint: 46F5 9FBD 57D6 12E7 BFD4 E2F7 7E15 100C CD36 69B1 # Subkey fingerprint: F133 3857 4B66 2389 866C 7682 BFFB D25F 78C7 AE83 * tag 'for-upstream2' of https://gitlab.com/bonzini/qemu: hw/i386: pass RNG seed via setup_data entry hw/rx: pass random seed to fdt hw/mips: boston: pass random seed to fdt hw/nios2: virt: pass random seed to fdt oss-fuzz: ensure base_copy is a generic-fuzzer oss-fuzz: remove binaries from qemu-bundle tree accel/kvm: Avoid Coverity warning in query_stats() docs: Add caveats for Windows as the build platform Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'hw/nios2/boot.c')
| -rw-r--r-- | hw/nios2/boot.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/hw/nios2/boot.c b/hw/nios2/boot.c index 07b8d87633..21cbffff47 100644 --- a/hw/nios2/boot.c +++ b/hw/nios2/boot.c @@ -34,6 +34,7 @@ #include "qemu/option.h" #include "qemu/config-file.h" #include "qemu/error-report.h" +#include "qemu/guest-random.h" #include "sysemu/device_tree.h" #include "sysemu/reset.h" #include "hw/boards.h" @@ -83,6 +84,7 @@ static int nios2_load_dtb(struct nios2_boot_info bi, const uint32_t ramsize, int fdt_size; void *fdt = NULL; int r; + uint8_t rng_seed[32]; if (dtb_filename) { fdt = load_device_tree(dtb_filename, &fdt_size); @@ -91,6 +93,9 @@ static int nios2_load_dtb(struct nios2_boot_info bi, const uint32_t ramsize, return 0; } + qemu_guest_getrandom_nofail(rng_seed, sizeof(rng_seed)); + qemu_fdt_setprop(fdt, "/chosen", "rng-seed", rng_seed, sizeof(rng_seed)); + if (kernel_cmdline) { r = qemu_fdt_setprop_string(fdt, "/chosen", "bootargs", kernel_cmdline); |