Re: [RFC PATCH v2 1/2] hw/riscv: sifive_u: Add file-backed OTP.

2020-08-18 Thread Green Wan
Hi Alistair, You're right. I can get drive without -device. Now it looks much better. Sent v3 patch. Thanks a lot, - Green On Fri, Aug 14, 2020 at 5:34 AM Alistair Francis wrote: > On Wed, Aug 12, 2020 at 9:12 PM Green Wan wrote: > > > > Hi Alistair, > > > > Thanks for the feedback and tips.

Re: [RFC PATCH v2 1/2] hw/riscv: sifive_u: Add file-backed OTP.

2020-08-13 Thread Alistair Francis
On Wed, Aug 12, 2020 at 9:12 PM Green Wan wrote: > > Hi Alistair, > > Thanks for the feedback and tips. Not sure whether I get it right. I gave a > try with -drive and -device options as below. > > $ qemu-system-riscv64 -M sifive_u -drive if=none,format=raw,file=otp.img > -device

Re: [RFC PATCH v2 1/2] hw/riscv: sifive_u: Add file-backed OTP.

2020-08-12 Thread Green Wan
Hi Alistair, Thanks for the feedback and tips. Not sure whether I get it right. I gave a try with -drive and -device options as below. $ qemu-system-riscv64 -M sifive_u -drive if=none,format=raw,file=otp.img -device riscv.sifive.u.otp qemu-system-riscv64: -device riscv.sifive.u.otp: Parameter

Re: [RFC PATCH v2 1/2] hw/riscv: sifive_u: Add file-backed OTP.

2020-08-10 Thread Alistair Francis
,()On Thu, Jul 30, 2020 at 7:49 PM Green Wan wrote: > > Add a file-backed implementation for OTP of sifive_u machine. The > machine property for file-backed is disabled in default. Do file > open, mmap and close for every OTP read/write in case keep the > update-to-date snapshot of OTP. I don't

[RFC PATCH v2 1/2] hw/riscv: sifive_u: Add file-backed OTP.

2020-07-30 Thread Green Wan
Add a file-backed implementation for OTP of sifive_u machine. The machine property for file-backed is disabled in default. Do file open, mmap and close for every OTP read/write in case keep the update-to-date snapshot of OTP. Signed-off-by: Green Wan --- hw/riscv/sifive_u.c | 26