]> xenbits.xensource.com Git - seabios.git/commit
allow CPUs to have non-contiguous Local APIC IDs (v2)
authorEduardo Habkost <ehabkost@redhat.com>
Wed, 25 Jul 2012 18:45:30 +0000 (15:45 -0300)
committerKevin O'Connor <kevin@koconnor.net>
Thu, 2 Aug 2012 00:46:28 +0000 (20:46 -0400)
commit008c1fc5bd4f1c545c38e07242ad676830ea7785
treee51e8eb1af2c65456e89dd2face138e581288afb
parente39b9381687c9ddd3f1eb08f9135c574c099ee06
allow CPUs to have non-contiguous Local APIC IDs (v2)

Extract Local APIC IDs directly from the CPUs, and instead of check for
"i < CountCPUs", check if the APIC ID was present on boot, when building
ACPI tables and the MP-Table.

This keeps ACPI Processor ID == APIC ID, but allows the
hardware<->SeaBIOS interface be completely APIC-ID based and not depend
on any other kind of "CPU identifier". This way, SeaBIOS may change the
way ACPI Processor IDs are chosen in the future.

As currently SeaBIOS supports only xAPIC and not x2APIC, the list of
present-on-boot APIC IDs is a 256-bit bitmap. If one day SeaBIOS starts
to support x2APIC, the data structure used to enumerate the APIC IDs
will have to be changed (but this is an internal implementation detail,
not visible to the OS or on any hardware<=>SeaBIOS interface).

For current QEMU versions (that always make the APIC IDs contiguous),
the OS-visible behavior and resulting ACPI tables should be exactly the
same. This patch will simply allow QEMU to start setting non-contiguous
APIC IDs (that is a requirement for some sockets/cores/threads topology
settings).

Changes v1 -> v2:
 - Use size suffixes on all asm instructions on smp.c
 - New patch description

Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
src/acpi-dsdt.dsl
src/acpi.c
src/mptable.c
src/smp.c
src/util.h