summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKyösti Mälkki <kyosti.malkki@gmail.com>2020-05-30 16:16:28 +0300
committerPatrick Georgi <pgeorgi@google.com>2020-06-07 21:45:00 +0000
commitf9aac92880829c5da2a594740142a4c98406d7f9 (patch)
tree8f3e4f3b6fe23439516414ace5eb6321fe122bb6
parentbf06c0fc46e795d18d2701ea497c26659f1d1eab (diff)
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>
-rw-r--r--src/acpi/acpi.c7
-rw-r--r--src/include/acpi/acpi.h5
-rw-r--r--src/soc/intel/common/block/acpi/acpi.c6
-rw-r--r--src/soc/intel/common/block/include/intelblocks/acpi.h3
-rw-r--r--src/soc/intel/denverton_ns/acpi.c6
-rw-r--r--src/soc/intel/denverton_ns/include/soc/acpi.h1
-rw-r--r--src/soc/intel/xeon_sp/skx/acpi.c8
-rw-r--r--src/soc/intel/xeon_sp/skx/include/soc/acpi.h1
8 files changed, 10 insertions, 27 deletions
diff --git a/src/acpi/acpi.c b/src/acpi/acpi.c
index 8bf4b49b66..2f4a2bb675 100644
--- a/src/acpi/acpi.c
+++ b/src/acpi/acpi.c
@@ -1220,6 +1220,10 @@ void acpi_write_bert(acpi_bert_t *bert, uintptr_t region, size_t length)
}
#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 @@ void acpi_create_fadt(acpi_fadt_t *fadt, acpi_facs_t *facs, void *dsdt)
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 e6c18c28a3..57109b4d5f 100644
--- a/src/include/acpi/acpi.h
+++ b/src/include/acpi/acpi.h
@@ -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_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 bda2399ac9..4e4906c5ad 100644
--- a/src/soc/intel/common/block/acpi/acpi.c
+++ b/src/soc/intel/common/block/acpi/acpi.c
@@ -89,10 +89,6 @@ unsigned long acpi_fill_madt(unsigned long current)
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 @@ void acpi_fill_fadt(acpi_fadt_t *fadt)
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 dde06c0a7c..19dd68af6c 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 @@ acpi_tstate_t *soc_get_tss_table(int *entries);
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 15d2e6611f..3b3e37a01b 100644
--- a/src/soc/intel/denverton_ns/acpi.c
+++ b/src/soc/intel/denverton_ns/acpi.c
@@ -113,10 +113,6 @@ unsigned long acpi_fill_mcfg(unsigned long current)
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 @@ void soc_fill_fadt(acpi_fadt_t *fadt)
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 e6b303ec64..00700a6aab 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 southcluster_write_acpi_tables(const struct device *device,
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 f5d4e7a188..3da2025e53 100644
--- a/src/soc/intel/xeon_sp/skx/acpi.c
+++ b/src/soc/intel/xeon_sp/skx/acpi.c
@@ -176,10 +176,6 @@ unsigned long acpi_fill_madt(unsigned long 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)
{
}
@@ -327,8 +323,6 @@ void soc_fill_fadt(acpi_fadt_t *fadt)
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 @@ void acpi_fill_fadt(acpi_fadt_t *fadt)
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 bd3187821f..c1d61c9025 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 @@ void acpi_init_gnvs(global_nvs_t *gnvs);
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_ */