x86: Don't touch IA32_APIC_BASE MSR on Intel Quark
Intel Quark processor core provides an integrated Local APIC but does not support the IA32_APIC_BASE MSR. As a result, the Local APIC is always globally enabled and the Local APIC base address is fixed at 0xfee00000. Attempting to access the IA32_APIC_BASE MSR causes a general protection fault. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
parent
0ac8d5e552
commit
3299be2479
|
|
@ -65,6 +65,7 @@ void lapic_write(unsigned long reg, unsigned long v)
|
|||
|
||||
void enable_lapic(void)
|
||||
{
|
||||
if (!IS_ENABLED(CONFIG_INTEL_QUARK)) {
|
||||
msr_t msr;
|
||||
|
||||
msr = msr_read(MSR_IA32_APICBASE);
|
||||
|
|
@ -74,15 +75,18 @@ void enable_lapic(void)
|
|||
msr.lo |= LAPIC_DEFAULT_BASE;
|
||||
msr_write(MSR_IA32_APICBASE, msr);
|
||||
}
|
||||
}
|
||||
|
||||
void disable_lapic(void)
|
||||
{
|
||||
if (!IS_ENABLED(CONFIG_INTEL_QUARK)) {
|
||||
msr_t msr;
|
||||
|
||||
msr = msr_read(MSR_IA32_APICBASE);
|
||||
msr.lo &= ~MSR_IA32_APICBASE_ENABLE;
|
||||
msr_write(MSR_IA32_APICBASE, msr);
|
||||
}
|
||||
}
|
||||
|
||||
unsigned long lapicid(void)
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in New Issue