qemu-e2k/hw/misc
Green Wan 51b6c1bbc3 hw/misc/sifive_u_otp: Add backend drive support
Add '-drive' support to OTP device. Allow users to assign a raw file
as OTP image.

test commands for 16k otp.img filled with zero:

$ dd if=/dev/zero of=./otp.img bs=1k count=16
$ ./qemu-system-riscv64 -M sifive_u -m 256M -nographic -bios none \
-kernel ../opensbi/build/platform/sifive/fu540/firmware/fw_payload.elf \
-d guest_errors -drive if=none,format=raw,file=otp.img

Signed-off-by: Green Wan <green.wan@sifive.com>
Reviewed-by: Bin Meng <bin.meng@windriver.com>
Tested-by: Bin Meng <bin.meng@windriver.com>
Acked-by: Alistair Francis <alistair.francis@wdc.com>
Message-id: 20201020033732.12921-3-green.wan@sifive.com
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
2020-10-22 12:00:50 -07:00
..
macio macio: don't reference serial_hd() directly within the device 2020-10-18 16:21:42 +01:00
a9scu.c hw/misc/a9scu: Report unimplemented accesses with qemu_log_mask(UNIMP) 2020-09-14 14:23:19 +01:00
allwinner-cpucfg.c hw/arm/allwinner: add CPU Configuration module 2020-03-12 16:27:33 +00:00
allwinner-h3-ccu.c hw/arm/allwinner-h3: add Clock Control Unit 2020-03-12 16:27:33 +00:00
allwinner-h3-dramc.c hw/misc/allwinner-h3-dramc: enforce 64-bit multiply when calculating row mirror address 2020-03-30 13:18:58 +01:00
allwinner-h3-sysctrl.c hw/arm/allwinner-h3: add System Control module 2020-03-12 16:27:33 +00:00
allwinner-sid.c hw/arm/allwinner: add Security Identifier device 2020-03-12 16:27:33 +00:00
applesmc.c Use OBJECT_DECLARE_SIMPLE_TYPE when possible 2020-09-18 14:12:32 -04:00
arm11scu.c qdev: set properties with device_class_set_props() 2020-01-24 20:59:15 +01:00
arm_integrator_debug.c Use OBJECT_DECLARE_SIMPLE_TYPE when possible 2020-09-18 14:12:32 -04:00
arm_l2x0.c Use OBJECT_DECLARE_SIMPLE_TYPE when possible 2020-09-18 14:12:32 -04:00
arm_sysctl.c Use OBJECT_DECLARE_SIMPLE_TYPE when possible 2020-09-18 14:12:32 -04:00
armsse-cpuid.c qdev: set properties with device_class_set_props() 2020-01-24 20:59:15 +01:00
armsse-mhu.c
aspeed_scu.c misc: aspeed_scu: Update AST2600 silicon id register 2020-09-18 09:04:36 +02:00
aspeed_sdmc.c aspeed/sdmc: Simplify calculation of RAM bits 2020-09-01 14:21:51 +02:00
aspeed_xdma.c
auxbus.c auxbus: Move QOM macros to header 2020-08-27 14:04:55 -04:00
avr_power.c hw/misc: avr: Add limited support for power reduction device 2020-07-11 11:02:05 +02:00
bcm2835_mbox.c qom: Don't handle impossible object_property_get_link() failure 2020-07-10 15:18:08 +02:00
bcm2835_mphi.c raspi: add BCM2835 SOC MPHI emulation 2020-06-05 17:23:09 +01:00
bcm2835_property.c qom: Don't handle impossible object_property_get_link() failure 2020-07-10 15:18:08 +02:00
bcm2835_rng.c
bcm2835_thermal.c hw/misc/bcm2835_thermal: Add a dummy BCM2835 thermal sensor 2019-10-25 13:09:27 +01:00
cbus.c
debugexit.c Use OBJECT_DECLARE_SIMPLE_TYPE when possible 2020-09-18 14:12:32 -04:00
eccmemctl.c Use OBJECT_DECLARE_SIMPLE_TYPE when possible 2020-09-18 14:12:32 -04:00
edu.c qemu/atomic.h: rename atomic_ to qatomic_ 2020-09-23 16:07:44 +01:00
empty_slot.c Use OBJECT_DECLARE_SIMPLE_TYPE when possible 2020-09-18 14:12:32 -04:00
exynos4210_clk.c Use OBJECT_DECLARE_SIMPLE_TYPE when possible 2020-09-18 14:12:32 -04:00
exynos4210_pmu.c Use OBJECT_DECLARE_SIMPLE_TYPE when possible 2020-09-18 14:12:32 -04:00
exynos4210_rng.c Use OBJECT_DECLARE_SIMPLE_TYPE when possible 2020-09-18 14:12:32 -04:00
grlib_ahb_apb_pnp.c hw/misc/grlib_ahb_apb_pnp: Add trace events on read accesses 2020-06-09 09:21:10 +02:00
imx6_ccm.c
imx6_src.c
imx6ul_ccm.c hw/misc/imx6ul_ccm: Implement non writable bits in CCM registers 2020-06-16 10:32:28 +01:00
imx7_ccm.c
imx7_gpr.c
imx7_snvs.c
imx25_ccm.c
imx31_ccm.c
imx_ccm.c imx_ccm: Rename IMX_GET_CLASS macro 2020-09-02 07:29:25 -04:00
imx_rngc.c i.MX: add an emulation for RNGC 2020-01-17 14:27:16 +00:00
iotkit-secctl.c hw/misc/iotkit-secctl: Fix writing to 'PPC Interrupt Clear' register 2020-02-21 16:07:00 +00:00
iotkit-sysctl.c qom: simplify object_find_property / object_class_find_property 2020-09-22 16:45:16 -04:00
iotkit-sysinfo.c qdev: set properties with device_class_set_props() 2020-01-24 20:59:15 +01:00
ivshmem.c Use DECLARE_*CHECKER* macros 2020-09-09 09:27:09 -04:00
Kconfig hw/riscv: Move sifive_test model to hw/misc 2020-09-09 15:54:19 -07:00
mac_via.c mos6522: Rename QOM macros 2020-09-02 07:29:25 -04:00
max111x.c hw/misc/max111x: Create header file for documentation, TYPE_ macros 2020-07-03 16:59:45 +01:00
meson.build hw/misc: Add NPCM7xx Clock Controller device model 2020-09-14 14:24:58 +01:00
milkymist-hpdmc.c Use OBJECT_DECLARE_SIMPLE_TYPE when possible 2020-09-18 14:12:32 -04:00
milkymist-pfpu.c Use OBJECT_DECLARE_SIMPLE_TYPE when possible 2020-09-18 14:12:32 -04:00
mips_cmgcr.c qdev: set properties with device_class_set_props() 2020-01-24 20:59:15 +01:00
mips_cpc.c hw/misc/mips_cpc: Start vCPU when powered on 2020-10-09 17:27:55 +01:00
mips_itu.c qdev: set properties with device_class_set_props() 2020-01-24 20:59:15 +01:00
mos6522.c mos6522: Rename QOM macros 2020-09-02 07:29:25 -04:00
mps2-fpgaio.c qdev: set properties with device_class_set_props() 2020-01-24 20:59:15 +01:00
mps2-scc.c qdev: set properties with device_class_set_props() 2020-01-24 20:59:15 +01:00
msf2-sysreg.c qdev: set properties with device_class_set_props() 2020-01-24 20:59:15 +01:00
mst_fpga.c Use OBJECT_DECLARE_SIMPLE_TYPE when possible 2020-09-18 14:12:32 -04:00
npcm7xx_clk.c hw/misc: Add NPCM7xx Clock Controller device model 2020-09-14 14:24:58 +01:00
npcm7xx_gcr.c hw/misc: Add NPCM7xx System Global Control Registers device model 2020-09-14 14:24:15 +01:00
nrf51_rng.c qdev: set properties with device_class_set_props() 2020-01-24 20:59:15 +01:00
omap_clk.c
omap_gpmc.c
omap_l4.c misc: Replace zero-length arrays with flexible array member (automatic) 2020-03-16 22:07:42 +01:00
omap_sdrc.c
omap_tap.c
pc-testdev.c Use OBJECT_DECLARE_SIMPLE_TYPE when possible 2020-09-18 14:12:32 -04:00
pca9552.c Use DECLARE_*CHECKER* macros 2020-09-09 09:27:09 -04:00
pci-testdev.c Use OBJECT_DECLARE_SIMPLE_TYPE when possible 2020-09-18 14:12:32 -04:00
puv3_pm.c Use OBJECT_DECLARE_SIMPLE_TYPE when possible 2020-09-18 14:12:32 -04:00
pvpanic.c Use DECLARE_*CHECKER* macros 2020-09-09 09:27:09 -04:00
sbsa_ec.c hw/misc/sbsa_ec : Add an embedded controller for sbsa-ref 2020-09-01 14:01:12 +01:00
sga.c Use OBJECT_DECLARE_SIMPLE_TYPE when possible 2020-09-18 14:12:32 -04:00
sifive_e_prci.c hw/riscv: Move sifive_e_prci model to hw/misc 2020-09-09 15:54:19 -07:00
sifive_test.c hw/riscv: Move sifive_test model to hw/misc 2020-09-09 15:54:19 -07:00
sifive_u_otp.c hw/misc/sifive_u_otp: Add backend drive support 2020-10-22 12:00:50 -07:00
sifive_u_prci.c hw/riscv: Move sifive_u_prci model to hw/misc 2020-09-09 15:54:19 -07:00
slavio_misc.c Use OBJECT_DECLARE_SIMPLE_TYPE when possible 2020-09-18 14:12:32 -04:00
stm32f2xx_syscfg.c
stm32f4xx_exti.c hw/misc: Add the STM32F4xx EXTI device 2020-01-17 14:09:29 +00:00
stm32f4xx_syscfg.c hw/misc/stm32f4xx_syscfg: Fix copy/paste error 2020-01-23 15:34:04 +00:00
tmp105.c error: Eliminate error_propagate() with Coccinelle, part 1 2020-07-10 15:18:08 +02:00
tmp105.h Use OBJECT_DECLARE_SIMPLE_TYPE when possible 2020-09-18 14:12:32 -04:00
tmp421.c Use OBJECT_DECLARE_TYPE when possible 2020-09-18 14:12:32 -04:00
trace-events hw/misc: Add NPCM7xx Clock Controller device model 2020-09-14 14:24:58 +01:00
trace.h trace: switch position of headers to what Meson requires 2020-08-21 06:18:24 -04:00
tz-mpc.c qdev: set properties with device_class_set_props() 2020-01-24 20:59:15 +01:00
tz-msc.c qdev: set properties with device_class_set_props() 2020-01-24 20:59:15 +01:00
tz-ppc.c qdev: set properties with device_class_set_props() 2020-01-24 20:59:15 +01:00
unimp.c hw/misc/unimp: Display the offset with width of the region size 2020-08-28 10:02:46 +01:00
vmcoreinfo.c hw/misc/vmcoreinfo: Add comment about reset handler 2019-10-15 18:18:08 -03:00
zynq_slcr.c Use OBJECT_DECLARE_SIMPLE_TYPE when possible 2020-09-18 14:12:32 -04:00
zynq-xadc.c