summaryrefslogtreecommitdiff
path: root/src/soc/amd/glinda/agesa_acpi.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/soc/amd/glinda/agesa_acpi.c')
-rw-r--r--src/soc/amd/glinda/agesa_acpi.c28
1 files changed, 28 insertions, 0 deletions
diff --git a/src/soc/amd/glinda/agesa_acpi.c b/src/soc/amd/glinda/agesa_acpi.c
new file mode 100644
index 0000000000..78c0e4cdf3
--- /dev/null
+++ b/src/soc/amd/glinda/agesa_acpi.c
@@ -0,0 +1,28 @@
+/* SPDX-License-Identifier: GPL-2.0-only */
+
+/* TODO: Make common? */
+
+#include <acpi/acpi.h>
+#include <amdblocks/acpi.h>
+#include <device/device.h>
+#include <FspGuids.h>
+#include <soc/acpi.h>
+#include <types.h>
+
+uintptr_t agesa_write_acpi_tables(const struct device *device, uintptr_t current,
+ acpi_rsdp_t *rsdp)
+{
+ acpi_ivrs_t *ivrs;
+
+ /* add ALIB SSDT from HOB */
+ current = add_agesa_fsp_acpi_table(AMD_FSP_ACPI_ALIB_HOB_GUID, "ALIB", rsdp, current);
+
+ /* IVRS */
+ current = ALIGN(current, 8);
+ ivrs = (acpi_ivrs_t *)current;
+ acpi_create_ivrs(ivrs, acpi_fill_ivrs);
+ current += ivrs->header.length;
+ acpi_add_table(rsdp, ivrs);
+
+ return current;
+}