Message ID | 20200928101146.12786-1-green.wan@sifive.com |
---|---|
Headers | show |
Series | Add file-backed and write-once features to OTP | expand |
Patchew URL: https://patchew.org/QEMU/20200928101146.12786-1-green.wan@sifive.com/ Hi, This series failed the docker-quick@centos7 build test. Please find the testing commands and their output below. If you have Docker installed, you can probably reproduce it locally. === TEST SCRIPT BEGIN === #!/bin/bash make docker-image-centos7 V=1 NETWORK=1 time make docker-test-quick@centos7 SHOW_ENV=1 J=14 NETWORK=1 === TEST SCRIPT END === C linker for the host machine: cc ld.bfd 2.27-43 Host machine cpu family: x86_64 Host machine cpu: x86_64 ../src/meson.build:10: WARNING: Module unstable-keyval has no backwards or forwards compatibility and might not exist in future releases. Program sh found: YES Program python3 found: YES (/usr/bin/python3) Configuring ninjatool using configuration --- Using expected file 'tests/data/acpi/virt/DSDT.memhp' socket_accept failed: Resource temporarily unavailable ** ERROR:../src/tests/qtest/libqtest.c:301:qtest_init_without_qmp_handshake: assertion failed: (s->fd >= 0 && s->qmp_fd >= 0) ../src/tests/qtest/libqtest.c:166: kill_qemu() tried to terminate QEMU process but encountered exit status 1 (expected 0) ERROR qtest-x86_64: bios-tables-test - Bail out! ERROR:../src/tests/qtest/libqtest.c:301:qtest_init_without_qmp_handshake: assertion failed: (s->fd >= 0 && s->qmp_fd >= 0) TEST iotest-qcow2: 024 make: *** [run-test-138] Error 1 make: *** Waiting for unfinished jobs.... TEST iotest-qcow2: 025 TEST iotest-qcow2: 027 --- raise CalledProcessError(retcode, cmd) subprocess.CalledProcessError: Command '['sudo', '-n', 'docker', 'run', '--rm', '--label', 'com.qemu.instance.uuid=1a4351fb3f90489ebfca763b45f3d5e1', '-u', '1001', '--security-opt', 'seccomp=unconfined', '-e', 'TARGET_LIST=', '-e', 'EXTRA_CONFIGURE_OPTS=', '-e', 'V=', '-e', 'J=14', '-e', 'DEBUG=', '-e', 'SHOW_ENV=1', '-e', 'CCACHE_DIR=/var/tmp/ccache', '-v', '/home/patchew/.cache/qemu-docker-ccache:/var/tmp/ccache:z', '-v', '/var/tmp/patchew-tester-tmp-ku3zq5yz/src/docker-src.2020-09-28-07.25.33.19332:/var/tmp/qemu:z,ro', 'qemu/centos7', '/var/tmp/qemu/run', 'test-quick']' returned non-zero exit status 2. filter=--filter=label=com.qemu.instance.uuid=1a4351fb3f90489ebfca763b45f3d5e1 make[1]: *** [docker-run] Error 1 make[1]: Leaving directory `/var/tmp/patchew-tester-tmp-ku3zq5yz/src' make: *** [docker-run-test-quick@centos7] Error 2 real 17m35.301s user 0m15.921s The full log is available at http://patchew.org/logs/20200928101146.12786-1-green.wan@sifive.com/testing.docker-quick@centos7/?type=message. --- Email generated automatically by Patchew [https://patchew.org/]. Please send your feedback to patchew-devel@redhat.com
Hi Green, On Mon, Sep 28, 2020 at 6:11 PM Green Wan <green.wan@sifive.com> wrote: > > 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. > I will try to test this soon with a modified U-Boot. Regards, Bin
Hi Green, On Mon, Sep 28, 2020 at 6:12 PM Green Wan <green.wan@sifive.com> wrote: > > - Add write operation to update fuse data bit when PWE bit is on. > - Add array, fuse_wo, to store the 'written' status for all bits > of OTP to block the write operation. > > Signed-off-by: Green Wan <green.wan@sifive.com> > Reviewed-by: Alistair Francis <alistair.francis@wdc.com> > --- > hw/misc/sifive_u_otp.c | 30 +++++++++++++++++++++++++++++- > include/hw/misc/sifive_u_otp.h | 3 +++ > 2 files changed, 32 insertions(+), 1 deletion(-) > I am not sure how you tested this. I wrote a simple U-Boot command to call U-Boot sifive-otp driver to test the write functionality, but it failed. => misc write otp@10070000 0 80200000 10 => misc read otp@10070000 0 80400000 10 => md 80400000 80400000: ffffffff ffffffff ffffffff ffffffff ................ 80400010: 00000000 00000000 00000000 00000000 ................ 80400020: 00000000 00000000 00000000 00000000 ................ 80400030: 00000000 00000000 00000000 00000000 ................ 80400040: 00000000 00000000 00000000 00000000 ................ 80400050: 00000000 00000000 00000000 00000000 ................ 80400060: 00000000 00000000 00000000 00000000 ................ 80400070: 00000000 00000000 00000000 00000000 ................ 80400080: 00000000 00000000 00000000 00000000 ................ 80400090: 00000000 00000000 00000000 00000000 ................ 804000a0: 00000000 00000000 00000000 00000000 ................ 804000b0: 00000000 00000000 00000000 00000000 ................ 804000c0: 00000000 00000000 00000000 00000000 ................ 804000d0: 00000000 00000000 00000000 00000000 ................ 804000e0: 00000000 00000000 00000000 00000000 ................ 804000f0: 00000000 00000000 00000000 00000000 ................ => misc write otp@10070000 0 80200010 10 => misc read otp@10070000 0 80400010 10 => md 80400000 80400000: ffffffff ffffffff ffffffff ffffffff ................ 80400010: ffffffff ffffffff ffffffff ffffffff ................ 80400020: 00000000 00000000 00000000 00000000 ................ 80400030: 00000000 00000000 00000000 00000000 ................ 80400040: 00000000 00000000 00000000 00000000 ................ 80400050: 00000000 00000000 00000000 00000000 ................ 80400060: 00000000 00000000 00000000 00000000 ................ 80400070: 00000000 00000000 00000000 00000000 ................ 80400080: 00000000 00000000 00000000 00000000 ................ 80400090: 00000000 00000000 00000000 00000000 ................ 804000a0: 00000000 00000000 00000000 00000000 ................ 804000b0: 00000000 00000000 00000000 00000000 ................ 804000c0: 00000000 00000000 00000000 00000000 ................ 804000d0: 00000000 00000000 00000000 00000000 ................ 804000e0: 00000000 00000000 00000000 00000000 ................ 804000f0: 00000000 00000000 00000000 00000000 ................ But it can read the serial number at offset 0x3f0 => misc read otp@10070000 3f0 80400010 10 => md 80400000 80400000: ffffffff ffffffff ffffffff ffffffff ................ 80400010: 00000001 fffffffe ffffffff ffffffff ................ 80400020: 00000000 00000000 00000000 00000000 ................ 80400030: 00000000 00000000 00000000 00000000 ................ 80400040: 00000000 00000000 00000000 00000000 ................ 80400050: 00000000 00000000 00000000 00000000 ................ 80400060: 00000000 00000000 00000000 00000000 ................ 80400070: 00000000 00000000 00000000 00000000 ................ 80400080: 00000000 00000000 00000000 00000000 ................ 80400090: 00000000 00000000 00000000 00000000 ................ 804000a0: 00000000 00000000 00000000 00000000 ................ 804000b0: 00000000 00000000 00000000 00000000 ................ 804000c0: 00000000 00000000 00000000 00000000 ................ 804000d0: 00000000 00000000 00000000 00000000 ................ 804000e0: 00000000 00000000 00000000 00000000 ................ 804000f0: 00000000 00000000 00000000 00000000 ................ Regards, Bin
On Wed, Oct 14, 2020 at 1:37 PM Bin Meng <bmeng.cn@gmail.com> wrote: > > Hi Green, > > On Mon, Sep 28, 2020 at 6:12 PM Green Wan <green.wan@sifive.com> wrote: > > > > - Add write operation to update fuse data bit when PWE bit is on. > > - Add array, fuse_wo, to store the 'written' status for all bits > > of OTP to block the write operation. > > > > Signed-off-by: Green Wan <green.wan@sifive.com> > > Reviewed-by: Alistair Francis <alistair.francis@wdc.com> > > --- > > hw/misc/sifive_u_otp.c | 30 +++++++++++++++++++++++++++++- > > include/hw/misc/sifive_u_otp.h | 3 +++ > > 2 files changed, 32 insertions(+), 1 deletion(-) > > > > I am not sure how you tested this. I wrote a simple U-Boot command to > call U-Boot sifive-otp driver to test the write functionality, but it > failed. > > => misc write otp@10070000 0 80200000 10 ^^^^^^^^^ Quick ask, how about 'md 80200000'? I didn't use 'misc write' command. I can check afterward. > => misc read otp@10070000 0 80400000 10 > => md 80400000 > 80400000: ffffffff ffffffff ffffffff ffffffff ................ > 80400010: 00000000 00000000 00000000 00000000 ................ > 80400020: 00000000 00000000 00000000 00000000 ................ > 80400030: 00000000 00000000 00000000 00000000 ................ > 80400040: 00000000 00000000 00000000 00000000 ................ > 80400050: 00000000 00000000 00000000 00000000 ................ > 80400060: 00000000 00000000 00000000 00000000 ................ > 80400070: 00000000 00000000 00000000 00000000 ................ > 80400080: 00000000 00000000 00000000 00000000 ................ > 80400090: 00000000 00000000 00000000 00000000 ................ > 804000a0: 00000000 00000000 00000000 00000000 ................ > 804000b0: 00000000 00000000 00000000 00000000 ................ > 804000c0: 00000000 00000000 00000000 00000000 ................ > 804000d0: 00000000 00000000 00000000 00000000 ................ > 804000e0: 00000000 00000000 00000000 00000000 ................ > 804000f0: 00000000 00000000 00000000 00000000 ................ > => misc write otp@10070000 0 80200010 10 > => misc read otp@10070000 0 80400010 10 > => md 80400000 > 80400000: ffffffff ffffffff ffffffff ffffffff ................ > 80400010: ffffffff ffffffff ffffffff ffffffff ................ > 80400020: 00000000 00000000 00000000 00000000 ................ > 80400030: 00000000 00000000 00000000 00000000 ................ > 80400040: 00000000 00000000 00000000 00000000 ................ > 80400050: 00000000 00000000 00000000 00000000 ................ > 80400060: 00000000 00000000 00000000 00000000 ................ > 80400070: 00000000 00000000 00000000 00000000 ................ > 80400080: 00000000 00000000 00000000 00000000 ................ > 80400090: 00000000 00000000 00000000 00000000 ................ > 804000a0: 00000000 00000000 00000000 00000000 ................ > 804000b0: 00000000 00000000 00000000 00000000 ................ > 804000c0: 00000000 00000000 00000000 00000000 ................ > 804000d0: 00000000 00000000 00000000 00000000 ................ > 804000e0: 00000000 00000000 00000000 00000000 ................ > 804000f0: 00000000 00000000 00000000 00000000 ................ > > But it can read the serial number at offset 0x3f0 > > => misc read otp@10070000 3f0 80400010 10 > => md 80400000 > 80400000: ffffffff ffffffff ffffffff ffffffff ................ > 80400010: 00000001 fffffffe ffffffff ffffffff ................ > 80400020: 00000000 00000000 00000000 00000000 ................ > 80400030: 00000000 00000000 00000000 00000000 ................ > 80400040: 00000000 00000000 00000000 00000000 ................ > 80400050: 00000000 00000000 00000000 00000000 ................ > 80400060: 00000000 00000000 00000000 00000000 ................ > 80400070: 00000000 00000000 00000000 00000000 ................ > 80400080: 00000000 00000000 00000000 00000000 ................ > 80400090: 00000000 00000000 00000000 00000000 ................ > 804000a0: 00000000 00000000 00000000 00000000 ................ > 804000b0: 00000000 00000000 00000000 00000000 ................ > 804000c0: 00000000 00000000 00000000 00000000 ................ > 804000d0: 00000000 00000000 00000000 00000000 ................ > 804000e0: 00000000 00000000 00000000 00000000 ................ > 804000f0: 00000000 00000000 00000000 00000000 ................ > > Regards, > Bin
Hi Green, On Wed, Oct 14, 2020 at 3:02 PM Green Wan <green.wan@sifive.com> wrote: > > On Wed, Oct 14, 2020 at 1:37 PM Bin Meng <bmeng.cn@gmail.com> wrote: > > > > Hi Green, > > > > On Mon, Sep 28, 2020 at 6:12 PM Green Wan <green.wan@sifive.com> wrote: > > > > > > - Add write operation to update fuse data bit when PWE bit is on. > > > - Add array, fuse_wo, to store the 'written' status for all bits > > > of OTP to block the write operation. > > > > > > Signed-off-by: Green Wan <green.wan@sifive.com> > > > Reviewed-by: Alistair Francis <alistair.francis@wdc.com> > > > --- > > > hw/misc/sifive_u_otp.c | 30 +++++++++++++++++++++++++++++- > > > include/hw/misc/sifive_u_otp.h | 3 +++ > > > 2 files changed, 32 insertions(+), 1 deletion(-) > > > > > > > I am not sure how you tested this. I wrote a simple U-Boot command to > > call U-Boot sifive-otp driver to test the write functionality, but it > > failed. > > > > => misc write otp@10070000 0 80200000 10 > ^^^^^^^^^ > Quick ask, how about 'md 80200000'? > > I didn't use 'misc write' command. I can check afterward. Note 'misc write' is a new U-Boot command I just added for testing this QEMU functionality. Please use the U-Boot patch below: http://patchwork.ozlabs.org/project/uboot/patch/1602657292-82815-1-git-send-email-bmeng.cn@gmail.com/ > > > => misc read otp@10070000 0 80400000 10 > > => md 80400000 > > 80400000: ffffffff ffffffff ffffffff ffffffff ................ > > 80400010: 00000000 00000000 00000000 00000000 ................ > > 80400020: 00000000 00000000 00000000 00000000 ................ > > 80400030: 00000000 00000000 00000000 00000000 ................ > > 80400040: 00000000 00000000 00000000 00000000 ................ > > 80400050: 00000000 00000000 00000000 00000000 ................ > > 80400060: 00000000 00000000 00000000 00000000 ................ > > 80400070: 00000000 00000000 00000000 00000000 ................ > > 80400080: 00000000 00000000 00000000 00000000 ................ > > 80400090: 00000000 00000000 00000000 00000000 ................ > > 804000a0: 00000000 00000000 00000000 00000000 ................ > > 804000b0: 00000000 00000000 00000000 00000000 ................ > > 804000c0: 00000000 00000000 00000000 00000000 ................ > > 804000d0: 00000000 00000000 00000000 00000000 ................ > > 804000e0: 00000000 00000000 00000000 00000000 ................ > > 804000f0: 00000000 00000000 00000000 00000000 ................ > > => misc write otp@10070000 0 80200010 10 > > => misc read otp@10070000 0 80400010 10 > > => md 80400000 > > 80400000: ffffffff ffffffff ffffffff ffffffff ................ > > 80400010: ffffffff ffffffff ffffffff ffffffff ................ > > 80400020: 00000000 00000000 00000000 00000000 ................ > > 80400030: 00000000 00000000 00000000 00000000 ................ > > 80400040: 00000000 00000000 00000000 00000000 ................ > > 80400050: 00000000 00000000 00000000 00000000 ................ > > 80400060: 00000000 00000000 00000000 00000000 ................ > > 80400070: 00000000 00000000 00000000 00000000 ................ > > 80400080: 00000000 00000000 00000000 00000000 ................ > > 80400090: 00000000 00000000 00000000 00000000 ................ > > 804000a0: 00000000 00000000 00000000 00000000 ................ > > 804000b0: 00000000 00000000 00000000 00000000 ................ > > 804000c0: 00000000 00000000 00000000 00000000 ................ > > 804000d0: 00000000 00000000 00000000 00000000 ................ > > 804000e0: 00000000 00000000 00000000 00000000 ................ > > 804000f0: 00000000 00000000 00000000 00000000 ................ > > > > But it can read the serial number at offset 0x3f0 > > > > => misc read otp@10070000 3f0 80400010 10 > > => md 80400000 > > 80400000: ffffffff ffffffff ffffffff ffffffff ................ > > 80400010: 00000001 fffffffe ffffffff ffffffff ................ > > 80400020: 00000000 00000000 00000000 00000000 ................ > > 80400030: 00000000 00000000 00000000 00000000 ................ > > 80400040: 00000000 00000000 00000000 00000000 ................ > > 80400050: 00000000 00000000 00000000 00000000 ................ > > 80400060: 00000000 00000000 00000000 00000000 ................ > > 80400070: 00000000 00000000 00000000 00000000 ................ > > 80400080: 00000000 00000000 00000000 00000000 ................ > > 80400090: 00000000 00000000 00000000 00000000 ................ > > 804000a0: 00000000 00000000 00000000 00000000 ................ > > 804000b0: 00000000 00000000 00000000 00000000 ................ > > 804000c0: 00000000 00000000 00000000 00000000 ................ > > 804000d0: 00000000 00000000 00000000 00000000 ................ > > 804000e0: 00000000 00000000 00000000 00000000 ................ > > 804000f0: 00000000 00000000 00000000 00000000 ................ Regards, Bin
On Wed, Oct 14, 2020 at 3:17 PM Bin Meng <bmeng.cn@gmail.com> wrote: > > Hi Green, > > On Wed, Oct 14, 2020 at 3:02 PM Green Wan <green.wan@sifive.com> wrote: > > > > On Wed, Oct 14, 2020 at 1:37 PM Bin Meng <bmeng.cn@gmail.com> wrote: > > > > > > Hi Green, > > > > > > On Mon, Sep 28, 2020 at 6:12 PM Green Wan <green.wan@sifive.com> wrote: > > > > > > > > - Add write operation to update fuse data bit when PWE bit is on. > > > > - Add array, fuse_wo, to store the 'written' status for all bits > > > > of OTP to block the write operation. > > > > > > > > Signed-off-by: Green Wan <green.wan@sifive.com> > > > > Reviewed-by: Alistair Francis <alistair.francis@wdc.com> > > > > --- > > > > hw/misc/sifive_u_otp.c | 30 +++++++++++++++++++++++++++++- > > > > include/hw/misc/sifive_u_otp.h | 3 +++ > > > > 2 files changed, 32 insertions(+), 1 deletion(-) > > > > > > > > > > I am not sure how you tested this. I wrote a simple U-Boot command to > > > call U-Boot sifive-otp driver to test the write functionality, but it > > > failed. > > > > > > => misc write otp@10070000 0 80200000 10 > > ^^^^^^^^^ > > Quick ask, how about 'md 80200000'? > > > > I didn't use 'misc write' command. I can check afterward. > > Note 'misc write' is a new U-Boot command I just added for testing > this QEMU functionality. Please use the U-Boot patch below: > http://patchwork.ozlabs.org/project/uboot/patch/1602657292-82815-1-git-send-email-bmeng.cn@gmail.com/ > Thanks for pointing it out. I've found one bug when I revise the macro of the write function and the read is correct. It's my mistake. I will include and rerun this test as well. > > > > > => misc read otp@10070000 0 80400000 10 > > > => md 80400000 > > > 80400000: ffffffff ffffffff ffffffff ffffffff ................ > > > 80400010: 00000000 00000000 00000000 00000000 ................ > > > 80400020: 00000000 00000000 00000000 00000000 ................ > > > 80400030: 00000000 00000000 00000000 00000000 ................ > > > 80400040: 00000000 00000000 00000000 00000000 ................ > > > 80400050: 00000000 00000000 00000000 00000000 ................ > > > 80400060: 00000000 00000000 00000000 00000000 ................ > > > 80400070: 00000000 00000000 00000000 00000000 ................ > > > 80400080: 00000000 00000000 00000000 00000000 ................ > > > 80400090: 00000000 00000000 00000000 00000000 ................ > > > 804000a0: 00000000 00000000 00000000 00000000 ................ > > > 804000b0: 00000000 00000000 00000000 00000000 ................ > > > 804000c0: 00000000 00000000 00000000 00000000 ................ > > > 804000d0: 00000000 00000000 00000000 00000000 ................ > > > 804000e0: 00000000 00000000 00000000 00000000 ................ > > > 804000f0: 00000000 00000000 00000000 00000000 ................ > > > => misc write otp@10070000 0 80200010 10 > > > => misc read otp@10070000 0 80400010 10 > > > => md 80400000 > > > 80400000: ffffffff ffffffff ffffffff ffffffff ................ > > > 80400010: ffffffff ffffffff ffffffff ffffffff ................ > > > 80400020: 00000000 00000000 00000000 00000000 ................ > > > 80400030: 00000000 00000000 00000000 00000000 ................ > > > 80400040: 00000000 00000000 00000000 00000000 ................ > > > 80400050: 00000000 00000000 00000000 00000000 ................ > > > 80400060: 00000000 00000000 00000000 00000000 ................ > > > 80400070: 00000000 00000000 00000000 00000000 ................ > > > 80400080: 00000000 00000000 00000000 00000000 ................ > > > 80400090: 00000000 00000000 00000000 00000000 ................ > > > 804000a0: 00000000 00000000 00000000 00000000 ................ > > > 804000b0: 00000000 00000000 00000000 00000000 ................ > > > 804000c0: 00000000 00000000 00000000 00000000 ................ > > > 804000d0: 00000000 00000000 00000000 00000000 ................ > > > 804000e0: 00000000 00000000 00000000 00000000 ................ > > > 804000f0: 00000000 00000000 00000000 00000000 ................ > > > > > > But it can read the serial number at offset 0x3f0 > > > > > > => misc read otp@10070000 3f0 80400010 10 > > > => md 80400000 > > > 80400000: ffffffff ffffffff ffffffff ffffffff ................ > > > 80400010: 00000001 fffffffe ffffffff ffffffff ................ > > > 80400020: 00000000 00000000 00000000 00000000 ................ > > > 80400030: 00000000 00000000 00000000 00000000 ................ > > > 80400040: 00000000 00000000 00000000 00000000 ................ > > > 80400050: 00000000 00000000 00000000 00000000 ................ > > > 80400060: 00000000 00000000 00000000 00000000 ................ > > > 80400070: 00000000 00000000 00000000 00000000 ................ > > > 80400080: 00000000 00000000 00000000 00000000 ................ > > > 80400090: 00000000 00000000 00000000 00000000 ................ > > > 804000a0: 00000000 00000000 00000000 00000000 ................ > > > 804000b0: 00000000 00000000 00000000 00000000 ................ > > > 804000c0: 00000000 00000000 00000000 00000000 ................ > > > 804000d0: 00000000 00000000 00000000 00000000 ................ > > > 804000e0: 00000000 00000000 00000000 00000000 ................ > > > 804000f0: 00000000 00000000 00000000 00000000 ................ > > Regards, > Bin