libpayload/arch/x86: Add support for initializing the APIC

This is just the bare minimum required to initialize the APIC. I only
support xAPIC and chose not to support x2APIC. We can add that
functionality later when it's required.

I also made the exception dispatcher call apic_eoi so that the callbacks
won't forget to call it.

BUG=b:109749762
TEST=Booted grunt and verified that depthcharge continued to function
and that linux booted correctly. Also verified GDB still works.

Change-Id: I420a4eadae84df088525e727b481089ef615183f
Signed-off-by: Raul E Rangel <rrangel@chromium.org>
Reviewed-on: https://review.coreboot.org/28241
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Martin Roth <martinroth@google.com>
This commit is contained in:
Raul E Rangel
2018-08-20 11:14:44 -06:00
committed by Martin Roth
parent 3d398ad37a
commit ac8ebd0e73
6 changed files with 255 additions and 0 deletions

View File

@@ -34,4 +34,7 @@ config ARCH_SPECIFIC_OPTIONS # dummy
select LITTLE_ENDIAN
select IO_ADDRESS_SPACE
config ENABLE_APIC
bool "Enables the Local APIC"
endif