[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[RFC PATCH 0/2] Add write-once and file-backed features to OTP

From: Green Wan
Subject: [RFC PATCH 0/2] Add write-once and file-backed features to OTP
Date: Fri, 24 Jul 2020 17:51:10 +0800

Add file-backed implementation to allow users to assign an OTP image
file to machine. If '-boot otp-file=filename' is specified, OTP 
device uses otp image file instead of fuse array. In order to keep data
up-to-date due to unexpected crash or CTRL+a-x, every read/write to OTP
memory involves file open, mmap and close operation to the image file.

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

Tested on sifive_u for both qemu and u-boot.

Green Wan (2):
  hw/riscv: sifive_u: Add file-backed OTP. softmmu/vl: add otp-file to
    boot option
  hw/riscv: sifive_u: Add write-once protection.

 hw/riscv/sifive_u_otp.c         | 122 ++++++++++++++++++++++++++++++--
 include/hw/riscv/sifive_u_otp.h |   3 +
 qemu-options.hx                 |   3 +-
 softmmu/vl.c                    |   6 +-
 4 files changed, 128 insertions(+), 6 deletions(-)


reply via email to

[Prev in Thread] Current Thread [Next in Thread]