1# Copyright (c) 2010-2012 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 --- 70 unchanged lines hidden (view full) --- 79 issubclass(cpu_class, BaseKvmCPU) 80 81# system under test can be any CPU 82(TestCPUClass, test_mem_mode, FutureClass) = Simulation.setCPUClass(options) 83 84TestCPUClass.clock = options.clock 85DriveCPUClass.clock = options.clock 86 |
87# Match the memories with the CPUs, the driver system always simple, 88# and based on the options for the test system 89DriveMemClass = SimpleMemory 90TestMemClass = Simulation.setMemClass(options) 91 |
92if options.benchmark: 93 try: 94 bm = Benchmarks[options.benchmark] 95 except KeyError: 96 print "Error benchmark %s has not been defined." % options.benchmark 97 print "Valid benchmarks are: %s" % DefinedBenchmarks 98 sys.exit(1) 99else: 100 if options.dual: 101 bm = [SysConfig(disk=options.disk_image, mem=options.mem_size), SysConfig(disk=options.disk_image, mem=options.mem_size)] 102 else: 103 bm = [SysConfig(disk=options.disk_image, mem=options.mem_size)] 104 105np = options.num_cpus 106 107if buildEnv['TARGET_ISA'] == "alpha": |
108 test_sys = makeLinuxAlphaSystem(test_mem_mode, TestMemClass, bm[0]) |
109elif buildEnv['TARGET_ISA'] == "mips": |
110 test_sys = makeLinuxMipsSystem(test_mem_mode, TestMemClass, bm[0]) |
111elif buildEnv['TARGET_ISA'] == "sparc": |
112 test_sys = makeSparcSystem(test_mem_mode, TestMemClass, bm[0]) |
113elif buildEnv['TARGET_ISA'] == "x86": |
114 test_sys = makeLinuxX86System(test_mem_mode, TestMemClass, 115 options.num_cpus, bm[0]) |
116elif buildEnv['TARGET_ISA'] == "arm": |
117 test_sys = makeArmSystem(test_mem_mode, options.machine_type, 118 TestMemClass, bm[0], options.dtb_filename, 119 bare_metal=options.bare_metal) |
120else: 121 fatal("Incapable of building %s full system!", buildEnv['TARGET_ISA']) 122 123if options.kernel is not None: 124 test_sys.kernel = binary(options.kernel) 125 126if options.script is not None: 127 test_sys.readfile = options.script --- 28 unchanged lines hidden (view full) --- 156 if options.checker: 157 test_sys.cpu[i].addCheckerCpu() 158 test_sys.cpu[i].createThreads() 159 160CacheConfig.config_cache(options, test_sys) 161 162if len(bm) == 2: 163 if buildEnv['TARGET_ISA'] == 'alpha': |
164 drive_sys = makeLinuxAlphaSystem(drive_mem_mode, DriveMemClass, bm[1]) |
165 elif buildEnv['TARGET_ISA'] == 'mips': |
166 drive_sys = makeLinuxMipsSystem(drive_mem_mode, DriveMemClass, bm[1]) |
167 elif buildEnv['TARGET_ISA'] == 'sparc': |
168 drive_sys = makeSparcSystem(drive_mem_mode, DriveMemClass, bm[1]) |
169 elif buildEnv['TARGET_ISA'] == 'x86': |
170 drive_sys = makeX86System(drive_mem_mode, DriveMemClass, np, bm[1]) |
171 elif buildEnv['TARGET_ISA'] == 'arm': |
172 drive_sys = makeArmSystem(drive_mem_mode, options.machine_type, 173 DriveMemClass, bm[1]) |
174 175 drive_sys.cpu = DriveCPUClass(cpu_id=0) 176 drive_sys.cpu.createThreads() 177 drive_sys.cpu.createInterruptController() 178 drive_sys.cpu.connectAllPorts(drive_sys.membus) 179 if options.fastmem: 180 drive_sys.cpu.fastmem = True 181 if options.kernel is not None: --- 26 unchanged lines hidden --- |