X86: Detect attempts to load a 32 bit kernel and panic.
authorGabe Black <gblack@eecs.umich.edu>
Mon, 11 Oct 2010 03:39:26 +0000 (20:39 -0700)
committerGabe Black <gblack@eecs.umich.edu>
Mon, 11 Oct 2010 03:39:26 +0000 (20:39 -0700)
src/arch/x86/system.cc

index f12d6e424f1c079564e5ebf2f1cbf89bd2139ea5..ae47b14fd77d91f41151503d2d26a16c9e976ee2 100644 (file)
@@ -60,7 +60,10 @@ X86System::X86System(Params *p) :
     mpFloatingPointer(p->intel_mp_pointer),
     mpConfigTable(p->intel_mp_table),
     rsdp(p->acpi_description_table_pointer)
-{}
+{
+    if (kernel->getArch() == ObjectFile::I386)
+        fatal("Loading a 32 bit x86 kernel is not supported.\n");
+}
 
 static void
 installSegDesc(ThreadContext *tc, SegmentRegIndex seg,