summaryrefslogtreecommitdiff
path: root/configs/common
diff options
context:
space:
mode:
authorGabe Black <gblack@eecs.umich.edu>2011-02-07 01:22:15 -0800
committerGabe Black <gblack@eecs.umich.edu>2011-02-07 01:22:15 -0800
commitf8fc0419c5b1f4e20fd6886ca44626a2ca264fae (patch)
tree942490dffcf24d36d15e8fe2d978e7ec01080cb3 /configs/common
parent0c4b816d84541f832530d8a68aa51832d2a1b73f (diff)
downloadgem5-f8fc0419c5b1f4e20fd6886ca44626a2ca264fae.tar.xz
X86, Config: Move the setting of work count options to a separate function.
This way things that don't care about work count options and/or aren't called by something that has those command line options set up doesn't have to build a fake object to carry in inert values.
Diffstat (limited to 'configs/common')
-rw-r--r--configs/common/FSConfig.py36
1 files changed, 18 insertions, 18 deletions
diff --git a/configs/common/FSConfig.py b/configs/common/FSConfig.py
index e94818312..44ac104b5 100644
--- a/configs/common/FSConfig.py
+++ b/configs/common/FSConfig.py
@@ -405,8 +405,24 @@ def makeX86System(mem_mode, numCPUs = 1, mdesc = None, self = None, Ruby = False
for i in range(3, 15):
assignISAInt(i, i)
-def makeLinuxX86System(mem_mode, options, mdesc = None, Ruby = False):
- numCPUs = options.num_cpus
+def setWorkCountOptions(system, options):
+ if options.work_item_id != None:
+ system.work_item_id = options.work_item_id
+ if options.work_begin_cpu_id_exit != None:
+ system.work_begin_cpu_id_exit = options.work_begin_cpu_id_exit
+ if options.work_end_exit_count != None:
+ system.work_end_exit_count = options.work_end_exit_count
+ if options.work_end_checkpoint_count != None:
+ system.work_end_ckpt_count = options.work_end_checkpoint_count
+ if options.work_begin_exit_count != None:
+ system.work_begin_exit_count = options.work_begin_exit_count
+ if options.work_begin_checkpoint_count != None:
+ system.work_begin_ckpt_count = options.work_begin_checkpoint_count
+ if options.work_cpus_checkpoint_count != None:
+ system.work_cpus_ckpt_count = options.work_cpus_checkpoint_count
+
+
+def makeLinuxX86System(mem_mode, numCPUs = 1, mdesc = None, Ruby = False):
self = LinuxX86System()
# Build up the x86 system and then specialize it for Linux
@@ -416,22 +432,6 @@ def makeLinuxX86System(mem_mode, options, mdesc = None, Ruby = False):
# just to avoid corner cases.
assert(self.physmem.range.second.getValue() >= 0x200000)
- # set work count options
- if options.work_item_id != None:
- self.work_item_id = options.work_item_id
- if options.work_begin_cpu_id_exit != None:
- self.work_begin_cpu_id_exit = options.work_begin_cpu_id_exit
- if options.work_end_exit_count != None:
- self.work_end_exit_count = options.work_end_exit_count
- if options.work_end_checkpoint_count != None:
- self.work_end_ckpt_count = options.work_end_checkpoint_count
- if options.work_begin_exit_count != None:
- self.work_begin_exit_count = options.work_begin_exit_count
- if options.work_begin_checkpoint_count != None:
- self.work_begin_ckpt_count = options.work_begin_checkpoint_count
- if options.work_cpus_checkpoint_count != None:
- self.work_cpus_ckpt_count = options.work_cpus_checkpoint_count
-
# Mark the first megabyte of memory as reserved
self.e820_table.entries.append(X86E820Entry(
addr = 0,