summaryrefslogtreecommitdiff
path: root/configs/common/FSConfig.py
diff options
context:
space:
mode:
authorCurtis Dunham <Curtis.Dunham@arm.com>2015-04-08 15:56:06 -0500
committerCurtis Dunham <Curtis.Dunham@arm.com>2015-04-08 15:56:06 -0500
commitc3268f882029c7501867540ccf04db054fdff084 (patch)
tree6c31899946f53d46a0b7bbbfe7fd5dc782dfde2c /configs/common/FSConfig.py
parentf05cb84ed1a61f81c26e4ea22f98454d12f069aa (diff)
downloadgem5-c3268f882029c7501867540ccf04db054fdff084.tar.xz
config: Support full-system with SST's memory system
This patch adds an example configuration in ext/sst/tests/ that allows an SST/gem5 instance to simulate a 4-core AArch64 system with SST's memHierarchy components providing all the caches and memories.
Diffstat (limited to 'configs/common/FSConfig.py')
-rw-r--r--configs/common/FSConfig.py34
1 files changed, 30 insertions, 4 deletions
diff --git a/configs/common/FSConfig.py b/configs/common/FSConfig.py
index cfc156649..17f1f7641 100644
--- a/configs/common/FSConfig.py
+++ b/configs/common/FSConfig.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2010-2012 ARM Limited
+# Copyright (c) 2010-2012, 2015 ARM Limited
# All rights reserved.
#
# The license below extends only to copyright in the software and shall
@@ -203,7 +203,8 @@ def makeSparcSystem(mem_mode, mdesc=None):
return self
def makeArmSystem(mem_mode, machine_type, num_cpus=1, mdesc=None,
- dtb_filename=None, bare_metal=False, cmdline=None):
+ dtb_filename=None, bare_metal=False, cmdline=None,
+ external_memory=""):
assert machine_type
if bare_metal:
@@ -293,7 +294,15 @@ def makeArmSystem(mem_mode, machine_type, num_cpus=1, mdesc=None,
'lpj=19988480 norandmaps rw loglevel=8 ' + \
'mem=%(mem)s root=%(rootdev)s'
- self.realview.setupBootLoader(self.membus, self, binary)
+ # When using external memory, gem5 writes the boot loader to nvmem
+ # and then SST will read from it, but SST can only get to nvmem from
+ # iobus, as gem5's membus is only used for initialization and
+ # SST doesn't use it. Attaching nvmem to iobus solves this issue.
+ # During initialization, system_port -> membus -> iobus -> nvmem.
+ if external_memory:
+ self.realview.setupBootLoader(self.iobus, self, binary)
+ else:
+ self.realview.setupBootLoader(self.membus, self, binary)
self.gic_cpu_addr = self.realview.gic.cpu_addr
self.flags_addr = self.realview.realview_io.pio_addr + 0x30
@@ -322,7 +331,24 @@ def makeArmSystem(mem_mode, machine_type, num_cpus=1, mdesc=None,
self.boot_osflags = fillInCmdline(mdesc, cmdline)
- self.realview.attachOnChipIO(self.membus, self.bridge)
+ if external_memory:
+ # I/O traffic enters iobus
+ self.external_io = ExternalMaster(port_data="external_io",
+ port_type=external_memory)
+ self.external_io.port = self.iobus.slave
+
+ # Ensure iocache only receives traffic destined for (actual) memory.
+ self.iocache = ExternalSlave(port_data="iocache",
+ port_type=external_memory,
+ addr_ranges=self.mem_ranges)
+ self.iocache.port = self.iobus.master
+
+ # Let system_port get to nvmem and nothing else.
+ self.bridge.ranges = [self.realview.nvmem.range]
+
+ self.realview.attachOnChipIO(self.iobus)
+ else:
+ self.realview.attachOnChipIO(self.membus, self.bridge)
self.realview.attachIO(self.iobus)
self.intrctrl = IntrControl()
self.terminal = Terminal()