ACPI: Add helper for MADT LAPICs
This avoids some code duplication related to X2APIC mode. Change-Id: I592c69e0f52687924fe41189b082c86913999136 Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/74312 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Tim Wawrzynczak <inforichland@gmail.com>
This commit is contained in:
parent
9ac1fb729f
commit
2e9f0d3b6a
4 changed files with 23 additions and 23 deletions
|
|
@ -81,14 +81,9 @@ static unsigned long acpi_create_madt_lapics_hybrid(unsigned long current)
|
|||
{
|
||||
size_t index;
|
||||
|
||||
for (index = 0; index < cpu_apic_info.total_cpu_cnt; index++) {
|
||||
if (cpu_apic_info.apic_ids[index] < 0xff)
|
||||
current += acpi_create_madt_lapic((acpi_madt_lapic_t *)current,
|
||||
index, cpu_apic_info.apic_ids[index]);
|
||||
else
|
||||
current += acpi_create_madt_lx2apic((acpi_madt_lx2apic_t *)current,
|
||||
index, cpu_apic_info.apic_ids[index]);
|
||||
}
|
||||
for (index = 0; index < cpu_apic_info.total_cpu_cnt; index++)
|
||||
current = acpi_create_madt_one_lapic(current, index,
|
||||
cpu_apic_info.apic_ids[index]);
|
||||
|
||||
return current;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -540,8 +540,7 @@ unsigned long xeonsp_acpi_create_madt_lapics(unsigned long current)
|
|||
}
|
||||
if (!cpu->enabled)
|
||||
continue;
|
||||
current += acpi_create_madt_lapic((acpi_madt_lapic_t *)current, num_cpus,
|
||||
cpu->path.apic.apic_id);
|
||||
current = acpi_create_madt_one_lapic(current, num_cpus, cpu->path.apic.apic_id);
|
||||
num_cpus++;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue