diff --git a/headers/private/kernel/arch/x86/apic.h b/headers/private/kernel/arch/x86/apic.h index e53ffe6483..bb01d628e8 100644 --- a/headers/private/kernel/arch/x86/apic.h +++ b/headers/private/kernel/arch/x86/apic.h @@ -107,6 +107,8 @@ #define IOAPIC_REDIR_TABLE 0x10 */ +#if !_BOOT_MODE + bool apic_available(); uint32 apic_read(uint32 offset); void apic_write(uint32 offset, uint32 data); @@ -116,4 +118,6 @@ void apic_end_of_interrupt(); status_t apic_init(kernel_args *args); status_t apic_per_cpu_init(kernel_args *args, int32 cpu); +#endif // !_BOOT_MODE + #endif /* _KERNEL_ARCH_x86_APIC_H */ diff --git a/src/system/boot/platform/bios_ia32/smp.cpp b/src/system/boot/platform/bios_ia32/smp.cpp index 456d88ce33..6b63742229 100644 --- a/src/system/boot/platform/bios_ia32/smp.cpp +++ b/src/system/boot/platform/bios_ia32/smp.cpp @@ -18,8 +18,9 @@ #include #include #include +#include #include -#include +#include #include #include "mmu.h" @@ -393,12 +394,12 @@ smp_init_other_cpus(void) TRACE(("smp disabled per safemode setting\n")); gKernelArgs.num_cpus = 1; } - + if (get_safemode_boolean(B_SAFEMODE_DISABLE_APIC, false)) { TRACE(("local apic disabled per safemode setting\n")); gKernelArgs.arch_args.apic_phys = 0; } - + if (gKernelArgs.arch_args.apic_phys == 0) return; @@ -585,14 +586,14 @@ smp_add_safemode_menus(Menu *menu) item->SetHelpText("Disables using the IO APIC for interrupt handling, " "forcing instead the use of the PIC."); } -#endif +#endif if (gKernelArgs.arch_args.apic_phys != 0) { menu->AddItem(item = new(nothrow) MenuItem("Disable LOCAL APIC")); item->SetType(MENU_ITEM_MARKABLE); item->SetData(B_SAFEMODE_DISABLE_APIC); item->SetHelpText("Disables using the LOCAL APIC for timekeeping."); } - + if (gKernelArgs.num_cpus < 2) return;