tests: Fail checkpoint regressions if no cpt has been taken
[gem5.git] / tests / configs / x86_generic.py
index e9e7bff63bfd9b54bbbb20a87db58b8e84667e9e..1ab5d3b06012fca2958a119e3b23fc297820cce1 100644 (file)
 # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#
-# Authors: Andreas Sandberg
 
 from abc import ABCMeta, abstractmethod
 import m5
 from m5.objects import *
 from m5.proxy import *
-m5.util.addToPath('../configs/common')
-from Benchmarks import SysConfig
-import FSConfig
-from Caches import *
+m5.util.addToPath('../configs/')
+from common.Benchmarks import SysConfig
+from common import FSConfig, SysPaths
+from common.Caches import *
 from base_config import *
 
 class LinuxX86SystemBuilder(object):
@@ -56,12 +54,11 @@ class LinuxX86SystemBuilder(object):
         pass
 
     def create_system(self):
-        mdesc = SysConfig(disk = 'linux-x86.img')
+        mdesc = SysConfig(disks = ['linux-x86.img'])
         system = FSConfig.makeLinuxX86System(self.mem_mode,
-                                             SimpleDDR3,
                                              numCPUs=self.num_cpus,
                                              mdesc=mdesc)
-        system.kernel = FSConfig.binary('x86_64-vmlinux-2.6.22.9')
+        system.kernel = SysPaths.binary('x86_64-vmlinux-2.6.22.9')
 
         self.init_system(system)
         return system
@@ -83,8 +80,8 @@ class LinuxX86FSSystem(LinuxX86SystemBuilder,
         LinuxX86SystemBuilder.__init__(self)
 
     def create_caches_private(self, cpu):
-        cpu.addPrivateSplitL1Caches(L1Cache(size='32kB', assoc=1),
-                                    L1Cache(size='32kB', assoc=4),
+        cpu.addPrivateSplitL1Caches(L1_ICache(size='32kB', assoc=1),
+                                    L1_DCache(size='32kB', assoc=4),
                                     PageTableWalkerCache(),
                                     PageTableWalkerCache())
 
@@ -102,8 +99,16 @@ class LinuxX86FSSystemUniprocessor(LinuxX86SystemBuilder,
         LinuxX86SystemBuilder.__init__(self)
 
     def create_caches_private(self, cpu):
-        cpu.addTwoLevelCacheHierarchy(L1Cache(size='32kB', assoc=1),
-                                      L1Cache(size='32kB', assoc=4),
+        cpu.addTwoLevelCacheHierarchy(L1_ICache(size='32kB', assoc=1),
+                                      L1_DCache(size='32kB', assoc=4),
                                       L2Cache(size='4MB', assoc=8),
                                       PageTableWalkerCache(),
                                       PageTableWalkerCache())
+
+
+class LinuxX86FSSwitcheroo(LinuxX86SystemBuilder, BaseFSSwitcheroo):
+    """Uniprocessor X86 system prepared for CPU switching"""
+
+    def __init__(self, **kwargs):
+        BaseFSSwitcheroo.__init__(self, **kwargs)
+        LinuxX86SystemBuilder.__init__(self)