From eb87ed8e7458c3214d4163a7dbb180110b375d98 Mon Sep 17 00:00:00 2001 From: Andreas Sandberg Date: Wed, 10 Aug 2016 16:26:34 +0100 Subject: arm, config: Add initial support for Ruby Add initial support for creating an ARM system with a Ruby-based memory system. This support is currently experimental and limited to the new VExpress_GEM5_V1 platform. Change-Id: I36baeb68b0d891e34ea46aafe17b5e55217b4bfa Signed-off-by: Andreas Sandberg Reviewed-by: Nikos Nikoleris Reviewed-by: Jason Lowe-Power Reviewed-by: Brad Beckmann --- configs/common/FSConfig.py | 36 ++++++++++++++++++++++++------------ 1 file changed, 24 insertions(+), 12 deletions(-) (limited to 'configs/common/FSConfig.py') diff --git a/configs/common/FSConfig.py b/configs/common/FSConfig.py index e6dcac8a4..33b51b4f4 100644 --- a/configs/common/FSConfig.py +++ b/configs/common/FSConfig.py @@ -1,4 +1,4 @@ -# Copyright (c) 2010-2012, 2015 ARM Limited +# Copyright (c) 2010-2012, 2015-2016 ARM Limited # All rights reserved. # # The license below extends only to copyright in the software and shall @@ -203,7 +203,7 @@ def makeSparcSystem(mem_mode, mdesc=None, cmdline=None): def makeArmSystem(mem_mode, machine_type, num_cpus=1, mdesc=None, dtb_filename=None, bare_metal=False, cmdline=None, - external_memory=""): + external_memory="", ruby=False): assert machine_type default_dtbs = { @@ -233,11 +233,12 @@ def makeArmSystem(mem_mode, machine_type, num_cpus=1, mdesc=None, self.readfile = mdesc.script() self.iobus = IOXBar() - self.membus = MemBus() - self.membus.badaddr_responder.warn_access = "warn" - self.bridge = Bridge(delay='50ns') - self.bridge.master = self.iobus.slave - self.bridge.slave = self.membus.master + if not ruby: + self.bridge = Bridge(delay='50ns') + self.bridge.master = self.iobus.slave + self.membus = MemBus() + self.membus.badaddr_responder.warn_access = "warn" + self.bridge.slave = self.membus.master self.mem_mode = mem_mode @@ -318,7 +319,7 @@ def makeArmSystem(mem_mode, machine_type, num_cpus=1, mdesc=None, # 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: + if external_memory or ruby: self.realview.setupBootLoader(self.iobus, self, binary) else: self.realview.setupBootLoader(self.membus, self, binary) @@ -366,20 +367,31 @@ def makeArmSystem(mem_mode, machine_type, num_cpus=1, mdesc=None, self.bridge.ranges = [self.realview.nvmem.range] self.realview.attachOnChipIO(self.iobus) + # Attach off-chip devices + self.realview.attachIO(self.iobus) + elif ruby: + self._dma_ports = [ ] + self.realview.attachOnChipIO(self.iobus, dma_ports=self._dma_ports) + # Force Ruby to treat the boot ROM as an IO device. + self.realview.nvmem.in_addr_map = False + self.realview.attachIO(self.iobus, dma_ports=self._dma_ports) else: self.realview.attachOnChipIO(self.membus, self.bridge) + # Attach off-chip devices + self.realview.attachIO(self.iobus) - # Attach off-chip devices - self.realview.attachIO(self.iobus) for dev_id, dev in enumerate(pci_devices): dev.pci_bus, dev.pci_dev, dev.pci_func = (0, dev_id + 1, 0) - self.realview.attachPciDevice(dev, self.iobus) + self.realview.attachPciDevice( + dev, self.iobus, + dma_ports=self._dma_ports if ruby else None) self.intrctrl = IntrControl() self.terminal = Terminal() self.vncserver = VncServer() - self.system_port = self.membus.slave + if not ruby: + self.system_port = self.membus.slave return self -- cgit v1.2.3