* Fix build, the APIC definitions are used in the bootloader too.

* Automatic whitespace cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36189 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Michael Lotz
2010-04-12 15:59:40 +00:00
parent aa26d10790
commit 3d310bd5f4
2 changed files with 10 additions and 5 deletions
+4
View File
@@ -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 */
+6 -5
View File
@@ -18,8 +18,9 @@
#include <safemode.h>
#include <boot/stage2.h>
#include <boot/menu.h>
#include <arch/x86/apic.h>
#include <arch/x86/arch_acpi.h>
#include <arch/x86/arch_apic.h>
#include <arch/x86/arch_smp.h>
#include <arch/x86/arch_system_info.h>
#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;