X86: Add an Intel MP table to the simulation.
authorGabe Black <gblack@eecs.umich.edu>
Sat, 11 Oct 2008 22:14:37 +0000 (15:14 -0700)
committerGabe Black <gblack@eecs.umich.edu>
Sat, 11 Oct 2008 22:14:37 +0000 (15:14 -0700)
configs/common/FSConfig.py
src/arch/x86/bios/IntelMP.py

index b2d9935ce479f7efdac1566ca596e390eaac19dc..789145b666ed06a924695a2b7f5993498c0604ae 100644 (file)
@@ -189,6 +189,14 @@ def makeX86System(mem_mode, mdesc = None, self = None):
     structures = [X86SMBiosBiosInformation()]
     self.smbios_table.structures = structures
 
+    # Set up the Intel MP table
+    bp = X86IntelMPProcessor(
+            local_apic_id = 0,
+            local_apic_version = 0x14,
+            enable = True,
+            bootstrap = True)
+    self.intel_mp_table.add_entry(bp)
+
 
 def makeLinuxX86System(mem_mode, mdesc = None):
     self = LinuxX86System()
index 70e7963fa07eaf1bf284e9e45e725f7fc3e2621b..7589321809f1c848352653fbc5a8f39543d5674b 100644 (file)
@@ -86,6 +86,15 @@ class X86IntelMPConfigTable(SimObject):
     ext_entries = VectorParam.X86IntelMPExtConfigEntry([],
             'extended configuration table entries')
 
+    def add_entry(self, entry):
+        if isinstance(entry, X86IntelMPBaseConfigEntry):
+            self.base_entries.append(entry)
+        elif isinstance(entry, X86IntelMPExtConfigEntry):
+            self.base_entries.append(entry)
+        else:
+            panic("Don't know what type of Intel MP entry %s is." \
+                    % entry.__class__.__name__)
+
 class X86IntelMPBaseConfigEntry(SimObject):
     type = 'X86IntelMPBaseConfigEntry'
     cxx_class = 'X86ISA::IntelMP::BaseConfigEntry'