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

Based RFC v4 to fix:
 - 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/riscv: sifive_u: Add write operation and write-once protection
  hw/riscv: sifive_u: Add backend drive support

 hw/riscv/sifive_u_otp.c         | 80 ++++++++++++++++++++++++++++++++-
 include/hw/riscv/sifive_u_otp.h |  5 +++
 2 files changed, 84 insertions(+), 1 deletion(-)

-- 
2.17.1



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

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

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-09-01 15:47 [RFC PATCH v5 0/2] Add file-backed and write-once features to OTP Green Wan
2020-09-01 15:47 ` [RFC PATCH v5 1/2] hw/riscv: sifive_u: Add write operation and write-once protection Green Wan
2020-09-25 21:34   ` Alistair Francis
2020-09-01 15:47 ` [RFC PATCH v5 2/2] hw/riscv: sifive_u: Add backend drive support Green Wan
2020-09-25 21:40   ` Alistair Francis
2020-09-28  9:18     ` Green Wan
2020-09-29 16:57       ` Alistair Francis
2020-09-30  7:10         ` Green Wan
2020-10-14 14:35           ` Alistair Francis
2020-10-14 15:02             ` Bin Meng
2020-10-14 18:39               ` Alistair Francis
2020-10-15  2:19                 ` Green Wan
2020-10-15  6:31                 ` 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).