ACPI: Have common acpi_fill_mcfg()
As long as there is only one PCI segment we do not need more complicated MCFG generation. Change-Id: Ic2a8e84383883039bb7f994227e2e425366f9e13 Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/50666 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Angel Pons <th3fanbus@gmail.com> Reviewed-by: Nico Huber <nico.h@gmx.de>
This commit is contained in:
@@ -263,6 +263,13 @@ void acpi_create_madt(acpi_madt_t *madt)
|
||||
header->checksum = acpi_checksum((void *)madt, header->length);
|
||||
}
|
||||
|
||||
static unsigned long acpi_fill_mcfg(unsigned long current)
|
||||
{
|
||||
current += acpi_create_mcfg_mmconfig((acpi_mcfg_mmconfig_t *)current,
|
||||
CONFIG_MMCONF_BASE_ADDRESS, 0, 0, CONFIG_MMCONF_BUS_NUMBER - 1);
|
||||
return current;
|
||||
}
|
||||
|
||||
/* MCFG is defined in the PCI Firmware Specification 3.0. */
|
||||
void acpi_create_mcfg(acpi_mcfg_t *mcfg)
|
||||
{
|
||||
@@ -284,7 +291,8 @@ void acpi_create_mcfg(acpi_mcfg_t *mcfg)
|
||||
header->length = sizeof(acpi_mcfg_t);
|
||||
header->revision = get_acpi_table_revision(MCFG);
|
||||
|
||||
current = acpi_fill_mcfg(current);
|
||||
if (CONFIG(MMCONF_SUPPORT))
|
||||
current = acpi_fill_mcfg(current);
|
||||
|
||||
/* (Re)calculate length and checksum. */
|
||||
header->length = current - (unsigned long)mcfg;
|
||||
|
Reference in New Issue
Block a user