arch/x86: Ensure LAPIC mode for exception handler
Attempting to use X2APIC MSRs before the call to enable_lapic() is made raises exception and double-faults. Change-Id: Ib97889466af0fbe639bec2be730784acc015b525 Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/76194 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Elyes Haouas <ehaouas@noos.fr>
This commit is contained in:
parent
47d61a7c14
commit
d7542cb338
2 changed files with 14 additions and 3 deletions
|
|
@ -184,4 +184,16 @@ void enable_lapic_mode(bool try_set_x2apic);
|
|||
void disable_lapic(void);
|
||||
void setup_lapic_interrupts(void);
|
||||
|
||||
static inline unsigned int early_lapicid(void)
|
||||
{
|
||||
if (!CONFIG(SMP))
|
||||
return 0;
|
||||
|
||||
if (!ENV_RAMSTAGE)
|
||||
return 0;
|
||||
|
||||
enable_lapic();
|
||||
return lapicid();
|
||||
}
|
||||
|
||||
#endif /* CPU_X86_LAPIC_H */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue