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>
diff --git a/src/acpi/acpi.c b/src/acpi/acpi.c
index 8bf4b49..2f4a2bb 100644
--- a/src/acpi/acpi.c
+++ b/src/acpi/acpi.c
@@ -1220,6 +1220,10 @@
}
#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)
{
acpi_header_t *header = &(fadt->header);
@@ -1256,6 +1260,9 @@
acpi_fill_fadt(fadt);
+ soc_fill_fadt(fadt);
+ motherboard_fill_fadt(fadt);
+
header->checksum =
acpi_checksum((void *) fadt, header->length);
}
diff --git a/src/include/acpi/acpi.h b/src/include/acpi/acpi.h
index e6c18c2..57109b4 100644
--- a/src/include/acpi/acpi.h
+++ b/src/include/acpi/acpi.h
@@ -876,9 +876,10 @@
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_create_fadt(acpi_fadt_t *fadt, acpi_facs_t *facs, void *dsdt);
-#if CONFIG(COMMON_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_ssdtx(void *ssdtx, int i);
diff --git a/src/soc/intel/common/block/acpi/acpi.c b/src/soc/intel/common/block/acpi/acpi.c
index bda2399..4e4906c 100644
--- a/src/soc/intel/common/block/acpi/acpi.c
+++ b/src/soc/intel/common/block/acpi/acpi.c
@@ -89,10 +89,6 @@
return acpi_madt_irq_overrides(current);
}
-__weak void soc_fill_fadt(acpi_fadt_t *fadt)
-{
-}
-
void acpi_fill_fadt(acpi_fadt_t *fadt)
{
const uint16_t pmbase = ACPI_BASE_ADDRESS;
@@ -165,8 +161,6 @@
fadt->x_gpe0_blk.addrh = 0;
fadt->x_gpe1_blk.space_id = 1;
-
- soc_fill_fadt(fadt);
}
unsigned long southbridge_write_acpi_tables(const struct device *device,
diff --git a/src/soc/intel/common/block/include/intelblocks/acpi.h b/src/soc/intel/common/block/include/intelblocks/acpi.h
index dde06c0..19dd68a 100644
--- a/src/soc/intel/common/block/include/intelblocks/acpi.h
+++ b/src/soc/intel/common/block/include/intelblocks/acpi.h
@@ -63,9 +63,6 @@
uint32_t acpi_fill_soc_wake(uint32_t generic_pm1_en,
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 */
unsigned long sa_write_acpi_tables(const struct device *dev,
unsigned long current,
diff --git a/src/soc/intel/denverton_ns/acpi.c b/src/soc/intel/denverton_ns/acpi.c
index 15d2e66..3b3e37a 100644
--- a/src/soc/intel/denverton_ns/acpi.c
+++ b/src/soc/intel/denverton_ns/acpi.c
@@ -113,10 +113,6 @@
return current;
}
-__attribute__ ((weak)) void motherboard_fill_fadt(acpi_fadt_t *fadt)
-{
-}
-
void soc_fill_fadt(acpi_fadt_t *fadt)
{
u16 pmbase = get_pmbase();
@@ -220,8 +216,6 @@
fadt->x_gpe1_blk.access_size = 0;
fadt->x_gpe1_blk.addrl = fadt->gpe1_blk;
fadt->x_gpe1_blk.addrh = 0x00;
-
- motherboard_fill_fadt(fadt);
}
static acpi_tstate_t denverton_tss_table[] = {
diff --git a/src/soc/intel/denverton_ns/include/soc/acpi.h b/src/soc/intel/denverton_ns/include/soc/acpi.h
index e6b303e..00700a6 100644
--- a/src/soc/intel/denverton_ns/include/soc/acpi.h
+++ b/src/soc/intel/denverton_ns/include/soc/acpi.h
@@ -13,6 +13,5 @@
unsigned long current,
struct acpi_rsdp *rsdp);
void southcluster_inject_dsdt(const struct device *device);
-void motherboard_fill_fadt(acpi_fadt_t *fadt);
#endif /* _DENVERTON_NS_ACPI_H_ */
diff --git a/src/soc/intel/xeon_sp/skx/acpi.c b/src/soc/intel/xeon_sp/skx/acpi.c
index f5d4e7a..3da2025 100644
--- a/src/soc/intel/xeon_sp/skx/acpi.c
+++ b/src/soc/intel/xeon_sp/skx/acpi.c
@@ -176,10 +176,6 @@
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)
{
}
@@ -327,8 +323,6 @@
fadt->x_gpe1_blk.access_size = 0;
fadt->x_gpe1_blk.addrl = fadt->gpe1_blk;
fadt->x_gpe1_blk.addrh = 0x00;
-
- motherboard_fill_fadt(fadt);
}
void acpi_fill_fadt(acpi_fadt_t *fadt)
@@ -444,8 +438,6 @@
fadt->x_gpe1_blk.access_size = 0;
fadt->x_gpe1_blk.addrl = 0x0;
fadt->x_gpe1_blk.addrh = 0x0;
-
- soc_fill_fadt(fadt);
}
static acpi_tstate_t xeon_sp_tss_table[] = {
diff --git a/src/soc/intel/xeon_sp/skx/include/soc/acpi.h b/src/soc/intel/xeon_sp/skx/include/soc/acpi.h
index bd31878..c1d61c9 100644
--- a/src/soc/intel/xeon_sp/skx/include/soc/acpi.h
+++ b/src/soc/intel/xeon_sp/skx/include/soc/acpi.h
@@ -18,6 +18,5 @@
unsigned long northbridge_write_acpi_tables(const struct device *device,
unsigned long current, struct acpi_rsdp *rsdp);
void uncore_inject_dsdt(void);
-void motherboard_fill_fadt(acpi_fadt_t *fadt);
#endif /* _SOC_ACPI_H_ */