* 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:
@@ -107,6 +107,8 @@
|
|||||||
#define IOAPIC_REDIR_TABLE 0x10
|
#define IOAPIC_REDIR_TABLE 0x10
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#if !_BOOT_MODE
|
||||||
|
|
||||||
bool apic_available();
|
bool apic_available();
|
||||||
uint32 apic_read(uint32 offset);
|
uint32 apic_read(uint32 offset);
|
||||||
void apic_write(uint32 offset, uint32 data);
|
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_init(kernel_args *args);
|
||||||
status_t apic_per_cpu_init(kernel_args *args, int32 cpu);
|
status_t apic_per_cpu_init(kernel_args *args, int32 cpu);
|
||||||
|
|
||||||
|
#endif // !_BOOT_MODE
|
||||||
|
|
||||||
#endif /* _KERNEL_ARCH_x86_APIC_H */
|
#endif /* _KERNEL_ARCH_x86_APIC_H */
|
||||||
|
|||||||
@@ -18,8 +18,9 @@
|
|||||||
#include <safemode.h>
|
#include <safemode.h>
|
||||||
#include <boot/stage2.h>
|
#include <boot/stage2.h>
|
||||||
#include <boot/menu.h>
|
#include <boot/menu.h>
|
||||||
|
#include <arch/x86/apic.h>
|
||||||
#include <arch/x86/arch_acpi.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 <arch/x86/arch_system_info.h>
|
||||||
|
|
||||||
#include "mmu.h"
|
#include "mmu.h"
|
||||||
@@ -393,12 +394,12 @@ smp_init_other_cpus(void)
|
|||||||
TRACE(("smp disabled per safemode setting\n"));
|
TRACE(("smp disabled per safemode setting\n"));
|
||||||
gKernelArgs.num_cpus = 1;
|
gKernelArgs.num_cpus = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (get_safemode_boolean(B_SAFEMODE_DISABLE_APIC, false)) {
|
if (get_safemode_boolean(B_SAFEMODE_DISABLE_APIC, false)) {
|
||||||
TRACE(("local apic disabled per safemode setting\n"));
|
TRACE(("local apic disabled per safemode setting\n"));
|
||||||
gKernelArgs.arch_args.apic_phys = 0;
|
gKernelArgs.arch_args.apic_phys = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (gKernelArgs.arch_args.apic_phys == 0)
|
if (gKernelArgs.arch_args.apic_phys == 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@@ -585,14 +586,14 @@ smp_add_safemode_menus(Menu *menu)
|
|||||||
item->SetHelpText("Disables using the IO APIC for interrupt handling, "
|
item->SetHelpText("Disables using the IO APIC for interrupt handling, "
|
||||||
"forcing instead the use of the PIC.");
|
"forcing instead the use of the PIC.");
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
if (gKernelArgs.arch_args.apic_phys != 0) {
|
if (gKernelArgs.arch_args.apic_phys != 0) {
|
||||||
menu->AddItem(item = new(nothrow) MenuItem("Disable LOCAL APIC"));
|
menu->AddItem(item = new(nothrow) MenuItem("Disable LOCAL APIC"));
|
||||||
item->SetType(MENU_ITEM_MARKABLE);
|
item->SetType(MENU_ITEM_MARKABLE);
|
||||||
item->SetData(B_SAFEMODE_DISABLE_APIC);
|
item->SetData(B_SAFEMODE_DISABLE_APIC);
|
||||||
item->SetHelpText("Disables using the LOCAL APIC for timekeeping.");
|
item->SetHelpText("Disables using the LOCAL APIC for timekeeping.");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (gKernelArgs.num_cpus < 2)
|
if (gKernelArgs.num_cpus < 2)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user