qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [RFC PATCH v6 0/2] Add file-backed and write-once features to OTP
@ 2020-09-28 10:11 Green Wan
  2020-09-28 10:11 ` [RFC PATCH v6 1/2] hw/misc/sifive_u_otp: Add write function and write-once protection Green Wan
                   ` (3 more replies)
  0 siblings, 4 replies; 10+ messages in thread
From: Green Wan @ 2020-09-28 10:11 UTC (permalink / raw)
  Cc: alistair23, bmeng.cn, qemu-riscv, qemu-devel, Green Wan

Changelogs:
v5 to v6:
 - Rebase to latest. (sifive_u_otp.* are moved to hw/misc)
 - Put the example command to commit message.
 - Refine errp handle when check backend drive.
 - Remove unnecessary debug message.

v4 to v5:
 - Change the patch order
 - Add write operation to update pdin to fuse[] bit by bit 
 - Fix wrong protection for offset 0x0~0x38
 - Add SIFIVE_U_OTP_PWE_EN definition
 - Refine access macro for fuse[] and fuse_wo[]

Summary of Patches 
 - First patch is to add write opertion to update pdin data to fuse[] bit
   by bit. Add 'write-once' feature to block second write to same bit of
   the OTP memory.

 - Second 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'

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

Green Wan (2):
  hw/misc/sifive_u_otp: Add write function and write-once protection
  hw/misc/sifive_u_otp: Add backend drive support

 hw/misc/sifive_u_otp.c         | 81 +++++++++++++++++++++++++++++++++-
 include/hw/misc/sifive_u_otp.h |  5 +++
 2 files changed, 85 insertions(+), 1 deletion(-)

-- 
2.17.1



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

end of thread, other threads:[~2020-10-15  2:10 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-09-28 10:11 [RFC PATCH v6 0/2] Add file-backed and write-once features to OTP Green Wan
2020-09-28 10:11 ` [RFC PATCH v6 1/2] hw/misc/sifive_u_otp: Add write function and write-once protection Green Wan
2020-10-14  5:37   ` Bin Meng
2020-10-14  7:02     ` Green Wan
2020-10-14  7:17       ` Bin Meng
2020-10-15  2:09         ` Green Wan
2020-09-28 10:11 ` [RFC PATCH v6 2/2] hw/misc/sifive_u_otp: Add backend drive support Green Wan
2020-10-14  5:41   ` Bin Meng
2020-09-28 11:43 ` [RFC PATCH v6 0/2] Add file-backed and write-once features to OTP no-reply
2020-10-13 10:51 ` 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).