Felix Held | 144c7aa | 2021-05-04 21:06:04 +0200 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0-only */ |
| 2 | |
| 3 | #include <acpi/acpi.h> |
| 4 | #include <amdblocks/acpi.h> |
| 5 | #include <device/device.h> |
Felix Held | 8143d03 | 2021-05-04 21:20:06 +0200 | [diff] [blame] | 6 | #include <FspGuids.h> |
Felix Held | 144c7aa | 2021-05-04 21:06:04 +0200 | [diff] [blame] | 7 | #include <soc/acpi.h> |
| 8 | #include <types.h> |
| 9 | |
| 10 | uintptr_t agesa_write_acpi_tables(const struct device *device, uintptr_t current, |
| 11 | acpi_rsdp_t *rsdp) |
| 12 | { |
Jason Glenesk | 8d35428 | 2021-07-20 05:21:54 -0700 | [diff] [blame] | 13 | acpi_ivrs_t *ivrs; |
| 14 | |
Felix Held | 8143d03 | 2021-05-04 21:20:06 +0200 | [diff] [blame] | 15 | /* add ALIB SSDT from HOB */ |
| 16 | current = add_agesa_fsp_acpi_table(AMD_FSP_ACPI_ALIB_HOB_GUID, "ALIB", rsdp, current); |
| 17 | |
Jason Glenesk | 8d35428 | 2021-07-20 05:21:54 -0700 | [diff] [blame] | 18 | /* IVRS */ |
| 19 | current = ALIGN(current, 8); |
| 20 | ivrs = (acpi_ivrs_t *) current; |
| 21 | acpi_create_ivrs(ivrs, acpi_fill_ivrs); |
| 22 | current += ivrs->header.length; |
| 23 | acpi_add_table(rsdp, ivrs); |
| 24 | |
Felix Held | 144c7aa | 2021-05-04 21:06:04 +0200 | [diff] [blame] | 25 | return current; |
| 26 | } |