kernel: Fix fpu on non-apic systems
* If apic is not present, the smp code never gets called to set up the fpu. * Detect lack of apic, and set up fpu in arch_cpu. * Should fix #8346 and #8348
This commit is contained in:
parent
4bd6c200c1
commit
c1cd48b72f
@ -26,6 +26,7 @@
|
|||||||
#include <vm/VMAddressSpace.h>
|
#include <vm/VMAddressSpace.h>
|
||||||
|
|
||||||
#include <arch_system_info.h>
|
#include <arch_system_info.h>
|
||||||
|
#include <arch/x86/apic.h>
|
||||||
#include <arch/x86/selector.h>
|
#include <arch/x86/selector.h>
|
||||||
#include <boot/kernel_args.h>
|
#include <boot/kernel_args.h>
|
||||||
|
|
||||||
@ -802,6 +803,10 @@ arch_cpu_init_post_vm(kernel_args *args)
|
|||||||
DT_DATA_WRITEABLE, DPL_USER);
|
DT_DATA_WRITEABLE, DPL_USER);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!apic_available())
|
||||||
|
x86_init_fpu();
|
||||||
|
// else fpu gets set up in smp code
|
||||||
|
|
||||||
return B_OK;
|
return B_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -73,10 +73,11 @@ i386_smp_error_interrupt(void *data)
|
|||||||
status_t
|
status_t
|
||||||
arch_smp_init(kernel_args *args)
|
arch_smp_init(kernel_args *args)
|
||||||
{
|
{
|
||||||
TRACE(("arch_smp_init: entry\n"));
|
TRACE(("%s: entry\n", __func__));
|
||||||
|
|
||||||
if (!apic_available()) {
|
if (!apic_available()) {
|
||||||
// if we don't have an apic we can't do smp
|
// if we don't have an apic we can't do smp
|
||||||
|
TRACE(("%s: apic not available for smp\n", __func__));
|
||||||
return B_OK;
|
return B_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user