Move the code which checks for disabled apic earlier (in the boot loader).

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35741 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Stefano Ceccherini
2010-03-03 19:14:42 +00:00
parent 8a076abfc1
commit 08876f2b96
3 changed files with 7 additions and 10 deletions
+6 -1
View File
@@ -393,7 +393,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;
-6
View File
@@ -553,12 +553,6 @@ ioapic_init(kernel_args *args)
return;
}
bool disableAPIC = get_safemode_boolean(B_SAFEMODE_DISABLE_APIC, false);
if (disableAPIC) {
args->arch_args.apic = NULL;
return;
}
// always map the local apic as it can be used for timers even if we
// don't end up using the io apic
sLocalAPIC = args->arch_args.apic;
+1 -3
View File
@@ -61,13 +61,11 @@ apic_write(uint32 offset, uint32 data)
static status_t
setup_apic(kernel_args *args, int32 cpu)
{
uint32 config;
TRACE(("setting up the APIC for CPU %ld...\n", cpu));
TRACE((" apic id %ld, version %ld\n", apic_read(APIC_ID), apic_read(APIC_VERSION)));
/* set spurious interrupt vector to 0xff */
config = apic_read(APIC_SPURIOUS_INTR_VECTOR) & 0xffffff00;
uint32 config = apic_read(APIC_SPURIOUS_INTR_VECTOR) & 0xffffff00;
config |= APIC_ENABLE | 0xff;
apic_write(APIC_SPURIOUS_INTR_VECTOR, config);