diff options
author | Andreas Sandberg <andreas.sandberg@arm.com> | 2016-01-15 11:30:13 +0000 |
---|---|---|
committer | Andreas Sandberg <andreas.sandberg@arm.com> | 2016-01-15 11:30:13 +0000 |
commit | 745f8229f69a4dfc32b06d8bca63a5d8e922a891 (patch) | |
tree | de5df720e2015e56a660551e3d7d3c0d8b303624 /configs | |
parent | 6d058a63b0f6fde683de46ea27497bb34855c7d1 (diff) | |
download | gem5-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')
-rw-r--r-- | configs/common/FSConfig.py | 24 | ||||
-rw-r--r-- | configs/common/PlatformConfig.py | 1 |
2 files changed, 20 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() diff --git a/configs/common/PlatformConfig.py b/configs/common/PlatformConfig.py index 636e6d8ac..1d047b118 100644 --- a/configs/common/PlatformConfig.py +++ b/configs/common/PlatformConfig.py @@ -48,6 +48,7 @@ _platform_classes = {} _platform_aliases_all = [ ("RealView_EB", "RealViewEB"), ("RealView_PBX", "RealViewPBX"), + ("VExpress_GEM5", "VExpress_GEM5_V1"), ] # Filtered list of aliases. Only aliases for existing platforms exist |