soc/amd/genoa: Hook up IVRS generation

Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Change-Id: I0a6eaf43ab6da4bb4a0cc0bbefb5b75c206348f1
Reviewed-on: https://review.coreboot.org/c/coreboot/+/76534
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Marshall Dawson <marshalldawson3rd@gmail.com>
This commit is contained in:
Felix Held 2023-12-12 20:39:38 +01:00
parent 80434a6984
commit b499c1f014
4 changed files with 26 additions and 0 deletions

View File

@ -15,6 +15,7 @@ config SOC_SPECIFIC_OPTIONS
select SOC_AMD_COMMON_BLOCK_ACPI
select SOC_AMD_COMMON_BLOCK_ACPIMMIO
select SOC_AMD_COMMON_BLOCK_ACPI_CPU_POWER_STATE
select SOC_AMD_COMMON_BLOCK_ACPI_IVRS
select SOC_AMD_COMMON_BLOCK_AOAC
select SOC_AMD_COMMON_BLOCK_BANKED_GPIOS
select SOC_AMD_COMMON_BLOCK_CPUFREQ_FAM17H_19H

View File

@ -9,6 +9,8 @@
#include <amdblocks/data_fabric.h>
#include <arch/ioapic.h>
#include <console/console.h>
#include <device/device.h>
#include <soc/acpi.h>
#include <vendorcode/amd/opensil/genoa_poc/opensil.h>
/* TODO: this can go in a common place */
@ -53,6 +55,20 @@ void acpi_fill_fadt(acpi_fadt_t *fadt)
fadt->x_firmware_ctl_h = 0;
}
unsigned long soc_acpi_write_tables(const struct device *device, unsigned long current,
struct acpi_rsdp *rsdp)
{
/* IVRS */
acpi_ivrs_t *ivrs;
current = acpi_align_current(current);
ivrs = (acpi_ivrs_t *)current;
acpi_create_ivrs(ivrs, acpi_fill_ivrs);
current += ivrs->header.length;
acpi_add_table(rsdp, ivrs);
return current;
}
/* There are only the following 2 C-states reported by the reference firmware */
const acpi_cstate_t cstate_cfg_table[] = {
[0] = {

View File

@ -1,9 +1,12 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#include <device/device.h>
#include <soc/southbridge.h>
#include <soc/acpi.h>
static void soc_init(void *chip_info)
{
default_dev_ops_root.write_acpi_tables = soc_acpi_write_tables;
}
static void soc_final(void *chip_info)

View File

@ -3,6 +3,12 @@
#ifndef AMD_GENOA_ACPI_H
#define AMD_GENOA_ACPI_H
#include <acpi/acpi.h>
#include <device/device.h>
#define ACPI_SCI_IRQ 9
unsigned long soc_acpi_write_tables(const struct device *device, unsigned long current,
struct acpi_rsdp *rsdp);
#endif /* AMD_GENOA_ACPI_H */