[haiku-commits] r41370 - in haiku/trunk: headers/private/system src/system/boot/platform/bios_ia32 src/system/kernel/arch/x86

  • From: mmlr@xxxxxxxx
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Sat, 7 May 2011 23:41:09 +0200 (CEST)

Author: mmlr
Date: 2011-05-07 23:41:09 +0200 (Sat, 07 May 2011)
New Revision: 41370
Changeset: https://dev.haiku-os.org/changeset/41370

Modified:
   haiku/trunk/headers/private/system/safemode_defs.h
   haiku/trunk/src/system/boot/platform/bios_ia32/smp.cpp
   haiku/trunk/src/system/kernel/arch/x86/arch_int.cpp
Log:
Added a temporary opt-in option "enable_ioapic" to the boot menu. This way the
IO-APIC can be easily enabled to test it on various configurations. Note that
the previous default opt-out didn't work because the safemode options would not
be touched at all when not actually entering the boot menu.
Once IO-APIC is more broadly tested this can be removed again and the opt-out
option reenabled.


Modified: haiku/trunk/headers/private/system/safemode_defs.h
===================================================================
--- haiku/trunk/headers/private/system/safemode_defs.h  2011-05-07 19:41:31 UTC 
(rev 41369)
+++ haiku/trunk/headers/private/system/safemode_defs.h  2011-05-07 21:41:09 UTC 
(rev 41370)
@@ -21,5 +21,7 @@
 #      define B_SAFEMODE_DISABLE_LATENCY_CHECK "disable_latency_check"
 #endif
 
+#define B_SAFEMODE_ENABLE_IOAPIC                       "enable_ioapic"
+       // TODO: temprary opt-in, can be removed once IO-APIC code is broadly 
tested
 
 #endif /* _SYSTEM_SAFEMODE_DEFS_H */

Modified: haiku/trunk/src/system/boot/platform/bios_ia32/smp.cpp
===================================================================
--- haiku/trunk/src/system/boot/platform/bios_ia32/smp.cpp      2011-05-07 
19:41:31 UTC (rev 41369)
+++ haiku/trunk/src/system/boot/platform/bios_ia32/smp.cpp      2011-05-07 
21:41:09 UTC (rev 41370)
@@ -580,13 +580,19 @@
        MenuItem *item;
 
        if (gKernelArgs.arch_args.ioapic_phys != 0) {
+#if 0
                menu->AddItem(item = new(nothrow) MenuItem("Disable IO-APIC"));
                item->SetType(MENU_ITEM_MARKABLE);
-               item->SetMarked(true);
-                       // TODO: disabled by default for now
                item->SetData(B_SAFEMODE_DISABLE_IOAPIC);
-               item->SetHelpText("Disables using the IO APIC for interrupt 
handling, "
-                       "forcing instead the use of the PIC.");
+               item->SetHelpText("Disables using the IO APIC for interrupt 
routing, "
+                       "forcing the use of the legacy PIC instead.");
+#else
+               // TODO: This can be removed once IO-APIC code is broadly tested
+               menu->AddItem(item = new(nothrow) MenuItem("Enable IO-APIC"));
+               item->SetType(MENU_ITEM_MARKABLE);
+               item->SetData(B_SAFEMODE_ENABLE_IOAPIC);
+               item->SetHelpText("Enables using the IO APIC for interrupt 
routing.");
+#endif
        }
 
        if (gKernelArgs.arch_args.apic_phys != 0) {

Modified: haiku/trunk/src/system/kernel/arch/x86/arch_int.cpp
===================================================================
--- haiku/trunk/src/system/kernel/arch/x86/arch_int.cpp 2011-05-07 19:41:31 UTC 
(rev 41369)
+++ haiku/trunk/src/system/kernel/arch/x86/arch_int.cpp 2011-05-07 21:41:09 UTC 
(rev 41370)
@@ -614,11 +614,20 @@
        if (sIOAPIC == NULL)
                return;
 
-       if (get_safemode_boolean(B_SAFEMODE_DISABLE_IOAPIC, true)) {
+#if 0
+       if (get_safemode_boolean(B_SAFEMODE_DISABLE_IOAPIC, false)) {
                dprintf("ioapic explicitly disabled, not using ioapics for 
interrupt "
                        "routing\n");
                return;
        }
+#else
+       // TODO: This can be removed once IO-APIC code is broadly tested
+       if (!get_safemode_boolean(B_SAFEMODE_ENABLE_IOAPIC, false)) {
+               dprintf("ioapic not enabled, not using ioapics for interrupt "
+                       "routing\n");
+               return;
+       }
+#endif
 
        uint32 version = ioapic_read_32(IO_APIC_VERSION);
        if (version == 0xffffffff) {


Other related posts: