summaryrefslogtreecommitdiff
path: root/configs/common/FSConfig.py
diff options
context:
space:
mode:
authorAndreas Sandberg <andreas.sandberg@arm.com>2016-01-15 11:30:13 +0000
committerAndreas Sandberg <andreas.sandberg@arm.com>2016-01-15 11:30:13 +0000
commit745f8229f69a4dfc32b06d8bca63a5d8e922a891 (patch)
treede5df720e2015e56a660551e3d7d3c0d8b303624 /configs/common/FSConfig.py
parent6d058a63b0f6fde683de46ea27497bb34855c7d1 (diff)
downloadgem5-745f8229f69a4dfc32b06d8bca63a5d8e922a891.tar.xz
dev, arm: Add a platform with support for both aarch32 and aarch64
Add a platform with support for both aarch32 and aarch64. This platform implements a subset of the devices in a real Versatile Express and extends it with some gem5-specific functionality. It is in many ways similar to the old VExpress_EMM64 platform, but supports the following new features: * Automatic PCI interrupt assignment * PCI interrupts allocated in a contiguous range. * Automatic boot loader selection (32-bit / 64-bit) * Cleaner memory map where gem5-specific devices live in CS5 which isn't used by current Versatile Express platforms. * No fake devices. Devices that were previously faked will be removed from the device tree instead. * Support for 510 GiB contiguous memory
Diffstat (limited to 'configs/common/FSConfig.py')
-rw-r--r--configs/common/FSConfig.py24
1 files changed, 19 insertions, 5 deletions
diff --git a/configs/common/FSConfig.py b/configs/common/FSConfig.py
index 004d06d55..eea6b2ad0 100644
--- a/configs/common/FSConfig.py
+++ b/configs/common/FSConfig.py
@@ -220,6 +220,8 @@ def makeArmSystem(mem_mode, machine_type, num_cpus=1, mdesc=None,
"VExpress_EMM64": "vmlinux.aarch64.20140821",
}
+ pci_devices = []
+
if bare_metal:
self = ArmSystem()
else:
@@ -257,16 +259,22 @@ def makeArmSystem(mem_mode, machine_type, num_cpus=1, mdesc=None,
print "Selected 64-bit ARM architecture, updating default disk image..."
mdesc.diskname = 'linaro-minimal-aarch64.img'
- self.cf0 = CowIdeDisk(driveID='master')
- self.cf0.childImage(mdesc.disk())
# Attach any PCI devices this platform supports
self.realview.attachPciDevices()
- # default to an IDE controller rather than a CF one
- try:
+
+ self.cf0 = CowIdeDisk(driveID='master')
+ self.cf0.childImage(mdesc.disk())
+ # Old platforms have a built-in IDE or CF controller. Default to
+ # the IDE controller if both exist. New platforms expect the
+ # storage controller to be added from the config script.
+ if hasattr(self.realview, "ide"):
self.realview.ide.disks = [self.cf0]
- except:
+ elif hasattr(self.realview, "cf_ctrl"):
self.realview.cf_ctrl.disks = [self.cf0]
+ else:
+ self.pci_ide = IdeController(disks=[self.cf0])
+ pci_devices.append(self.pci_ide)
self.mem_ranges = []
size_remain = long(Addr(mdesc.mem()))
@@ -360,7 +368,13 @@ def makeArmSystem(mem_mode, machine_type, num_cpus=1, mdesc=None,
self.realview.attachOnChipIO(self.iobus)
else:
self.realview.attachOnChipIO(self.membus, self.bridge)
+
+ # 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.intrctrl = IntrControl()
self.terminal = Terminal()
self.vncserver = VncServer()