All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 00/18] hw/riscv: Add Microchip PolarFire SoC Icicle Kit board support
@ 2020-08-14 16:40 ` Bin Meng
  0 siblings, 0 replies; 100+ messages in thread
From: Bin Meng @ 2020-08-14 16:40 UTC (permalink / raw)
  To: Alistair Francis, Bastian Koppelmann, Palmer Dabbelt,
	Sagar Karandikar, qemu-devel, qemu-riscv
  Cc: Peter Maydell, Alistair Francis, qemu-block, Jason Wang,
	Bin Meng, Paolo Bonzini, Palmer Dabbelt, qemu-arm,
	Marc-André Lureau, Edgar E. Iglesias,
	Philippe Mathieu-Daudé

From: Bin Meng <bin.meng@windriver.com>

This adds support for Microchip PolarFire SoC Icicle Kit board.
The Icicle Kit board integrates a PolarFire SoC, with one SiFive's
E51 plus four U54 cores and many on-chip peripherals and an FPGA.

For more details about Microchip PolarFire Soc, please see:
https://www.microsemi.com/product-directory/soc-fpgas/5498-polarfire-soc-fpga

The Icicle Kit board information can be found here:
https://www.microsemi.com/existing-parts/parts/152514

Unlike SiFive FU540, the RISC-V core resect vector is at 0x20220000.
The RISC-V CPU and HART codes has been updated to set the core's
reset vector based on a configurable property from machine codes.

The following perepherals are created as an unimplemented device:

- Bus Error Uint 0/1/2/3/4
- L2 cache controller
- SYSREG
- MPUCFG
- IOSCBCFG
- GPIO

The following perepherals are emulated:
- SiFive CLINT
- SiFive PLIC
- PolarFire SoC Multi-Mode UART
- PolarFire SoC DMA
- Cadence eMMC/SDHCI controller
- Cadence Gigabit Ethernet MAC

Some bugs in the SD card codes are fixed during the development.

The BIOS image used by this machine is hss.bin, aka Hart Software
Services, which can be built from:
https://github.com/polarfire-soc/hart-software-services

To launch this machine:
$ qemu-system-riscv64 -M microchip-icicle-kit -smp 5 \
    -bios path/to/hss.bin -sd path/to/sdcard.img \
    -nic tap,ifname=tap,script=no,model=cadence_gem \
    -display none -serial stdio \
    -chardev socket,id=serial1,path=serial1.sock,server,wait \
    -serial chardev:serial1

The memory is set to 1 GiB by default to match the hardware.
A sanity check on ram size is performed in the machine init routine
to prompt user to increase the RAM size to > 1 GiB when less than
1 GiB ram is detected.

HSS output is on the first serial port (stdio) and U-Boot/Linux
outputs on the 2nd serial port. OpenSBI outputs on a random serial
port due to the lottery mechanism used during the multi-core boot.


Bin Meng (18):
  target/riscv: cpu: Add a new 'resetvec' property
  hw/riscv: hart: Add a new 'resetvec' property
  target/riscv: cpu: Set reset vector based on the configured property
    value
  hw/riscv: Initial support for Microchip PolarFire SoC Icicle Kit board
  hw/char: Add Microchip PolarFire SoC MMUART emulation
  hw/riscv: microchip_pfsoc: Connect 5 MMUARTs
  hw/sd: sd: Fix incorrect populated function switch status data
    structure
  hw/sd: sd: Correctly set the high capacity bit
  hw/sd: sdhci: Make sdhci_poweron_reset() internal visible
  hw/sd: Add Cadence SDHCI emulation
  hw/riscv: microchip_pfsoc: Connect a Cadence SDHCI controller and an
    SD card
  hw/dma: Add Microchip PolarFire Soc DMA controller emulation
  hw/riscv: microchip_pfsoc: Connect a DMA controller
  hw/net: cadence_gem: Add a new 'phy-addr' property
  hw/riscv: microchip_pfsoc: Connect 2 Cadence GEMs
  hw/riscv: microchip_pfsoc: Hook GPIO controllers
  hw/riscv: clint: Avoid using hard-coded timebase frequency
  hw/riscv: microchip_pfsoc: Document the software used for testing

 MAINTAINERS                         |  11 +
 default-configs/riscv64-softmmu.mak |   1 +
 hw/char/Kconfig                     |   3 +
 hw/char/Makefile.objs               |   1 +
 hw/char/mchp_pfsoc_mmuart.c         |  82 +++++++
 hw/dma/Kconfig                      |   3 +
 hw/dma/Makefile.objs                |   1 +
 hw/dma/mchp_pfsoc_dma.c             | 322 +++++++++++++++++++++++++
 hw/net/cadence_gem.c                |   7 +-
 hw/riscv/Kconfig                    |   9 +
 hw/riscv/Makefile.objs              |   1 +
 hw/riscv/microchip_pfsoc.c          | 456 ++++++++++++++++++++++++++++++++++++
 hw/riscv/opentitan.c                |   1 +
 hw/riscv/riscv_hart.c               |   3 +
 hw/riscv/sifive_clint.c             |  25 +-
 hw/riscv/sifive_e.c                 |   4 +-
 hw/riscv/sifive_u.c                 |   5 +-
 hw/riscv/spike.c                    |   2 +-
 hw/riscv/virt.c                     |   3 +-
 hw/sd/Kconfig                       |   4 +
 hw/sd/Makefile.objs                 |   1 +
 hw/sd/cadence_sdhci.c               | 162 +++++++++++++
 hw/sd/sd.c                          |   8 +-
 hw/sd/sdhci-internal.h              |   1 +
 hw/sd/sdhci.c                       |   2 +-
 include/hw/char/mchp_pfsoc_mmuart.h |  61 +++++
 include/hw/dma/mchp_pfsoc_dma.h     |  57 +++++
 include/hw/net/cadence_gem.h        |   2 +
 include/hw/riscv/microchip_pfsoc.h  | 125 ++++++++++
 include/hw/riscv/riscv_hart.h       |   1 +
 include/hw/riscv/sifive_clint.h     |   3 +-
 include/hw/sd/cadence_sdhci.h       |  65 +++++
 target/riscv/cpu.c                  |   8 +-
 target/riscv/cpu.h                  |   7 +-
 target/riscv/cpu_helper.c           |   4 +-
 target/riscv/csr.c                  |   4 +-
 36 files changed, 1424 insertions(+), 31 deletions(-)
 create mode 100644 hw/char/mchp_pfsoc_mmuart.c
 create mode 100644 hw/dma/mchp_pfsoc_dma.c
 create mode 100644 hw/riscv/microchip_pfsoc.c
 create mode 100644 hw/sd/cadence_sdhci.c
 create mode 100644 include/hw/char/mchp_pfsoc_mmuart.h
 create mode 100644 include/hw/dma/mchp_pfsoc_dma.h
 create mode 100644 include/hw/riscv/microchip_pfsoc.h
 create mode 100644 include/hw/sd/cadence_sdhci.h

-- 
2.7.4



^ permalink raw reply	[flat|nested] 100+ messages in thread

end of thread, other threads:[~2020-08-25 18:46 UTC | newest]

Thread overview: 100+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-14 16:40 [PATCH 00/18] hw/riscv: Add Microchip PolarFire SoC Icicle Kit board support Bin Meng
2020-08-14 16:40 ` Bin Meng
2020-08-14 16:40 ` [PATCH 01/18] target/riscv: cpu: Add a new 'resetvec' property Bin Meng
2020-08-17 17:49   ` Alistair Francis
2020-08-17 17:49     ` Alistair Francis
2020-08-14 16:40 ` [PATCH 02/18] hw/riscv: hart: " Bin Meng
2020-08-17 17:49   ` Alistair Francis
2020-08-17 17:49     ` Alistair Francis
2020-08-14 16:40 ` [PATCH 03/18] target/riscv: cpu: Set reset vector based on the configured property value Bin Meng
2020-08-17 17:52   ` Alistair Francis
2020-08-17 17:52     ` Alistair Francis
2020-08-14 16:40 ` [PATCH 04/18] hw/riscv: Initial support for Microchip PolarFire SoC Icicle Kit board Bin Meng
2020-08-17 19:39   ` Alistair Francis
2020-08-17 19:39     ` Alistair Francis
2020-08-14 16:40 ` [PATCH 05/18] hw/char: Add Microchip PolarFire SoC MMUART emulation Bin Meng
2020-08-14 16:40   ` Bin Meng
2020-08-17 20:51   ` Alistair Francis
2020-08-17 20:51     ` Alistair Francis
2020-08-14 16:40 ` [PATCH 06/18] hw/riscv: microchip_pfsoc: Connect 5 MMUARTs Bin Meng
2020-08-17 21:06   ` Alistair Francis
2020-08-17 21:06     ` Alistair Francis
2020-08-14 16:40 ` [PATCH 07/18] hw/sd: sd: Fix incorrect populated function switch status data structure Bin Meng
2020-08-15  7:58   ` Philippe Mathieu-Daudé
2020-08-18 16:30     ` Sai Pavan Boddu
2020-08-21 10:09       ` Sai Pavan Boddu
2020-08-21 10:09         ` Sai Pavan Boddu
2020-08-21 10:08         ` Bin Meng
2020-08-21 10:08           ` Bin Meng
2020-08-24  4:13           ` Sai Pavan Boddu
2020-08-24  4:13             ` Sai Pavan Boddu
2020-08-14 16:40 ` [PATCH 08/18] hw/sd: sd: Correctly set the high capacity bit Bin Meng
2020-08-15  8:38   ` Philippe Mathieu-Daudé
2020-08-16  8:54     ` Bin Meng
2020-08-16  8:54       ` Bin Meng
2020-08-14 16:40 ` [PATCH 09/18] hw/sd: sdhci: Make sdhci_poweron_reset() internal visible Bin Meng
2020-08-15  7:51   ` Philippe Mathieu-Daudé
2020-08-16  8:50     ` Bin Meng
2020-08-16  8:50       ` Bin Meng
2020-08-16 11:06       ` Philippe Mathieu-Daudé
2020-08-14 16:40 ` [PATCH 10/18] hw/sd: Add Cadence SDHCI emulation Bin Meng
2020-08-14 16:40   ` Bin Meng
2020-08-15  8:51   ` Philippe Mathieu-Daudé
2020-08-15  8:51     ` Philippe Mathieu-Daudé
2020-08-14 16:40 ` [PATCH 11/18] hw/riscv: microchip_pfsoc: Connect a Cadence SDHCI controller and an SD card Bin Meng
2020-08-15  8:55   ` Philippe Mathieu-Daudé
2020-08-14 16:40 ` [PATCH 12/18] hw/dma: Add Microchip PolarFire Soc DMA controller emulation Bin Meng
2020-08-14 16:40 ` [PATCH 13/18] hw/riscv: microchip_pfsoc: Connect a DMA controller Bin Meng
2020-08-15  9:00   ` Philippe Mathieu-Daudé
2020-08-16  8:57     ` Bin Meng
2020-08-16  8:57       ` Bin Meng
2020-08-16 11:08       ` Philippe Mathieu-Daudé
2020-08-14 16:40 ` [PATCH 14/18] hw/net: cadence_gem: Add a new 'phy-addr' property Bin Meng
2020-08-14 16:40   ` Bin Meng
2020-08-15  9:06   ` Philippe Mathieu-Daudé
2020-08-16  8:29     ` Bin Meng
2020-08-16  8:29       ` Bin Meng
2020-08-16 11:14       ` Philippe Mathieu-Daudé
2020-08-16 11:14         ` Philippe Mathieu-Daudé
2020-08-16 12:08       ` Nathan Rossi
2020-08-16 12:08         ` Nathan Rossi
2020-08-16 13:42         ` Bin Meng
2020-08-16 13:42           ` Bin Meng
2020-08-16 16:31           ` Philippe Mathieu-Daudé
2020-08-16 16:31             ` Philippe Mathieu-Daudé
2020-08-14 16:40 ` [PATCH 15/18] hw/riscv: microchip_pfsoc: Connect 2 Cadence GEMs Bin Meng
2020-08-21 18:46   ` Alistair Francis
2020-08-21 18:46     ` Alistair Francis
2020-08-14 16:40 ` [PATCH 16/18] hw/riscv: microchip_pfsoc: Hook GPIO controllers Bin Meng
2020-08-21 18:47   ` Alistair Francis
2020-08-21 18:47     ` Alistair Francis
2020-08-14 16:40 ` [PATCH 17/18] hw/riscv: clint: Avoid using hard-coded timebase frequency Bin Meng
2020-08-25 18:33   ` Alistair Francis
2020-08-25 18:33     ` Alistair Francis
2020-08-14 16:40 ` [PATCH 18/18] hw/riscv: microchip_pfsoc: Document the software used for testing Bin Meng
2020-08-21 18:51   ` Alistair Francis
2020-08-21 18:51     ` Alistair Francis
2020-08-14 17:44 ` [PATCH 00/18] hw/riscv: Add Microchip PolarFire SoC Icicle Kit board support Anup Patel
2020-08-14 17:44   ` Anup Patel
2020-08-17 10:30   ` Bin Meng
2020-08-17 10:30     ` Bin Meng
2020-08-17 15:44     ` via
2020-08-17 15:44       ` Cyril.Jean
2020-08-17 19:28       ` Alistair Francis
2020-08-17 19:28         ` Alistair Francis
2020-08-17 19:53         ` via
2020-08-17 19:53           ` Cyril.Jean
2020-08-18  6:17           ` Anup Patel
2020-08-18  6:17             ` Anup Patel
2020-08-18 13:09             ` via
2020-08-18 13:09               ` Cyril.Jean
2020-08-18 13:55               ` Anup Patel
2020-08-18 13:55                 ` Anup Patel
2020-08-19  1:34                 ` Bin Meng
2020-08-19  1:34                   ` Bin Meng
2020-08-19 10:13                   ` via
2020-08-19 10:13                     ` Cyril.Jean
2020-08-21 18:23                     ` Alistair Francis
2020-08-21 18:23                       ` Alistair Francis
2020-08-14 18:10 ` no-reply
2020-08-14 18:10   ` no-reply

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.