[PATCH v2] hw/char/pl011: Add support for loopback

2024-02-26 Thread Tong Ho
is observed in real pl011 hardware placed in loopback mode: 1. Input characters and BREAK events from serial backend are ignored, but 2. Both TX characters and BREAK events are still sent to serial backend, in addition to be looped back to RX. Signed-off-by: Tong Ho Signed-off-by: Francisco

[PATCH] hw/char/pl011: Add support for loopback

2024-02-06 Thread Tong Ho
This patch adds loopback for sent characters as well as modem-control signals. Loopback of send and modem-control is often used for uart self tests in real hardware but missing from current pl011 model, resulting in self-test failures when running in QEMU. Signed-off-by: Tong Ho Signed-off-by

[PATCH] hw/nvram: Avoid unnecessary Xilinx eFuse backstore write

2023-04-26 Thread Tong Ho
Add a check in the bit-set operation to write the backstore only if the affected bit is 0 before. With this in place, there will be no need for callers to do the checking in order to avoid unnecessary writes. Signed-off-by: Tong Ho --- hw/nvram/xlnx-efuse.c | 11 +-- 1 file changed, 9

RE: [PATCH v3 0/9] hw/nvram: hw/arm: Introduce Xilinx eFUSE and BBRAM

2021-10-04 Thread Tong Ho
Hi Peter, I will follow up with patches to fix the memory leaks. Where can I get a copy of the Coverity reports that have the 10 issues you indicated? Thanks, Tong -Original Message- From: Peter Maydell Sent: Saturday, October 2, 2021 3:28 AM To: Tong Ho Cc: qemu-arm ; QEMU

[PATCH] qemu/bitops.h: Locate changed bits

2024-05-28 Thread Tong Ho
Add inlined functions to obtain a mask of changed bits. 3 flavors are added: toggled, changed to 1, changed to 0. These newly added utilities aid common device behaviors where actions are taken only when a register's bit(s) are changed. Signed-off-by: Tong Ho --- include/qemu/bitops.h

[PATCH 2/3] hw/nvram: Fix Memory Leak in Xilinx Versal eFuse device

2021-10-15 Thread Tong Ho
Signed-off-by: Tong Ho --- hw/nvram/xlnx-versal-efuse-ctrl.c | 20 +++- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/hw/nvram/xlnx-versal-efuse-ctrl.c b/hw/nvram/xlnx-versal-efuse-ctrl.c index d362376703..b35ba65ab5 100644 --- a/hw/nvram/xlnx-versal-efuse

[PATCH 3/3] hw/nvram: Fix Memory Leak in Xilinx ZynqMP eFuse device

2021-10-15 Thread Tong Ho
Signed-off-by: Tong Ho --- hw/nvram/xlnx-zynqmp-efuse.c | 18 -- 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/hw/nvram/xlnx-zynqmp-efuse.c b/hw/nvram/xlnx-zynqmp-efuse.c index 1f87dbf988..228ba0bbfa 100644 --- a/hw/nvram/xlnx-zynqmp-efuse.c +++ b/hw/nvram/xlnx

[PATCH 1/3] hw/nvram: Fix Memory Leak in Xilinx eFuse QOM

2021-10-15 Thread Tong Ho
Signed-off-by: Tong Ho --- hw/nvram/xlnx-efuse.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/hw/nvram/xlnx-efuse.c b/hw/nvram/xlnx-efuse.c index ee1caab54c..a0fd77b586 100644 --- a/hw/nvram/xlnx-efuse.c +++ b/hw/nvram/xlnx-efuse.c @@ -144,10 +144,11 @@ static

[PATCH 0/3] hw/nvram: Fix Memory Leaks in Xilinx eFUSE

2021-10-15 Thread Tong Ho
This series fixes memory leaks in Xilinx eFUSE devices for the Versal and ZynqMP product families. The leaks result from failing to free memory allocated by object_get_canonical_path(). Tong Ho (3): hw/nvram: Fix Memory Leak in Xilinx eFuse QOM hw/nvram: Fix Memory Leak in Xilinx Versal

[PATCH 0/1] xlnx-bbram: hw/nvram: Fix Coverity CID 1487233

2022-04-01 Thread Tong Ho
This patch addresses Coverity CID 1487233 by adding the required initialiation of a local variable of type Error *. Tong Ho (1): xlnx-bbram: hw/nvram: Fix uninitialized Error * hw/nvram/xlnx-bbram.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.25.1

[PATCH 1/1] xlnx-bbram: hw/nvram: Fix uninitialized Error *

2022-04-01 Thread Tong Ho
This adds required initialization of Error * variable. Signed-off-by: Tong Ho --- hw/nvram/xlnx-bbram.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/nvram/xlnx-bbram.c b/hw/nvram/xlnx-bbram.c index b70828e5bf..6ed32adad9 100644 --- a/hw/nvram/xlnx-bbram.c +++ b/hw

[PATCH] xlnx-bbram: hw/nvram: Use dot in device type name

2023-10-02 Thread Tong Ho
This replaces the comma (,) to dot (.) in the device type name so the name can be used with the 'driver=' command line option. Signed-off-by: Tong Ho --- include/hw/nvram/xlnx-bbram.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/hw/nvram/xlnx-bbram.h b/

[PATCH] xlnx-bbram: hw/nvram: Remove deprecated device reset

2023-10-02 Thread Tong Ho
This change implements the ResettableClass interface for the device. Signed-off-by: Tong Ho --- hw/nvram/xlnx-bbram.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/hw/nvram/xlnx-bbram.c b/hw/nvram/xlnx-bbram.c index c6b484cc85..e18e7770e1 100644 --- a/hw/nvram/xlnx

[PATCH] xlnx-versal-efuse: hw/nvram: Remove deprecated device reset

2023-10-03 Thread Tong Ho
This change implements the ResettableClass interface for the device. Signed-off-by: Tong Ho --- hw/nvram/xlnx-versal-efuse-ctrl.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/hw/nvram/xlnx-versal-efuse-ctrl.c b/hw/nvram/xlnx-versal-efuse-ctrl.c index b35ba65ab5

[PATCH] xlnx-zynqmp-efuse: hw/nvram: Remove deprecated device reset

2023-10-03 Thread Tong Ho
This change implements the ResettableClass interface for the device. Signed-off-by: Tong Ho --- hw/nvram/xlnx-zynqmp-efuse.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/hw/nvram/xlnx-zynqmp-efuse.c b/hw/nvram/xlnx-zynqmp-efuse.c index 228ba0bbfa..3db5f98ec1

[PATCH v3 0/3] AMD/Xilinx Versal TRNG support

2023-10-04 Thread Tong Ho
t-message. Best regards, Tong Ho Tong Ho (3): hw/misc: Introduce AMD/Xilix Versal TRNG device hw/arm: xlnx-versal-virt: Add AMD/Xilinx TRNG device tests/qtest: Introduce tests for AMD/Xilinx Versal TRNG device hw/arm/Kconfig | 1 + hw/arm/xlnx-versal.c

[PATCH v3 1/3] hw/misc: Introduce AMD/Xilix Versal TRNG device

2023-10-04 Thread Tong Ho
he FIPS 140-2 continuous test fault irq Signed-off-by: Tong Ho --- hw/misc/Kconfig| 3 + hw/misc/meson.build| 3 + hw/misc/xlnx-versal-trng.c | 732 + include/hw/misc/xlnx-versal-trng.h | 58 +++ 4 files changed, 796 inserti

[PATCH v3 3/3] tests/qtest: Introduce tests for AMD/Xilinx Versal TRNG device

2023-10-04 Thread Tong Ho
Signed-off-by: Tong Ho --- tests/qtest/meson.build | 2 +- tests/qtest/xlnx-versal-trng-test.c | 490 2 files changed, 491 insertions(+), 1 deletion(-) create mode 100644 tests/qtest/xlnx-versal-trng-test.c diff --git a/tests/qtest/meson.build b/tests

[PATCH v3 2/3] hw/arm: xlnx-versal-virt: Add AMD/Xilinx TRNG device

2023-10-04 Thread Tong Ho
. Signed-off-by: Tong Ho --- hw/arm/Kconfig | 1 + hw/arm/xlnx-versal.c | 16 include/hw/arm/xlnx-versal.h | 5 + 3 files changed, 22 insertions(+) diff --git a/hw/arm/Kconfig b/hw/arm/Kconfig index 7e68348440..0a3ff6748d 100644 --- a/hw/arm/Kconfig +++ b

[PATCH v2 1/3] hw/misc: Introduce AMD/Xilix Versal TRNG device

2023-09-21 Thread Tong Ho
he FIPS 140-2 continuous test fault irq Signed-off-by: Tong Ho --- hw/misc/Kconfig| 3 + hw/misc/meson.build| 3 + hw/misc/xlnx-versal-trng.c | 734 + include/hw/misc/xlnx-versal-trng.h | 57 +++ 4 files changed, 797 inserti

[PATCH v2 0/3] AMD/Xilinx Versal TRNG support

2023-09-21 Thread Tong Ho
e. Best regards, Tong Ho Tong Ho (3): hw/misc: Introduce AMD/Xilix Versal TRNG device hw/arm: xlnx-versal-virt: Add AMD/Xilinx TRNG device tests/qtest: Introduce tests for AMD/Xilinx Versal TRNG device hw/arm/Kconfig | 1 + hw/arm/xlnx-versal-virt.c | 20 + hw/

[PATCH v2 2/3] hw/arm: xlnx-versal-virt: Add AMD/Xilinx TRNG device

2023-09-21 Thread Tong Ho
. Signed-off-by: Tong Ho --- hw/arm/Kconfig | 1 + hw/arm/xlnx-versal-virt.c| 20 hw/arm/xlnx-versal.c | 16 include/hw/arm/xlnx-versal.h | 5 + 4 files changed, 42 insertions(+) diff --git a/hw/arm/Kconfig b/hw/arm/Kconfig index

[PATCH v2 3/3] tests/qtest: Introduce tests for AMD/Xilinx Versal TRNG device

2023-09-21 Thread Tong Ho
Signed-off-by: Tong Ho --- tests/qtest/meson.build | 2 +- tests/qtest/xlnx-versal-trng-test.c | 490 2 files changed, 491 insertions(+), 1 deletion(-) create mode 100644 tests/qtest/xlnx-versal-trng-test.c diff --git a/tests/qtest/meson.build b/tests

[PATCH v4 2/3] hw/arm: xlnx-versal-virt: Add AMD/Xilinx TRNG device

2023-10-17 Thread Tong Ho
. Signed-off-by: Tong Ho --- hw/arm/Kconfig | 1 + hw/arm/xlnx-versal.c | 16 include/hw/arm/xlnx-versal.h | 5 + 3 files changed, 22 insertions(+) diff --git a/hw/arm/Kconfig b/hw/arm/Kconfig index 7e68348440..0a3ff6748d 100644 --- a/hw/arm/Kconfig +++ b

[PATCH v4 1/3] hw/misc: Introduce AMD/Xilix Versal TRNG device

2023-10-17 Thread Tong Ho
he FIPS 140-2 continuous test fault irq Signed-off-by: Tong Ho --- hw/misc/Kconfig| 3 + hw/misc/meson.build| 3 + hw/misc/xlnx-versal-trng.c | 727 + include/hw/misc/xlnx-versal-trng.h | 58 +++ 4 files changed, 791 inserti

[PATCH v4 0/3] AMD/Xilinx Versal TRNG support

2023-10-17 Thread Tong Ho
V1's custom PRNG. 3) Implement ResettableClass for device-reset. 4) Add device-mode description to commit-message. Best regards, Tong Ho Tong Ho (3): hw/misc: Introduce AMD/Xilix Versal TRNG device hw/arm: xlnx-versal-virt: Add AMD/Xilinx TRNG device tests/qtest: Introduce tests for AMD/X

[PATCH v4 3/3] tests/qtest: Introduce tests for AMD/Xilinx Versal TRNG device

2023-10-17 Thread Tong Ho
Signed-off-by: Tong Ho --- tests/qtest/meson.build | 2 +- tests/qtest/xlnx-versal-trng-test.c | 486 2 files changed, 487 insertions(+), 1 deletion(-) create mode 100644 tests/qtest/xlnx-versal-trng-test.c diff --git a/tests/qtest/meson.build b/tests

[PATCH v5 2/3] hw/arm: xlnx-versal-virt: Add AMD/Xilinx TRNG device

2023-10-31 Thread Tong Ho
. Signed-off-by: Tong Ho Reviewed-by: Francisco Iglesias Reviewed-by: Peter Maydell --- hw/arm/Kconfig | 1 + hw/arm/xlnx-versal.c | 16 include/hw/arm/xlnx-versal.h | 5 + 3 files changed, 22 insertions(+) diff --git a/hw/arm/Kconfig b/hw/arm/Kconfig

[PATCH v5 3/3] tests/qtest: Introduce tests for AMD/Xilinx Versal TRNG device

2023-10-31 Thread Tong Ho
Signed-off-by: Tong Ho --- tests/qtest/meson.build | 2 +- tests/qtest/xlnx-versal-trng-test.c | 485 2 files changed, 486 insertions(+), 1 deletion(-) create mode 100644 tests/qtest/xlnx-versal-trng-test.c diff --git a/tests/qtest/meson.build b/tests

[PATCH v5 1/3] hw/misc: Introduce AMD/Xilix Versal TRNG device

2023-10-31 Thread Tong Ho
he FIPS 140-2 continuous test fault irq Signed-off-by: Tong Ho --- hw/misc/Kconfig| 3 + hw/misc/meson.build| 3 + hw/misc/xlnx-versal-trng.c | 717 + include/hw/misc/xlnx-versal-trng.h | 58 +++ 4 files changed, 781 inserti

[PATCH v5 0/3] AMD/Xilinx Versal TRNG support

2023-10-31 Thread Tong Ho
ogether V1 => V2 1) Change patch #1 only 2) Use g_rand_*() PRNG from glib to replace V1's custom PRNG. 3) Implement ResettableClass for device-reset. 4) Add device-mode description to commit-message. Best regards, Tong Ho Tong Ho (3): hw/misc: Introduce AMD/Xilix Versal TRNG device hw

[PATCH 2/3] hw/arm: xlnx-versal-virt: Add AMD/Xilinx TRNG device

2023-08-31 Thread Tong Ho
. Signed-off-by: Tong Ho --- hw/arm/Kconfig | 1 + hw/arm/xlnx-versal-virt.c| 20 hw/arm/xlnx-versal.c | 16 include/hw/arm/xlnx-versal.h | 5 + 4 files changed, 42 insertions(+) diff --git a/hw/arm/Kconfig b/hw/arm/Kconfig index

[PATCH 0/3] AMD/Xilinx Versal TRNG support

2023-08-31 Thread Tong Ho
. The series ends with a q-test for sanity check of the TRNG model in the Xilinx Versal machine. Best regards, Tong Ho References: [1] https://docs.xilinx.com/r/en-US/am011-versal-acap-trm/True-Random-Number-Generator Tong Ho (3): hw/misc: Introduce AMD/Xilix Versal TRNG device hw/arm: xlnx

[PATCH 3/3] tests/qtest: Introduce tests for AMD/Xilinx Versal TRNG device

2023-08-31 Thread Tong Ho
Signed-off-by: Tong Ho --- tests/qtest/meson.build | 2 +- tests/qtest/xlnx-versal-trng-test.c | 490 2 files changed, 491 insertions(+), 1 deletion(-) create mode 100644 tests/qtest/xlnx-versal-trng-test.c diff --git a/tests/qtest/meson.build b/tests

[PATCH 1/3] hw/misc: Introduce AMD/Xilix Versal TRNG device

2023-08-31 Thread Tong Ho
: Triggers the SP800-90B entropy health test fault irq bit 1: Triggers the FIPS 140-2 continuous test fault irq Signed-off-by: Tong Ho --- hw/misc/Kconfig| 3 + hw/misc/meson.build| 3 + hw/misc/xlnx-versal-trng.c | 725

[PATCH] crypto: fix getter of a QCryptoSecret's property

2020-01-09 Thread Tong Ho
This fixes the condition-check done by the "loaded" property getter, such that the property returns true even when the secret is loaded by the 'file' option. Signed-off-by: Tong Ho --- Pre-existing getter returns true only when the secret is loaded by the 'data'

[Patch 0/2] hw/arm/xlnx-versal: hw/arm/xlnx-zynqmp: Add unimplemented mmio

2021-08-18 Thread Tong Ho
This series adds the APU mmio region as an unimplemented device to each of two Xilinx SoC to support booting guests built with the standalone bsp published at: https://github.com/Xilinx/embeddedsw/tree/master/lib/bsp/standalone/src/arm/ARMv8/64bit Tong Ho (2): hw/arm/xlnx-versal: Add

[Patch 1/2] hw/arm/xlnx-versal: Add unimplemented APU mmio

2021-08-18 Thread Tong Ho
Add unimplemented APU mmio region to xlnx-versal for booting bare-metal guests built with standalone bsp published at: https://github.com/Xilinx/embeddedsw/tree/master/lib/bsp/standalone/src/arm/ARMv8/64bit Signed-off-by: Tong Ho --- hw/arm/xlnx-versal.c | 2 ++ include/hw/arm/xlnx

[Patch 2/2] hw/arm/xlnx-zynqmp: Add unimplemented APU mmio

2021-08-18 Thread Tong Ho
Add unimplemented APU mmio region to xlnx-zynqmp for booting bare-metal guests built with standalone bsp published at: https://github.com/Xilinx/embeddedsw/tree/master/lib/bsp/standalone/src/arm/ARMv8/64bit Signed-off-by: Tong Ho --- hw/arm/xlnx-zynqmp.c | 32

[PATCH 6/9] hw/arm: xlnx-versal: Add Xilinx BBRAM device

2021-08-18 Thread Tong Ho
Connect the support for Versal Battery-Backed RAM (BBRAM) Signed-off-by: Tong Ho --- hw/arm/xlnx-versal-virt.c| 21 + hw/arm/xlnx-versal.c | 18 ++ include/hw/arm/xlnx-versal.h | 5 + 3 files changed, 44 insertions(+) diff --git a/hw/arm

[PATCH 8/9] hw/arm: xlnx-zynqmp: Add Xilinx BBRAM device

2021-08-18 Thread Tong Ho
Connect the support for Xilinx ZynqMP Battery-Backed RAM (BBRAM) Signed-off-by: Tong Ho --- hw/arm/xlnx-zynqmp.c | 21 + include/hw/arm/xlnx-zynqmp.h | 2 ++ 2 files changed, 23 insertions(+) diff --git a/hw/arm/xlnx-zynqmp.c b/hw/arm/xlnx-zynqmp.c index 3597e8db4d

[PATCH 2/9] hw/nvram: Introduce Xilinx eFuse QOM

2021-08-18 Thread Tong Ho
. Iglesias Signed-off-by: Sai Pavan Boddu Signed-off-by: Tong Ho --- hw/nvram/xlnx-efuse-crc.c | 118 hw/nvram/xlnx-efuse.c | 253 ++ include/hw/nvram/xlnx-efuse.h | 80 +++ 3 files changed, 451 insertions(+) create mode

[PATCH 7/9] hw/arm: xlnx-versal: Add Xilinx eFUSE device

2021-08-18 Thread Tong Ho
Connect the support for Versal eFUSE one-time field-programmable bit array. Signed-off-by: Tong Ho --- hw/arm/xlnx-versal-virt.c| 36 + hw/arm/xlnx-versal.c | 39 include/hw/arm/xlnx-versal.h | 12 +++ 3

[PATCH 9/9] hw/arm: xlnx-zynqmp: Add Xilinx eFUSE device

2021-08-18 Thread Tong Ho
Connect the support for ZynqMP eFUSE one-time field-programmable bit array. Signed-off-by: Tong Ho --- hw/arm/xlnx-zynqmp.c | 29 + include/hw/arm/xlnx-zynqmp.h | 3 +++ 2 files changed, 32 insertions(+) diff --git a/hw/arm/xlnx-zynqmp.c b/hw/arm/xlnx

[PATCH 1/9] docs/system/arm: xlnx-versal-virt: BBRAM and eFUSE Usage

2021-08-18 Thread Tong Ho
Add BBRAM and eFUSE usage to the Xilinx Versal Virt board document. Signed-off-by: Tong Ho --- docs/system/arm/xlnx-versal-virt.rst | 49 1 file changed, 49 insertions(+) diff --git a/docs/system/arm/xlnx-versal-virt.rst b/docs/system/arm/xlnx-versal-virt.rst

[PATCH 5/9] hw/nvram: Introduce Xilinx battery-backed ram

2021-08-18 Thread Tong Ho
This device is present in Versal and ZynqMP product families to store a 256-bit encryption key. Co-authored-by: Edgar E. Iglesias Co-authored-by: Sai Pavan Boddu Signed-off-by: Edgar E. Iglesias Signed-off-by: Sai Pavan Boddu Signed-off-by: Tong Ho --- hw/nvram/Kconfig | 4

[PATCH 3/9] hw/nvram: Introduce Xilinx Versal eFuse device

2021-08-18 Thread Tong Ho
a cache to provide a byte-accessible read-only interface to efficiently read efuse array. Co-authored-by: Edgar E. Iglesias Co-authored-by: Sai Pavan Boddu Signed-off-by: Edgar E. Iglesias Signed-off-by: Sai Pavan Boddu Signed-off-by: Tong Ho --- hw/nvram/Kconfig |

[PATCH 0/9] hw/nvram: hw/arm: Introduce Xilinx eFUSE and BBRAM

2021-08-18 Thread Tong Ho
This series implements the Xilinx eFUSE and BBRAM devices for the Versal and ZynqMP product families. Furthermore, both new devices are connected to the xlnx-versal-virt board and the xlnx-zcu102 board. See changes in docs/system/arm/xlnx-versal-virt.rst for detail. Tong Ho (9): docs/system

[PATCH 4/9] hw/nvram: Introduce Xilinx ZynqMP eFuse device

2021-08-18 Thread Tong Ho
of 3, but can be changed using command argument: -global xlnx,efuse.drive-index=N Co-authored-by: Edgar E. Iglesias Co-authored-by: Sai Pavan Boddu Signed-off-by: Edgar E. Iglesias Signed-off-by: Sai Pavan Boddu Signed-off-by: Tong Ho --- hw/nvram/Kconfig |

[Patch v2 2/2] hw/arm/xlnx-zynqmp: Add unimplemented APU mmio

2021-08-23 Thread Tong Ho
://github.com/Xilinx/embeddedsw/blob/release-2020.2/lib/bsp/standalone/src/arm/ARMv8/64bit/gcc/boot.S#L183 Acked-by: Alistair Francis Reviewed-by: Edgar E. Iglesias Signed-off-by: Tong Ho --- hw/arm/xlnx-zynqmp.c | 32 include/hw/arm/xlnx-zynqmp.h | 7

[Patch v2 0/2] hw/arm/xlnx-versal: hw/arm/xlnx-zynqmp: Add unimplemented mmio

2021-08-23 Thread Tong Ho
p.c: - Use assert to ensure UnimpInfo array initialization. - Use 'unsigned int' style. * Provide a more specific URL, in both patches' commit messages, to where the APU mmio region is accessed by standalone bsp bootstrap. --- Tong Ho (2): hw/arm/xlnx-versal: Add unimpleme

[Patch v2 1/2] hw/arm/xlnx-versal: Add unimplemented APU mmio

2021-08-23 Thread Tong Ho
://github.com/Xilinx/embeddedsw/blob/release-2020.2/lib/bsp/standalone/src/arm/ARMv8/64bit/gcc/boot.S#L183 Acked-by: Alistair Francis Reviewed-by: Edgar E. Iglesias Signed-off-by: Tong Ho --- hw/arm/xlnx-versal.c | 2 ++ include/hw/arm/xlnx-versal.h | 2 ++ 2 files changed, 4 insertions

[PATCH v2 8/9] hw/arm: xlnx-zynqmp: Add Xilinx eFUSE device

2021-08-23 Thread Tong Ho
Connect the support for ZynqMP eFUSE one-time field-programmable bit array. Signed-off-by: Tong Ho --- hw/arm/xlnx-zynqmp.c | 29 + include/hw/arm/xlnx-zynqmp.h | 3 +++ 2 files changed, 32 insertions(+) diff --git a/hw/arm/xlnx-zynqmp.c b/hw/arm/xlnx

[PATCH v2 2/9] hw/nvram: Introduce Xilinx Versal eFuse device

2021-08-23 Thread Tong Ho
a cache to provide a byte-accessible read-only interface to efficiently read efuse array. Co-authored-by: Edgar E. Iglesias Co-authored-by: Sai Pavan Boddu Signed-off-by: Edgar E. Iglesias Signed-off-by: Sai Pavan Boddu Signed-off-by: Tong Ho --- hw/nvram/Kconfig |

[PATCH v2 4/9] hw/nvram: Introduce Xilinx battery-backed ram

2021-08-23 Thread Tong Ho
This device is present in Versal and ZynqMP product families to store a 256-bit encryption key. Co-authored-by: Edgar E. Iglesias Co-authored-by: Sai Pavan Boddu Signed-off-by: Edgar E. Iglesias Signed-off-by: Sai Pavan Boddu Signed-off-by: Tong Ho --- hw/nvram/Kconfig | 4

[PATCH v2 0/9] hw/nvram: hw/arm: Introduce Xilinx eFUSE and BBRAM

2021-08-23 Thread Tong Ho
;v2: * Move doc change from 1st to last of this series * Remove outdated comment of 'autogenerated by xregqemu.py' from all affected files. --- Tong Ho (9): hw/nvram: Introduce Xilinx eFuse QOM hw/nvram: Introduce Xilinx Versal eFuse device hw/nvram: Introduce Xilinx ZynqMP eFus

[PATCH v2 5/9] hw/arm: xlnx-versal: Add Xilinx BBRAM device

2021-08-23 Thread Tong Ho
Connect the support for Versal Battery-Backed RAM (BBRAM) Signed-off-by: Tong Ho --- hw/arm/xlnx-versal-virt.c| 21 + hw/arm/xlnx-versal.c | 18 ++ include/hw/arm/xlnx-versal.h | 5 + 3 files changed, 44 insertions(+) diff --git a/hw/arm

[PATCH v2 7/9] hw/arm: xlnx-zynqmp: Add Xilinx BBRAM device

2021-08-23 Thread Tong Ho
Connect the support for Xilinx ZynqMP Battery-Backed RAM (BBRAM) Signed-off-by: Tong Ho --- hw/arm/xlnx-zynqmp.c | 21 + include/hw/arm/xlnx-zynqmp.h | 2 ++ 2 files changed, 23 insertions(+) diff --git a/hw/arm/xlnx-zynqmp.c b/hw/arm/xlnx-zynqmp.c index 3597e8db4d

[PATCH v2 1/9] hw/nvram: Introduce Xilinx eFuse QOM

2021-08-23 Thread Tong Ho
. Iglesias Signed-off-by: Sai Pavan Boddu Signed-off-by: Tong Ho --- hw/nvram/xlnx-efuse-crc.c | 118 hw/nvram/xlnx-efuse.c | 252 ++ include/hw/nvram/xlnx-efuse.h | 80 +++ 3 files changed, 450 insertions(+) create mode

[PATCH v2 6/9] hw/arm: xlnx-versal: Add Xilinx eFUSE device

2021-08-23 Thread Tong Ho
Connect the support for Versal eFUSE one-time field-programmable bit array. Signed-off-by: Tong Ho --- hw/arm/xlnx-versal-virt.c| 37 ++ hw/arm/xlnx-versal.c | 39 include/hw/arm/xlnx-versal.h | 12 +++ 3

[PATCH v2 9/9] docs/system/arm: xlnx-versal-virt: BBRAM and eFUSE Usage

2021-08-23 Thread Tong Ho
Add BBRAM and eFUSE usage to the Xilinx Versal Virt board document. Signed-off-by: Tong Ho --- docs/system/arm/xlnx-versal-virt.rst | 49 1 file changed, 49 insertions(+) diff --git a/docs/system/arm/xlnx-versal-virt.rst b/docs/system/arm/xlnx-versal-virt.rst

[PATCH v2 3/9] hw/nvram: Introduce Xilinx ZynqMP eFuse device

2021-08-23 Thread Tong Ho
of 3, but can be changed using command argument: -global xlnx,efuse.drive-index=N Co-authored-by: Edgar E. Iglesias Co-authored-by: Sai Pavan Boddu Signed-off-by: Edgar E. Iglesias Signed-off-by: Sai Pavan Boddu Signed-off-by: Tong Ho --- hw/nvram/Kconfig |

[PATCH v3 5/9] hw/arm: xlnx-versal-virt: Add Xilinx BBRAM device

2021-09-16 Thread Tong Ho
be a seekable binary file, and its size must be 36 bytes or larger. A file with all binary 0's is a 'blank'. Signed-off-by: Tong Ho --- hw/arm/Kconfig | 1 + hw/arm/xlnx-versal-virt.c| 36 hw/arm/xlnx-versal

[PATCH v3 2/9] hw/nvram: Introduce Xilinx Versal eFuse device

2021-09-16 Thread Tong Ho
Signed-off-by: Tong Ho --- hw/nvram/Kconfig | 4 + hw/nvram/meson.build | 3 + hw/nvram/xlnx-versal-efuse-cache.c | 114 hw/nvram/xlnx-versal-efuse-ctrl.c| 783 +++ include/hw/nvram/xlnx-versal-efuse.h | 68 +++ 5 files

[PATCH v3 4/9] hw/nvram: Introduce Xilinx battery-backed ram

2021-09-16 Thread Tong Ho
This device is present in Versal and ZynqMP product families to store a 256-bit encryption key. Co-authored-by: Edgar E. Iglesias Co-authored-by: Sai Pavan Boddu Signed-off-by: Edgar E. Iglesias Signed-off-by: Sai Pavan Boddu Signed-off-by: Tong Ho --- hw/nvram/Kconfig | 4

[PATCH v3 8/9] hw/arm: xlnx-zcu102: Add Xilinx eFUSE device

2021-09-16 Thread Tong Ho
backend storage must be a seekable binary file, and its size must be 768 bytes or larger. A file with all binary 0's is a 'blank'. Signed-off-by: Tong Ho --- hw/Kconfig | 1 + hw/arm/xlnx-zcu102.c | 15 +++ hw/arm/xlnx-zynqmp

[PATCH v3 0/9] hw/nvram: hw/arm: Introduce Xilinx eFUSE and BBRAM

2021-09-16 Thread Tong Ho
ove 'if' from meson.build * Fix spelling and wording in comments and docs v1->v2: * Move doc change from 1st to last of this series * Remove outdated comment of 'autogenerated by xregqemu.py' from all affected files. --- Tong Ho (9): hw/nvram: Introduce Xilinx eFuse QOM

[PATCH v3 9/9] docs/system/arm: xlnx-versal-virt: BBRAM and eFUSE Usage

2021-09-16 Thread Tong Ho
Add BBRAM and eFUSE usage to the Xilinx Versal Virt board document. Signed-off-by: Tong Ho --- docs/system/arm/xlnx-versal-virt.rst | 49 1 file changed, 49 insertions(+) diff --git a/docs/system/arm/xlnx-versal-virt.rst b/docs/system/arm/xlnx-versal-virt.rst

[PATCH v3 7/9] hw/arm: xlnx-zcu102: Add Xilinx BBRAM device

2021-09-16 Thread Tong Ho
storage must be a seekable binary file, and its size must be 36 bytes or larger. A file with all binary 0's is a 'blank'. Signed-off-by: Tong Ho --- hw/Kconfig | 1 + hw/arm/xlnx-zcu102.c | 15 +++ hw/arm/xlnx-zynqmp.c | 20 +

[PATCH v3 6/9] hw/arm: xlnx-versal-virt: Add Xilinx eFUSE device

2021-09-16 Thread Tong Ho
backend storage must be a seekable binary file, and its size must be 3072 bytes or larger. A file with all binary 0's is a 'blank'. Signed-off-by: Tong Ho --- hw/arm/Kconfig | 1 + hw/arm/xlnx-versal-virt.c| 52 hw/ar

[PATCH v3 1/9] hw/nvram: Introduce Xilinx eFuse QOM

2021-09-16 Thread Tong Ho
. Iglesias Signed-off-by: Sai Pavan Boddu Signed-off-by: Tong Ho --- hw/nvram/Kconfig | 7 + hw/nvram/meson.build | 2 + hw/nvram/xlnx-efuse-crc.c | 119 +++ hw/nvram/xlnx-efuse.c | 280 ++ include/hw/nvram/xlnx

[PATCH v3 3/9] hw/nvram: Introduce Xilinx ZynqMP eFuse device

2021-09-16 Thread Tong Ho
Boddu Signed-off-by: Tong Ho --- hw/nvram/Kconfig | 4 + hw/nvram/meson.build | 2 + hw/nvram/xlnx-zynqmp-efuse.c | 855 +++ include/hw/nvram/xlnx-zynqmp-efuse.h | 44 ++ 4 files changed, 905 insertions(+) create mode