summaryrefslogtreecommitdiff
path: root/src/soc/amd/common/fsp
diff options
context:
space:
mode:
authorFelix Held <felix-coreboot@felixheld.de>2024-01-26 15:33:59 +0100
committerFelix Held <felix-coreboot@felixheld.de>2024-01-27 16:40:34 +0000
commit112c2277f51684157f5c46a06b3b038b5b730679 (patch)
tree4ff3ced247ed5e7342f34c00b2314ee22d55bc40 /src/soc/amd/common/fsp
parent26577d2ecbb8c01635b959d296f70eb251743046 (diff)
soc/amd: move acpi_add_fsp_tables implementation to common FSP code
Since the acpi_add_fsp_tables implementation is identical for all SoCs, factor it out and move it to the common AMD FSP code. Also guard the acpi_add_fsp_tables call in soc_acpi_write_tables with if (CONFIG(PLATFORM_USES_FSP2_0)) to properly handle the FSP dependency. Signed-off-by: Felix Held <felix-coreboot@felixheld.de> Change-Id: I8917a346f586e77b3b3278c73aed8cf61f3c9e6a Reviewed-on: https://review.coreboot.org/c/coreboot/+/80225 Reviewed-by: Matt DeVillier <matt.devillier@amd.corp-partner.google.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/soc/amd/common/fsp')
-rw-r--r--src/soc/amd/common/fsp/fsp-acpi.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/soc/amd/common/fsp/fsp-acpi.c b/src/soc/amd/common/fsp/fsp-acpi.c
index 6c65b3edfa..d30456ddf4 100644
--- a/src/soc/amd/common/fsp/fsp-acpi.c
+++ b/src/soc/amd/common/fsp/fsp-acpi.c
@@ -4,6 +4,7 @@
#include <amdblocks/acpi.h>
#include <console/console.h>
#include <fsp/util.h>
+#include <FspGuids.h>
#include <string.h>
#include <types.h>
@@ -15,8 +16,8 @@ struct amd_fsp_acpi_hob_info {
uint16_t hob_payload[0xffc8]; /* maximum payload size */
} __packed;
-unsigned long add_agesa_fsp_acpi_table(guid_t guid, const char *name, acpi_rsdp_t *rsdp,
- unsigned long current)
+static unsigned long add_agesa_fsp_acpi_table(guid_t guid, const char *name, acpi_rsdp_t *rsdp,
+ unsigned long current)
{
const struct amd_fsp_acpi_hob_info *data;
void *table = (void *)current;
@@ -44,3 +45,12 @@ unsigned long add_agesa_fsp_acpi_table(guid_t guid, const char *name, acpi_rsdp_
return current;
}
+
+unsigned long acpi_add_fsp_tables(unsigned long current, acpi_rsdp_t *rsdp)
+{
+ /* add ALIB SSDT from HOB */
+ current = acpi_align_current(current);
+ current = add_agesa_fsp_acpi_table(AMD_FSP_ACPI_ALIB_HOB_GUID, "ALIB", rsdp, current);
+
+ return current;
+}