提交 ac049c1d 编写于 作者: J Jack Steiner 提交者: Ingo Molnar

x86: parsing for ACPI "SAPIC" table

Add kernel support for new ACPI "sapic" tables that contain 16-bit APICIDs.
This patch simply adds parsing of an optional SAPIC table if present.
Otherwise, the traditional local APIC table is used.

Note: the SAPIC table is not a new ACPI table - it exists on other architectures
but is not currently recognized by x86_64.
Signed-off-by: NJack Steiner <steiner@sgi.com>
Signed-off-by: NIngo Molnar <mingo@elte.hu>
上级 a65d1d64
...@@ -264,6 +264,24 @@ acpi_parse_lapic(struct acpi_subtable_header * header, const unsigned long end) ...@@ -264,6 +264,24 @@ acpi_parse_lapic(struct acpi_subtable_header * header, const unsigned long end)
return 0; return 0;
} }
static int __init
acpi_parse_sapic(struct acpi_subtable_header *header, const unsigned long end)
{
struct acpi_madt_local_sapic *processor = NULL;
processor = (struct acpi_madt_local_sapic *)header;
if (BAD_MADT_ENTRY(processor, end))
return -EINVAL;
acpi_table_print_madt_entry(header);
mp_register_lapic((processor->id << 8) | processor->eid,/* APIC ID */
processor->lapic_flags & ACPI_MADT_ENABLED); /* Enabled? */
return 0;
}
static int __init static int __init
acpi_parse_lapic_addr_ovr(struct acpi_subtable_header * header, acpi_parse_lapic_addr_ovr(struct acpi_subtable_header * header,
const unsigned long end) const unsigned long end)
...@@ -757,8 +775,12 @@ static int __init acpi_parse_madt_lapic_entries(void) ...@@ -757,8 +775,12 @@ static int __init acpi_parse_madt_lapic_entries(void)
mp_register_lapic_address(acpi_lapic_addr); mp_register_lapic_address(acpi_lapic_addr);
count = acpi_table_parse_madt(ACPI_MADT_TYPE_LOCAL_APIC, acpi_parse_lapic, count = acpi_table_parse_madt(ACPI_MADT_TYPE_LOCAL_SAPIC,
MAX_APICS); acpi_parse_sapic, MAX_APICS);
if (!count)
count = acpi_table_parse_madt(ACPI_MADT_TYPE_LOCAL_APIC,
acpi_parse_lapic, MAX_APICS);
if (!count) { if (!count) {
printk(KERN_ERR PREFIX "No LAPIC entries present\n"); printk(KERN_ERR PREFIX "No LAPIC entries present\n");
/* TBD: Cleanup to allow fallback to MPS */ /* TBD: Cleanup to allow fallback to MPS */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册