From c2f2913ff23505ceba82f8e5f044ce032455765b Mon Sep 17 00:00:00 2001 From: Chun-Chen TK Hsu Date: Fri, 13 Sep 2019 12:43:00 +0800 Subject: config: Add fastmodel cluster in fs_bigLITTLE.py One can create a system with ARM FastModels CPU and GICv3 with --cpu-type fastmodel --machine-type VExpressFastmodel options. Currently the FastmodelCluster only supports one CPU. Change-Id: I2e985f08f9df01a703e21441c6f9bc1fbae4a222 Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/20901 Reviewed-by: Giacomo Travaglini Maintainer: Giacomo Travaglini Tested-by: kokoro --- src/arch/arm/fastmodel/GIC/FastModelGIC.py | 35 ++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) (limited to 'src') diff --git a/src/arch/arm/fastmodel/GIC/FastModelGIC.py b/src/arch/arm/fastmodel/GIC/FastModelGIC.py index 53b7e1a2d..72618b92d 100644 --- a/src/arch/arm/fastmodel/GIC/FastModelGIC.py +++ b/src/arch/arm/fastmodel/GIC/FastModelGIC.py @@ -464,3 +464,38 @@ class FastModelGIC(BaseGic): redistributor = VectorGicv3CommsInitiatorSocket( 'GIC communication initiator') + + def get_redist_bases(self): + """ + The format of reg_base_per_redistributor is + '0.0.0.0=0x2c010000,0.0.0.1=0x2c020000...' + Return an array of base addresses + """ + redists = self.sc_gic.reg_base_per_redistributor.split(",") + # make sure we have at least one redistributor + assert len(redists) > 0 and "=" in redists[0] + return [ int(r.split('=')[1], 16) for r in redists ] + + def get_addr_ranges(self): + """ Return address ranges that should be served by this GIC """ + sc_gic = self.sc_gic + gic_frame_size = 0x10000 + # Add range of distributor + ranges = [AddrRange(sc_gic.reg_base, size=gic_frame_size)] + # Add ranges of redistributors + redist_frame_size = gic_frame_size * (4 if sc_gic.has_gicv4_1 else 2) + ranges += [ + AddrRange(redist_base, size=redist_frame_size) + for redist_base in self.get_redist_bases() + ] + # Add ranges of ITSs + its_bases = [ + sc_gic.its0_base, sc_gic.its1_base, sc_gic.its2_base, + sc_gic.its3_base + ] + ranges += [ + AddrRange(its_bases[i], size=2 * gic_frame_size) + for i in xrange(sc_gic.its_count) + ] + + return ranges -- cgit v1.2.3