On Sun, 30 Jun 2019 at 11:21, Hongbo Zhang <hongbo.zh...@linaro.org> wrote: > > For the Aarch64, there is one machine 'virt', it is primarily meant to > run on KVM and execute virtualization workloads, but we need an > environment as faithful as possible to physical hardware, for supporting > firmware and OS development for pysical Aarch64 machines. > > This patch introduces new machine type 'sbsa-ref' with main features: > - Based on 'virt' machine type. > - A new memory map. > - CPU type cortex-a57. > - EL2 and EL3 are enabled. > - GIC version 3. > - System bus AHCI controller. > - System bus EHCI controller. > - CDROM and hard disc on AHCI bus. > - E1000E ethernet card on PCIE bus. > - VGA display adaptor on PCIE bus. > - No virtio deivces. > - No fw_cfg device. > - No ACPI table supplied. > - Only minimal device tree nodes. > > Arm Trusted Firmware and UEFI porting to this are done accordingly, and > it should supply ACPI tables to load OS, the minimal device tree nodes > supplied from this platform are only to pass the dynamic info reflecting > command line input to firmware, not for loading OS. > > To make the review easier, this task is split into two patches, the > fundamental sceleton part and the peripheral devices part, this patch is > the first part. > > Signed-off-by: Hongbo Zhang <hongbo.zh...@linaro.org> > --- > default-configs/arm-softmmu.mak | 1 + > hw/arm/Kconfig | 16 +++ > hw/arm/Makefile.objs | 1 + > hw/arm/sbsa-ref.c | 281 > ++++++++++++++++++++++++++++++++++++++++ > 4 files changed, 299 insertions(+) > create mode 100644 hw/arm/sbsa-ref.c > > diff --git a/default-configs/arm-softmmu.mak b/default-configs/arm-softmmu.mak > index 1f2e0e7..f9fdb73 100644 > --- a/default-configs/arm-softmmu.mak > +++ b/default-configs/arm-softmmu.mak > @@ -19,6 +19,7 @@ CONFIG_SX1=y > CONFIG_NSERIES=y > CONFIG_STELLARIS=y > CONFIG_REALVIEW=y > +CONFIG_SBSA_REF=y > CONFIG_VERSATILE=y > CONFIG_VEXPRESS=y > CONFIG_ZYNQ=y
Adding CONFIG_SBSA_REF=y here is what makes the board model available for the 32-bit-only qemu-system-arm. If you put it in aarch64-softmmu.mak instead it will be correctly restricted to the 64-bit binary. > diff --git a/hw/arm/Kconfig b/hw/arm/Kconfig > index 9aced9d..18e47b2 100644 > --- a/hw/arm/Kconfig > +++ b/hw/arm/Kconfig > @@ -184,6 +184,22 @@ config REALVIEW > select DS1338 # I2C RTC+NVRAM > select USB_OHCI > > +config SBSA_REF > + bool > + imply PCI_DEVICES > + select A15MPCORE This looks like a leftover from the virt config? > + select AHCI > + select ARM_SMMUV3 > + select GPIO_KEY > + select PCI_EXPRESS > + select PCI_EXPRESS_GENERIC_BRIDGE > + select PFLASH_CFI01 > + select PL011 # UART > + select PL031 # RTC > + select PL061 # GPIO > + select PLATFORM_BUS I don't think you use the platform-bus either, do you? > + select USB_EHCI_SYSBUS > + > config SABRELITE > bool > select FSL_IMX6 thanks -- PMM