u-boot/drivers
Andre Przywara 45c4b276f0 virtio: rng: gracefully handle 0 byte returns
According to the virtio v1.x "entropy device" specification, a virtio-rng
device is supposed to always return at least one byte of entropy.
However the virtio v0.9 spec does not mention such a requirement.

The Arm Fixed Virtual Platform (FVP) implementation of virtio-rng always
returns 8 bytes less of entropy than requested. If 8 bytes or less are
requested, it will return 0 bytes.
This behaviour makes U-Boot's virtio_rng_read() implementation go into an
endless loop, hanging the system.

Work around this problem by always requesting 8 bytes more than needed,
but only if a previous call to virtqueue_get_buf() returned 0 bytes.

This should never trigger on a v1.x spec compliant implementation, but
fixes the hang on the Arm FVP.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Reported-by: Peter Hoyes <peter.hoyes@arm.com>
2023-11-17 11:58:26 -05:00
..
adc dm: adc: imx93-adc depends on ADC (fix boot) 2023-10-18 10:02:49 +02:00
ata bootstd: Skip over bad device during bootflows scanning 2023-11-10 11:01:50 -05:00
axi
bios_emulator
block rockchip: block: blk-uclass: add bounce buffer flag to blk_desc 2023-10-24 15:55:17 +08:00
bootcount bootcount: Add driver model I2C driver 2023-10-31 09:09:04 +01:00
bus
button
cache
clk clk: sunxi: Use the right symbol in the Makefile 2023-11-12 16:46:16 +00:00
core dm: Do not enable debug messages by default 2023-11-14 20:04:01 -07:00
cpu
crypto Kconfig: Remove all default n/no options 2023-10-30 15:32:49 -04:00
ddr
demo
dfu dfu: mmc: Add support for exposing whole mmc device 2023-10-31 14:53:05 +01:00
dma tree-wide: Replace http:// link with https:// link for ti.com 2023-11-10 11:01:50 -05:00
extcon
fastboot
firmware tree-wide: Replace http:// link with https:// link for ti.com 2023-11-10 11:01:50 -05:00
fpga arm64: zynqmp: Fix Siva's email address format 2023-10-09 10:25:32 +02:00
fuzz
fwu-mdata
gpio tree-wide: Replace http:// link with https:// link for ti.com 2023-11-10 11:01:50 -05:00
hwspinlock
i2c i2c: Implement i2c_get_chip_by_phandle() 2023-10-31 09:08:51 +01:00
input input: avoid NULL dereference 2023-10-11 10:35:24 -04:00
iommu
led
mailbox tree-wide: Replace http:// link with https:// link for ti.com 2023-11-10 11:01:50 -05:00
memory tree-wide: Replace http:// link with https:// link for ti.com 2023-11-10 11:01:50 -05:00
mfd
misc Merge branch '2023-11-10-assorted-fixes' 2023-11-10 11:01:51 -05:00
mmc sunxi: mmc: Sort compatible strings numerically 2023-11-12 16:46:32 +00:00
mtd tree-wide: Replace http:// link with https:// link for ti.com 2023-11-10 11:01:50 -05:00
mux tree-wide: Replace http:// link with https:// link for ti.com 2023-11-10 11:01:50 -05:00
net net: sun8i_emac: Drop DM_GPIO checks 2023-11-12 16:45:03 +00:00
nvme blk: Use a macro for the typical block size 2023-10-10 16:19:29 -04:00
pch
pci Merge tag 'u-boot-rockchip-20231007' of https://source.denx.de/u-boot/custodians/u-boot-rockchip 2023-10-08 09:58:55 -04:00
pci_endpoint
phy tree-wide: Replace http:// link with https:// link for ti.com 2023-11-10 11:01:50 -05:00
pinctrl pinctrl: sunxi: Avoid using .bss for SPL 2023-11-12 16:46:46 +00:00
power power: regulator: add AXP313 support 2023-11-12 16:47:16 +00:00
pwm
qe
ram tree-wide: Replace http:// link with https:// link for ti.com 2023-11-10 11:01:50 -05:00
reboot-mode
remoteproc tree-wide: Replace http:// link with https:// link for ti.com 2023-11-10 11:01:50 -05:00
reset tree-wide: Replace http:// link with https:// link for ti.com 2023-11-10 11:01:50 -05:00
rng rng: Add StarFive JH7110 RNG driver 2023-11-02 17:45:53 +08:00
rtc
scsi scsi: Have scsi_init_dev_desc_priv() use memset 2023-11-10 10:59:24 -05:00
serial tree-wide: Replace http:// link with https:// link for ti.com 2023-11-10 11:01:50 -05:00
sm drivers: sm: bind child sm devices in the device tree 2023-11-06 09:45:47 +01:00
smem
soc tree-wide: Replace http:// link with https:// link for ti.com 2023-11-10 11:01:50 -05:00
sound
spi tree-wide: Replace http:// link with https:// link for ti.com 2023-11-10 11:01:50 -05:00
spmi
sysinfo
sysreset tree-wide: Replace http:// link with https:// link for ti.com 2023-11-10 11:01:50 -05:00
tee
thermal tree-wide: Replace http:// link with https:// link for ti.com 2023-11-10 11:01:50 -05:00
timer
tpm tpm: sandbox: Update for needed TPM2 capabilities 2023-10-27 13:08:25 +03:00
ufs tree-wide: Replace http:// link with https:// link for ti.com 2023-11-10 11:01:50 -05:00
usb tree-wide: Replace http:// link with https:// link for ti.com 2023-11-10 11:01:50 -05:00
video Merge branch 'master' of https://source.denx.de/u-boot/custodians/u-boot-sunxi 2023-10-23 11:39:33 -04:00
virtio virtio: rng: gracefully handle 0 byte returns 2023-11-17 11:58:26 -05:00
w1
w1-eeprom
watchdog wdt: nuvoton: Fix reset/expire function error 2023-10-19 07:51:12 +02:00
xen
Kconfig drivers: introduce Secure Monitor uclass 2023-10-15 12:23:48 +02:00
Makefile sunxi: add R528/T113-s3/D1(s) DRAM initialisation code 2023-10-22 23:41:52 +01:00