acpi,soc/intel: Make soc/motherboard_fill_fadt() global

Change-Id: Iad7e7af802212d5445aed8bb08a55fd6c044d5bf
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/41916
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: Nico Huber <nico.h@gmx.de>
Reviewed-by: Patrick Rudolph <siro@das-labor.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
Kyösti Mälkki 2020-05-30 16:16:28 +03:00 committed by Patrick Georgi
parent bf06c0fc46
commit f9aac92880
8 changed files with 10 additions and 27 deletions

View File

@ -1220,6 +1220,10 @@ void acpi_write_bert(acpi_bert_t *bert, uintptr_t region, size_t length)
} }
#if CONFIG(COMMON_FADT) #if CONFIG(COMMON_FADT)
__weak void soc_fill_fadt(acpi_fadt_t *fadt) { }
__weak void motherboard_fill_fadt(acpi_fadt_t *fadt) { }
void acpi_create_fadt(acpi_fadt_t *fadt, acpi_facs_t *facs, void *dsdt) void acpi_create_fadt(acpi_fadt_t *fadt, acpi_facs_t *facs, void *dsdt)
{ {
acpi_header_t *header = &(fadt->header); acpi_header_t *header = &(fadt->header);
@ -1256,6 +1260,9 @@ void acpi_create_fadt(acpi_fadt_t *fadt, acpi_facs_t *facs, void *dsdt)
acpi_fill_fadt(fadt); acpi_fill_fadt(fadt);
soc_fill_fadt(fadt);
motherboard_fill_fadt(fadt);
header->checksum = header->checksum =
acpi_checksum((void *) fadt, header->length); acpi_checksum((void *) fadt, header->length);
} }

View File

@ -876,9 +876,10 @@ unsigned long acpi_fill_ivrs_ioapic(acpi_ivrs_t *ivrs, unsigned long current);
void acpi_create_ssdt_generator(acpi_header_t *ssdt, const char *oem_table_id); void acpi_create_ssdt_generator(acpi_header_t *ssdt, const char *oem_table_id);
void acpi_write_bert(acpi_bert_t *bert, uintptr_t region, size_t length); void acpi_write_bert(acpi_bert_t *bert, uintptr_t region, size_t length);
void acpi_create_fadt(acpi_fadt_t *fadt, acpi_facs_t *facs, void *dsdt); void acpi_create_fadt(acpi_fadt_t *fadt, acpi_facs_t *facs, void *dsdt);
#if CONFIG(COMMON_FADT)
void acpi_fill_fadt(acpi_fadt_t *fadt); void acpi_fill_fadt(acpi_fadt_t *fadt);
#endif void soc_fill_fadt(acpi_fadt_t *fadt);
void motherboard_fill_fadt(acpi_fadt_t *fadt);
void update_ssdt(void *ssdt); void update_ssdt(void *ssdt);
void update_ssdtx(void *ssdtx, int i); void update_ssdtx(void *ssdtx, int i);

View File

@ -89,10 +89,6 @@ unsigned long acpi_fill_madt(unsigned long current)
return acpi_madt_irq_overrides(current); return acpi_madt_irq_overrides(current);
} }
__weak void soc_fill_fadt(acpi_fadt_t *fadt)
{
}
void acpi_fill_fadt(acpi_fadt_t *fadt) void acpi_fill_fadt(acpi_fadt_t *fadt)
{ {
const uint16_t pmbase = ACPI_BASE_ADDRESS; const uint16_t pmbase = ACPI_BASE_ADDRESS;
@ -165,8 +161,6 @@ void acpi_fill_fadt(acpi_fadt_t *fadt)
fadt->x_gpe0_blk.addrh = 0; fadt->x_gpe0_blk.addrh = 0;
fadt->x_gpe1_blk.space_id = 1; fadt->x_gpe1_blk.space_id = 1;
soc_fill_fadt(fadt);
} }
unsigned long southbridge_write_acpi_tables(const struct device *device, unsigned long southbridge_write_acpi_tables(const struct device *device,

View File

@ -63,9 +63,6 @@ acpi_tstate_t *soc_get_tss_table(int *entries);
uint32_t acpi_fill_soc_wake(uint32_t generic_pm1_en, uint32_t acpi_fill_soc_wake(uint32_t generic_pm1_en,
const struct chipset_power_state *ps); const struct chipset_power_state *ps);
/* Chipset specific settings for filling up fadt table */
void soc_fill_fadt(acpi_fadt_t *fadt);
/* Chipset specific settings for filling up dmar table */ /* Chipset specific settings for filling up dmar table */
unsigned long sa_write_acpi_tables(const struct device *dev, unsigned long sa_write_acpi_tables(const struct device *dev,
unsigned long current, unsigned long current,

View File

@ -113,10 +113,6 @@ unsigned long acpi_fill_mcfg(unsigned long current)
return current; return current;
} }
__attribute__ ((weak)) void motherboard_fill_fadt(acpi_fadt_t *fadt)
{
}
void soc_fill_fadt(acpi_fadt_t *fadt) void soc_fill_fadt(acpi_fadt_t *fadt)
{ {
u16 pmbase = get_pmbase(); u16 pmbase = get_pmbase();
@ -220,8 +216,6 @@ void soc_fill_fadt(acpi_fadt_t *fadt)
fadt->x_gpe1_blk.access_size = 0; fadt->x_gpe1_blk.access_size = 0;
fadt->x_gpe1_blk.addrl = fadt->gpe1_blk; fadt->x_gpe1_blk.addrl = fadt->gpe1_blk;
fadt->x_gpe1_blk.addrh = 0x00; fadt->x_gpe1_blk.addrh = 0x00;
motherboard_fill_fadt(fadt);
} }
static acpi_tstate_t denverton_tss_table[] = { static acpi_tstate_t denverton_tss_table[] = {

View File

@ -13,6 +13,5 @@ unsigned long southcluster_write_acpi_tables(const struct device *device,
unsigned long current, unsigned long current,
struct acpi_rsdp *rsdp); struct acpi_rsdp *rsdp);
void southcluster_inject_dsdt(const struct device *device); void southcluster_inject_dsdt(const struct device *device);
void motherboard_fill_fadt(acpi_fadt_t *fadt);
#endif /* _DENVERTON_NS_ACPI_H_ */ #endif /* _DENVERTON_NS_ACPI_H_ */

View File

@ -176,10 +176,6 @@ unsigned long acpi_fill_madt(unsigned long current)
return acpi_madt_irq_overrides(current); return acpi_madt_irq_overrides(current);
} }
__attribute__ ((weak)) void motherboard_fill_fadt(acpi_fadt_t *fadt)
{
}
void generate_t_state_entries(int core, int cores_per_package) void generate_t_state_entries(int core, int cores_per_package)
{ {
} }
@ -327,8 +323,6 @@ void soc_fill_fadt(acpi_fadt_t *fadt)
fadt->x_gpe1_blk.access_size = 0; fadt->x_gpe1_blk.access_size = 0;
fadt->x_gpe1_blk.addrl = fadt->gpe1_blk; fadt->x_gpe1_blk.addrl = fadt->gpe1_blk;
fadt->x_gpe1_blk.addrh = 0x00; fadt->x_gpe1_blk.addrh = 0x00;
motherboard_fill_fadt(fadt);
} }
void acpi_fill_fadt(acpi_fadt_t *fadt) void acpi_fill_fadt(acpi_fadt_t *fadt)
@ -444,8 +438,6 @@ void acpi_fill_fadt(acpi_fadt_t *fadt)
fadt->x_gpe1_blk.access_size = 0; fadt->x_gpe1_blk.access_size = 0;
fadt->x_gpe1_blk.addrl = 0x0; fadt->x_gpe1_blk.addrl = 0x0;
fadt->x_gpe1_blk.addrh = 0x0; fadt->x_gpe1_blk.addrh = 0x0;
soc_fill_fadt(fadt);
} }
static acpi_tstate_t xeon_sp_tss_table[] = { static acpi_tstate_t xeon_sp_tss_table[] = {

View File

@ -18,6 +18,5 @@ void acpi_init_gnvs(global_nvs_t *gnvs);
unsigned long northbridge_write_acpi_tables(const struct device *device, unsigned long northbridge_write_acpi_tables(const struct device *device,
unsigned long current, struct acpi_rsdp *rsdp); unsigned long current, struct acpi_rsdp *rsdp);
void uncore_inject_dsdt(void); void uncore_inject_dsdt(void);
void motherboard_fill_fadt(acpi_fadt_t *fadt);
#endif /* _SOC_ACPI_H_ */ #endif /* _SOC_ACPI_H_ */