X86: Adjust the config scripts for x86 fs.
authorGabe Black <gblack@eecs.umich.edu>
Mon, 8 Oct 2007 00:52:36 +0000 (17:52 -0700)
committerGabe Black <gblack@eecs.umich.edu>
Mon, 8 Oct 2007 00:52:36 +0000 (17:52 -0700)
--HG--
extra : convert_revision : 36ed22b50066f54be0e51c3419babc07dd218e10

configs/common/FSConfig.py
configs/example/fs.py
src/arch/x86/interrupts.hh

index 2ab214dc50e34a81c0e4ba3dce94c01a779dee6f..78be4fc3a57a4a5005d69bfab799bffe60e6d079 100644 (file)
@@ -118,6 +118,25 @@ def makeSparcSystem(mem_mode, mdesc = None):
 
     return self
 
+def makeX86System(mem_mode, mdesc = None):
+    self = X86System()
+    if not mdesc:
+        # generic system
+        mdesc = SysConfig()
+    self.readfile = mdesc.script()
+
+    # Physical memory
+    self.membus = Bus(bus_id=0)
+    self.physmem = PhysicalMemory(range = AddrRange(mdesc.mem()))
+    self.physmem.port = self.membus.port
+
+    # Platform
+    self.opteron = Opteron()
+
+    self.intrctrl = IntrControl()
+
+    return self
+
 
 def makeDualRoot(testSystem, driveSystem, dumpfile):
     self = Root()
index 3a57fe5b8be154b46a953a8726128d006a2d4d86..ea525bf412a9691f9865b0c0764397a5c8ba6d31 100644 (file)
@@ -99,6 +99,8 @@ if m5.build_env['TARGET_ISA'] == "alpha":
     test_sys = makeLinuxAlphaSystem(test_mem_mode, bm[0])
 elif m5.build_env['TARGET_ISA'] == "sparc":
     test_sys = makeSparcSystem(test_mem_mode, bm[0])
+elif m5.build_env['TARGET_ISA'] == "x86":
+    test_sys = makeX86System(test_mem_mode, bm[0])
 else:
     m5.panic("incapable of building non-alpha or non-sparc full system!")
 
@@ -140,6 +142,8 @@ if len(bm) == 2:
         drive_sys = makeLinuxAlphaSystem(drive_mem_mode, bm[1])
     elif m5.build_env['TARGET_ISA'] == 'sparc':
         drive_sys = makeSparcSystem(drive_mem_mode, bm[1])
+    elif m5.build.env['TARGET_ISA'] == 'x86':
+        drive_sys = makeX86System(drive_mem_mode, bm[1])
     drive_sys.cpu = DriveCPUClass(cpu_id=0)
     drive_sys.cpu.connectMemPorts(drive_sys.membus)
     if options.fastmem:
index 614909f73763ad08a7e665d15d4d553918b2fa08..0ae68618a6bcd2b07a2b91d7f548268ca6ac63b1 100644 (file)
@@ -74,56 +74,56 @@ class Interrupts
 
     int InterruptLevel(uint64_t softint)
     {
-        panic("Interrupts don't work on x86!\n");
+        panic("Interrupts::InterruptLevel unimplemented!\n");
         return 0;
     }
 
     void post(int int_num, int index)
     {
-        panic("Interrupts don't work on x86!\n");
+        panic("Interrupts::post unimplemented!\n");
     }
 
     void clear(int int_num, int index)
     {
-        panic("Interrupts don't work on x86!\n");
+        panic("Interrupts::clear unimplemented!\n");
     }
 
     void clear_all()
     {
-        panic("Interrupts don't work on x86!\n");
+        warn("Interrupts::clear_all unimplemented!\n");
     }
 
     bool check_interrupts(ThreadContext * tc) const
     {
-        panic("Interrupts don't work on x86!\n");
+        panic("Interrupts::check_interrupts unimplemented!\n");
         return false;
     }
 
     Fault getInterrupt(ThreadContext * tc)
     {
-        panic("Interrupts don't work on x86!\n");
+        panic("Interrupts::getInterrupt unimplemented!\n");
         return NoFault;
     }
 
     void updateIntrInfo(ThreadContext * tc)
     {
-        panic("Interrupts don't work on x86!\n");
+        panic("Interrupts::updateIntrInfo unimplemented!\n");
     }
 
     uint64_t get_vec(int int_num)
     {
-        panic("Interrupts don't work on x86!\n");
+        panic("Interrupts::get_vec unimplemented!\n");
         return 0;
     }
 
     void serialize(std::ostream & os)
     {
-        panic("Interrupts don't work on x86!\n");
+        panic("Interrupts::serialize unimplemented!\n");
     }
 
     void unserialize(Checkpoint * cp, const std::string & section)
     {
-        panic("Interrupts don't work on x86!\n");
+        panic("Interrupts::unserialize unimplemented!\n");
     }
 };