qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [RFC PATCH v4 0/2] Add file-backed and write-once features to OTP
@ 2020-08-27  7:46 Green Wan
  2020-08-27  7:46 ` [RFC PATCH v4 1/2] hw/riscv: sifive_u: Add backend drive support Green Wan
  2020-08-27  7:46 ` [RFC PATCH v4 2/2] hw/riscv: sifive_u: Add write-once protection Green Wan
  0 siblings, 2 replies; 6+ messages in thread
From: Green Wan @ 2020-08-27  7:46 UTC (permalink / raw)
  Cc: qemu-riscv, Sagar Karandikar, Bastian Koppelmann, qemu-devel,
	Green Wan, Alistair Francis, Palmer Dabbelt, bmeng.cn

Based RFC v3 to fix:
 - Fix all nits-related
 - Use blk for blk_by_legacy_dinfo(dinfo) 
 - Move SET_WRITTEN_BIT out from else branch

Summary of Patches
 - First patch is to add file-backed implementation to allow users to use
   '-drive' to assign an OTP raw image file. OTP image file must be bigger
   than 16K.

       For example, '-drive if=none,format=raw,file=otp.img'

 - Second patch is to add 'write-once' feature to block second write to
   the OTP memory. Only keep the 'written' state for non-control register
   range from 0x38 to 16KB.

Testing
 - Tested on sifive_u for both qemu and u-boot.

Green Wan (2):
  hw/riscv: sifive_u: Add backend drive support
  hw/riscv: sifive_u: Add write-once protection

 hw/riscv/sifive_u_otp.c         | 71 +++++++++++++++++++++++++++++++++
 include/hw/riscv/sifive_u_otp.h |  3 ++
 2 files changed, 74 insertions(+)

-- 
2.17.1



^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2020-09-01  7:23 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-08-27  7:46 [RFC PATCH v4 0/2] Add file-backed and write-once features to OTP Green Wan
2020-08-27  7:46 ` [RFC PATCH v4 1/2] hw/riscv: sifive_u: Add backend drive support Green Wan
2020-08-28 12:54   ` Bin Meng
2020-09-01  7:22     ` Green Wan
2020-08-27  7:46 ` [RFC PATCH v4 2/2] hw/riscv: sifive_u: Add write-once protection Green Wan
2020-08-28 13:08   ` Bin Meng

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).