fs.py (10547:b61dc895269a) | fs.py (10594:4fdc929c0aaa) |
---|---|
1# Copyright (c) 2010-2013 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 --- 57 unchanged lines hidden (view full) --- 66 67# Check if KVM support has been enabled, we might need to do VM 68# configuration if that's the case. 69have_kvm_support = 'BaseKvmCPU' in globals() 70def is_kvm_cpu(cpu_class): 71 return have_kvm_support and cpu_class != None and \ 72 issubclass(cpu_class, BaseKvmCPU) 73 | 1# Copyright (c) 2010-2013 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 --- 57 unchanged lines hidden (view full) --- 66 67# Check if KVM support has been enabled, we might need to do VM 68# configuration if that's the case. 69have_kvm_support = 'BaseKvmCPU' in globals() 70def is_kvm_cpu(cpu_class): 71 return have_kvm_support and cpu_class != None and \ 72 issubclass(cpu_class, BaseKvmCPU) 73 |
74def cmd_line_template(): 75 if options.command_line and options.command_line_file: 76 print "Error: --command-line and --command-line-file are " \ 77 "mutually exclusive" 78 sys.exit(1) 79 if options.command_line: 80 return options.command_line 81 if options.command_line_file: 82 return open(options.command_line_file).read().strip() 83 return None 84 |
|
74def build_test_system(np): | 85def build_test_system(np): |
86 cmdline = cmd_line_template() |
|
75 if buildEnv['TARGET_ISA'] == "alpha": | 87 if buildEnv['TARGET_ISA'] == "alpha": |
76 test_sys = makeLinuxAlphaSystem(test_mem_mode, bm[0], options.ruby) | 88 test_sys = makeLinuxAlphaSystem(test_mem_mode, bm[0], options.ruby, 89 cmdline=cmdline) |
77 elif buildEnv['TARGET_ISA'] == "mips": | 90 elif buildEnv['TARGET_ISA'] == "mips": |
78 test_sys = makeLinuxMipsSystem(test_mem_mode, bm[0]) | 91 test_sys = makeLinuxMipsSystem(test_mem_mode, bm[0], cmdline=cmdline) |
79 elif buildEnv['TARGET_ISA'] == "sparc": | 92 elif buildEnv['TARGET_ISA'] == "sparc": |
80 test_sys = makeSparcSystem(test_mem_mode, bm[0]) | 93 test_sys = makeSparcSystem(test_mem_mode, bm[0], cmdline=cmdline) |
81 elif buildEnv['TARGET_ISA'] == "x86": 82 test_sys = makeLinuxX86System(test_mem_mode, options.num_cpus, bm[0], | 94 elif buildEnv['TARGET_ISA'] == "x86": 95 test_sys = makeLinuxX86System(test_mem_mode, options.num_cpus, bm[0], |
83 options.ruby) | 96 options.ruby, cmdline=cmdline) |
84 elif buildEnv['TARGET_ISA'] == "arm": 85 test_sys = makeArmSystem(test_mem_mode, options.machine_type, 86 options.num_cpus, bm[0], options.dtb_filename, | 97 elif buildEnv['TARGET_ISA'] == "arm": 98 test_sys = makeArmSystem(test_mem_mode, options.machine_type, 99 options.num_cpus, bm[0], options.dtb_filename, |
87 bare_metal=options.bare_metal) | 100 bare_metal=options.bare_metal, 101 cmdline=cmdline) |
88 if options.enable_context_switch_stats_dump: 89 test_sys.enable_context_switch_stats_dump = True 90 else: 91 fatal("Incapable of building %s full system!", buildEnv['TARGET_ISA']) 92 93 # Set the cache line size for the entire system 94 test_sys.cache_line_size = options.cacheline_size 95 --- 101 unchanged lines hidden (view full) --- 197 198def build_drive_system(np): 199 # driver system CPU is always simple, so is the memory 200 # Note this is an assignment of a class, not an instance. 201 DriveCPUClass = AtomicSimpleCPU 202 drive_mem_mode = 'atomic' 203 DriveMemClass = SimpleMemory 204 | 102 if options.enable_context_switch_stats_dump: 103 test_sys.enable_context_switch_stats_dump = True 104 else: 105 fatal("Incapable of building %s full system!", buildEnv['TARGET_ISA']) 106 107 # Set the cache line size for the entire system 108 test_sys.cache_line_size = options.cacheline_size 109 --- 101 unchanged lines hidden (view full) --- 211 212def build_drive_system(np): 213 # driver system CPU is always simple, so is the memory 214 # Note this is an assignment of a class, not an instance. 215 DriveCPUClass = AtomicSimpleCPU 216 drive_mem_mode = 'atomic' 217 DriveMemClass = SimpleMemory 218 |
219 cmdline = cmd_line_template() |
|
205 if buildEnv['TARGET_ISA'] == 'alpha': | 220 if buildEnv['TARGET_ISA'] == 'alpha': |
206 drive_sys = makeLinuxAlphaSystem(drive_mem_mode, bm[1]) | 221 drive_sys = makeLinuxAlphaSystem(drive_mem_mode, bm[1], cmdline=cmdline) |
207 elif buildEnv['TARGET_ISA'] == 'mips': | 222 elif buildEnv['TARGET_ISA'] == 'mips': |
208 drive_sys = makeLinuxMipsSystem(drive_mem_mode, bm[1]) | 223 drive_sys = makeLinuxMipsSystem(drive_mem_mode, bm[1], cmdline=cmdline) |
209 elif buildEnv['TARGET_ISA'] == 'sparc': | 224 elif buildEnv['TARGET_ISA'] == 'sparc': |
210 drive_sys = makeSparcSystem(drive_mem_mode, bm[1]) | 225 drive_sys = makeSparcSystem(drive_mem_mode, bm[1], cmdline=cmdline) |
211 elif buildEnv['TARGET_ISA'] == 'x86': | 226 elif buildEnv['TARGET_ISA'] == 'x86': |
212 drive_sys = makeLinuxX86System(drive_mem_mode, np, bm[1]) | 227 drive_sys = makeLinuxX86System(drive_mem_mode, np, bm[1], 228 cmdline=cmdline) |
213 elif buildEnv['TARGET_ISA'] == 'arm': | 229 elif buildEnv['TARGET_ISA'] == 'arm': |
214 drive_sys = makeArmSystem(drive_mem_mode, options.machine_type, bm[1]) | 230 drive_sys = makeArmSystem(drive_mem_mode, options.machine_type, bm[1], 231 cmdline=cmdline) |
215 216 # Create a top-level voltage domain 217 drive_sys.voltage_domain = VoltageDomain(voltage = options.sys_voltage) 218 219 # Create a source clock for the system and set the clock period 220 drive_sys.clk_domain = SrcClockDomain(clock = options.sys_clock, 221 voltage_domain = drive_sys.voltage_domain) 222 --- 92 unchanged lines hidden --- | 232 233 # Create a top-level voltage domain 234 drive_sys.voltage_domain = VoltageDomain(voltage = options.sys_voltage) 235 236 # Create a source clock for the system and set the clock period 237 drive_sys.clk_domain = SrcClockDomain(clock = options.sys_clock, 238 voltage_domain = drive_sys.voltage_domain) 239 --- 92 unchanged lines hidden --- |