From b4f4b33adaae6b7a5f1239f31a12250de45eb7d5 Mon Sep 17 00:00:00 2001 From: Adrian Herrera Date: Mon, 23 Mar 2020 18:06:05 +0000 Subject: [PATCH] dev-arm: Add VExpress_GEM5_Foundation platform A new VExpress_GEM5_Foundation platform has been added in order to match the FVP Armv8-A Foundation Platform described in: Armv8-A Foundation Platform - User Guide - Version 11.8 The VExpress_GEM5_V1/V2 are already loosely based on the Foundation platform, however there are some differences in the PCI regions (V1/V2) and the GICv3 regions (V2). We hence introduce the VExpress_GEM5_Foundation to match closely the FVP Foundation Platform Change-Id: I1604c64ce566308d888c3a630019494b9fae7acf Signed-off-by: Giacomo Travaglini Reviewed-by: Nikos Nikoleris Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/27388 Tested-by: Gem5 Cloud Project GCB service account <345032938727@cloudbuild.gserviceaccount.com> Tested-by: kokoro Reviewed-by: Ciro Santilli --- src/dev/arm/RealView.py | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/src/dev/arm/RealView.py b/src/dev/arm/RealView.py index 0a26a9414..a22ac4a9a 100644 --- a/src/dev/arm/RealView.py +++ b/src/dev/arm/RealView.py @@ -1209,3 +1209,37 @@ class VExpress_GEM5_V2(VExpress_GEM5_V2_Base): self.hdlcd, ] +class VExpress_GEM5_Foundation(VExpress_GEM5_Base): + """ + Based on Armv8-A FVP Foundation platform v11.8 + Reference for memory and interrupt map: + Armv8-A Foundation Platform - User Guide - Version 11.8 + Document ID: 100961_1180_00_en + """ + _off_chip_ranges = [ + # CS1-CS5 + AddrRange(0x0c000000, 0x20000000), + # External AXI interface (PCI) + AddrRange(0x40000000, 0x80000000), + ] + + gic = Gicv3(dist_addr=0x2f000000, redist_addr=0x2f100000, + maint_int=ArmPPI(num=25), gicv4=False, + its=NULL) + + pci_host = GenericArmPciHost( + conf_base=0x40000000, conf_size='256MB', conf_device_bits=12, + pci_pio_base=0x50000000, + pci_mem_base=0x400000000, + int_policy="ARM_PCI_INT_DEV", int_base=100, int_count=4) + + def _on_chip_devices(self): + return super(VExpress_GEM5_Foundation, self)._on_chip_devices() + [ + self.gic + ] + + def setupBootLoader(self, cur_sys, loc, boot_loader=None): + if boot_loader is None: + boot_loader = [ loc('boot_v2.arm64') ] + super(VExpress_GEM5_Foundation, self).setupBootLoader( + cur_sys, boot_loader) -- 2.30.2