[PATCH v4 0/8] Xilinx Versal CFI support

Francisco Iglesias posted 8 patches 8 months ago
Only 4 patches received!
There is a newer version of this series
MAINTAINERS                              |  10 +
hw/arm/xlnx-versal.c                     | 155 +++-
hw/misc/meson.build                      |   3 +
hw/misc/xlnx-cfi-if.c                    |  34 +
hw/misc/xlnx-versal-cframe-reg.c         | 858 +++++++++++++++++++++++
hw/misc/xlnx-versal-cfu.c                | 563 +++++++++++++++
include/hw/arm/xlnx-versal.h             |  85 +++
include/hw/misc/xlnx-cfi-if.h            |  59 ++
include/hw/misc/xlnx-versal-cframe-reg.h | 303 ++++++++
include/hw/misc/xlnx-versal-cfu.h        | 258 +++++++
10 files changed, 2327 insertions(+), 1 deletion(-)
create mode 100644 hw/misc/xlnx-cfi-if.c
create mode 100644 hw/misc/xlnx-versal-cframe-reg.c
create mode 100644 hw/misc/xlnx-versal-cfu.c
create mode 100644 include/hw/misc/xlnx-cfi-if.h
create mode 100644 include/hw/misc/xlnx-versal-cframe-reg.h
create mode 100644 include/hw/misc/xlnx-versal-cfu.h
[PATCH v4 0/8] Xilinx Versal CFI support
Posted by Francisco Iglesias 8 months ago
Hi,

This series adds support for the Configuration Frame Unit (CFU) and the
Configuration Frame controllers (CFRAME) to the Xilinx Versal machine
([1], chapter 21) for emulaing bitstream loading and readback.

The series starts by introducing the Xilinx CFI interface that is
thereafter used by the Xilinx CFU components, the Xilinx CFRAME and Xilinx
CFRAME broadcast models for transfering CFI packets between each other.
Thereafter a model of the CFU_APB, CFU_FDRO and CFU_SFR are introduced and
also models of the CFRAME controller and CFRAME broadcast controller.

The series thereafter ends with connecting the models to Xilinx Versal
machine.

Best regards,
Francisco Iglesias

References:
[1] https://docs.xilinx.com/r/en-US/am011-versal-acap-trm/PSM-Local-Registers


Changelog:
v3->v4:
 [PATCH 5]
   * Swap to pop out the fifo32 data instead of using memcpy
   * Use g_tree_nnodes instead of g_tree_height
   * Take reference before g_tree_destroy (for keeping the GTree around)
   * Remove stray whitespace (in cframe_reg_init before g_free)

v2->v3:
 [PATCH 5]
   * Swap to store the CFrames in a GTree instead of GArray
   * Rename new_f to new_f_data and also add it to the vmstate 
   * Removed unnecessary 'switch' braces in cframe_reg_cfi_transfer_packet
   * Correct the reset of new_f_data and the cframes GTree
v1->v2:
 [PATCH 2]
   * Use KiB when defining KEYHOLE_STREAM_4K/KEYHOLE_STREAM_256K
   * Updated to be able to share wfifo code 
 [PATCH 3]
   * Swap to use Fifo32 instead of GArray in the CFU_FDRO model
   * Add device reset to the CFU_FDRO model
 [PATCH 4]
   * Add device reset to the CFU_SFR model
 [PATCH 5]
   * Use KiB when defining KEYHOLE_STREAM_4K
   * Add comma after CFRAME_CMD_DLPARK
   * Remove backwards compatibility comment (and the 'cfu' alias propname for
     cfg.cfu_fdro)
   * Use Fifo32 inside the XlnxCFrame structure
   * Reworked cframes_reg_pre_save / cframes_reg_post_load
 [PATCH 6]
   * Add device reset to the CFrame broadcast reg model
 [PATCH 8]
   * Switch to use g_autofree instead of explicit g_free


Francisco Iglesias (8):
  hw/misc: Introduce the Xilinx CFI interface
  hw/misc: Introduce a model of Xilinx Versal's CFU_APB
  hw/misc/xlnx-versal-cfu: Introduce a model of Xilinx Versal CFU_FDRO
  hw/misc/xlnx-versal-cfu: Introduce a model of Xilinx Versal's CFU_SFR
  hw/misc: Introduce a model of Xilinx Versal's CFRAME_REG
  hw/misc: Introduce a model of Xilinx Versal's CFRAME_BCAST_REG
  hw/arm/xlnx-versal: Connect the CFU_APB, CFU_FDRO and CFU_SFR
  hw/arm/versal: Connect the CFRAME_REG and CFRAME_BCAST_REG

 MAINTAINERS                              |  10 +
 hw/arm/xlnx-versal.c                     | 155 +++-
 hw/misc/meson.build                      |   3 +
 hw/misc/xlnx-cfi-if.c                    |  34 +
 hw/misc/xlnx-versal-cframe-reg.c         | 858 +++++++++++++++++++++++
 hw/misc/xlnx-versal-cfu.c                | 563 +++++++++++++++
 include/hw/arm/xlnx-versal.h             |  85 +++
 include/hw/misc/xlnx-cfi-if.h            |  59 ++
 include/hw/misc/xlnx-versal-cframe-reg.h | 303 ++++++++
 include/hw/misc/xlnx-versal-cfu.h        | 258 +++++++
 10 files changed, 2327 insertions(+), 1 deletion(-)
 create mode 100644 hw/misc/xlnx-cfi-if.c
 create mode 100644 hw/misc/xlnx-versal-cframe-reg.c
 create mode 100644 hw/misc/xlnx-versal-cfu.c
 create mode 100644 include/hw/misc/xlnx-cfi-if.h
 create mode 100644 include/hw/misc/xlnx-versal-cframe-reg.h
 create mode 100644 include/hw/misc/xlnx-versal-cfu.h

-- 
2.34.1