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
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
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
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
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
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
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
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
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
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
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
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/
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
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
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
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
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
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
.
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
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
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/
.
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
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
.
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
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
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
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
.
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
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
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
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
.
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
.
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
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
: 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
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'
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
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
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
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
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
. 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
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
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
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
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
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 |
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
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 |
://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
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
://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
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
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 |
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
;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
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
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
. 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
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
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
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 |
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
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
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
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
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
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
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 +
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
. 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
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
72 matches
Mail list logo