FSConfig.py (11182:fa8b2a99d4fe) | FSConfig.py (11238:627dd43a5846) |
---|---|
1# Copyright (c) 2010-2012, 2015 ARM Limited 2# All rights reserved. 3# 4# The license below extends only to copyright in the software and shall 5# not be construed as granting a license to any other intellectual 6# property including but not limited to intellectual property relating 7# to a hardware implementation of the functionality of the software 8# licensed hereunder. You may use the software subject to the license --- 28 unchanged lines hidden (view full) --- 37# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 38# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 39# 40# Authors: Kevin Lim 41 42from m5.objects import * 43from Benchmarks import * 44from m5.util import * | 1# Copyright (c) 2010-2012, 2015 ARM Limited 2# All rights reserved. 3# 4# The license below extends only to copyright in the software and shall 5# not be construed as granting a license to any other intellectual 6# property including but not limited to intellectual property relating 7# to a hardware implementation of the functionality of the software 8# licensed hereunder. You may use the software subject to the license --- 28 unchanged lines hidden (view full) --- 37# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 38# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 39# 40# Authors: Kevin Lim 41 42from m5.objects import * 43from Benchmarks import * 44from m5.util import * |
45import PlatformConfig |
|
45 46# Populate to reflect supported os types per target ISA 47os_types = { 'alpha' : [ 'linux' ], 48 'mips' : [ 'linux' ], 49 'sparc' : [ 'linux' ], 50 'x86' : [ 'linux' ], 51 'arm' : [ 'linux', 52 'android-gingerbread', --- 149 unchanged lines hidden (view full) --- 202 203 return self 204 205def makeArmSystem(mem_mode, machine_type, num_cpus=1, mdesc=None, 206 dtb_filename=None, bare_metal=False, cmdline=None, 207 external_memory=""): 208 assert machine_type 209 | 46 47# Populate to reflect supported os types per target ISA 48os_types = { 'alpha' : [ 'linux' ], 49 'mips' : [ 'linux' ], 50 'sparc' : [ 'linux' ], 51 'x86' : [ 'linux' ], 52 'arm' : [ 'linux', 53 'android-gingerbread', --- 149 unchanged lines hidden (view full) --- 203 204 return self 205 206def makeArmSystem(mem_mode, machine_type, num_cpus=1, mdesc=None, 207 dtb_filename=None, bare_metal=False, cmdline=None, 208 external_memory=""): 209 assert machine_type 210 |
211 default_dtbs = { 212 "RealViewEB": None, 213 "RealViewPBX": None, 214 "VExpress_EMM": "vexpress.aarch32.ll_20131205.0-gem5.%dcpu.dtb" % num_cpus, 215 "VExpress_EMM64": "vexpress.aarch64.20140821.dtb", 216 } 217 218 default_kernels = { 219 "RealViewEB": "vmlinux.arm.smp.fb.2.6.38.8", 220 "RealViewPBX": "vmlinux.arm.smp.fb.2.6.38.8", 221 "VExpress_EMM": "vmlinux.aarch32.ll_20131205.0-gem5", 222 "VExpress_EMM64": "vmlinux.aarch64.20140821", 223 } 224 |
|
210 if bare_metal: 211 self = ArmSystem() 212 else: 213 self = LinuxArmSystem() 214 215 if not mdesc: 216 # generic system 217 mdesc = SysConfig() 218 219 self.readfile = mdesc.script() 220 self.iobus = IOXBar() 221 self.membus = MemBus() 222 self.membus.badaddr_responder.warn_access = "warn" 223 self.bridge = Bridge(delay='50ns') 224 self.bridge.master = self.iobus.slave 225 self.bridge.slave = self.membus.master 226 227 self.mem_mode = mem_mode 228 | 225 if bare_metal: 226 self = ArmSystem() 227 else: 228 self = LinuxArmSystem() 229 230 if not mdesc: 231 # generic system 232 mdesc = SysConfig() 233 234 self.readfile = mdesc.script() 235 self.iobus = IOXBar() 236 self.membus = MemBus() 237 self.membus.badaddr_responder.warn_access = "warn" 238 self.bridge = Bridge(delay='50ns') 239 self.bridge.master = self.iobus.slave 240 self.bridge.slave = self.membus.master 241 242 self.mem_mode = mem_mode 243 |
229 if machine_type == "RealView_PBX": 230 self.realview = RealViewPBX() 231 elif machine_type == "RealView_EB": 232 self.realview = RealViewEB() 233 elif machine_type == "VExpress_EMM": 234 self.realview = VExpress_EMM() 235 if not dtb_filename: 236 dtb_filename = 'vexpress.aarch32.ll_20131205.0-gem5.%dcpu.dtb' % num_cpus 237 elif machine_type == "VExpress_EMM64": 238 self.realview = VExpress_EMM64() | 244 platform_class = PlatformConfig.get(machine_type) 245 # Resolve the real platform name, the original machine_type 246 # variable might have been an alias. 247 machine_type = platform_class.__name__ 248 self.realview = platform_class() 249 250 if not dtb_filename and not bare_metal: 251 try: 252 dtb_filename = default_dtbs[machine_type] 253 except KeyError: 254 fatal("No DTB specified and no default DTB known for '%s'" % \ 255 machine_type) 256 257 if isinstance(self.realview, VExpress_EMM64): |
239 if os.path.split(mdesc.disk())[-1] == 'linux-aarch32-ael.img': 240 print "Selected 64-bit ARM architecture, updating default disk image..." 241 mdesc.diskname = 'linaro-minimal-aarch64.img' | 258 if os.path.split(mdesc.disk())[-1] == 'linux-aarch32-ael.img': 259 print "Selected 64-bit ARM architecture, updating default disk image..." 260 mdesc.diskname = 'linaro-minimal-aarch64.img' |
242 if not dtb_filename: 243 dtb_filename = 'vexpress.aarch64.20140821.dtb' 244 else: 245 print "Unknown Machine Type" 246 sys.exit(1) | |
247 248 self.cf0 = CowIdeDisk(driveID='master') 249 self.cf0.childImage(mdesc.disk()) 250 251 # Attach any PCI devices this platform supports 252 self.realview.attachPciDevices() 253 # default to an IDE controller rather than a CF one 254 try: --- 18 unchanged lines hidden (view full) --- 273 fatal("The currently selected ARM platforms doesn't support" \ 274 " the amount of DRAM you've selected. Please try" \ 275 " another platform") 276 277 if bare_metal: 278 # EOT character on UART will end the simulation 279 self.realview.uart.end_on_eot = True 280 else: | 261 262 self.cf0 = CowIdeDisk(driveID='master') 263 self.cf0.childImage(mdesc.disk()) 264 265 # Attach any PCI devices this platform supports 266 self.realview.attachPciDevices() 267 # default to an IDE controller rather than a CF one 268 try: --- 18 unchanged lines hidden (view full) --- 287 fatal("The currently selected ARM platforms doesn't support" \ 288 " the amount of DRAM you've selected. Please try" \ 289 " another platform") 290 291 if bare_metal: 292 # EOT character on UART will end the simulation 293 self.realview.uart.end_on_eot = True 294 else: |
281 if machine_type == "VExpress_EMM64": 282 self.kernel = binary('vmlinux.aarch64.20140821') 283 elif machine_type == "VExpress_EMM": 284 self.kernel = binary('vmlinux.aarch32.ll_20131205.0-gem5') 285 else: 286 self.kernel = binary('vmlinux.arm.smp.fb.2.6.38.8') | 295 if machine_type in default_kernels: 296 self.kernel = binary(default_kernels[machine_type]) |
287 288 if dtb_filename: 289 self.dtb_filename = binary(dtb_filename) | 297 298 if dtb_filename: 299 self.dtb_filename = binary(dtb_filename) |
290 self.machine_type = machine_type | 300 301 self.machine_type = machine_type if machine_type in ArmMachineType.map \ 302 else "DTOnly" 303 |
291 # Ensure that writes to the UART actually go out early in the boot 292 if not cmdline: 293 cmdline = 'earlyprintk=pl011,0x1c090000 console=ttyAMA0 ' + \ 294 'lpj=19988480 norandmaps rw loglevel=8 ' + \ 295 'mem=%(mem)s root=%(rootdev)s' 296 297 # When using external memory, gem5 writes the boot loader to nvmem 298 # and then SST will read from it, but SST can only get to nvmem from --- 349 unchanged lines hidden --- | 304 # Ensure that writes to the UART actually go out early in the boot 305 if not cmdline: 306 cmdline = 'earlyprintk=pl011,0x1c090000 console=ttyAMA0 ' + \ 307 'lpj=19988480 norandmaps rw loglevel=8 ' + \ 308 'mem=%(mem)s root=%(rootdev)s' 309 310 # When using external memory, gem5 writes the boot loader to nvmem 311 # and then SST will read from it, but SST can only get to nvmem from --- 349 unchanged lines hidden --- |