From 020d4b605e60664dcb06208df91c69a17ac42319 Mon Sep 17 00:00:00 2001 From: Felix Held Date: Tue, 12 Dec 2023 18:45:06 +0100 Subject: soc/amd/genoa/domain: generate SSDT entries for domains Signed-off-by: Felix Held Change-Id: Iadc37f2724a9be43cad1f1934403ebabd5cca245 Reviewed-on: https://review.coreboot.org/c/coreboot/+/79469 Tested-by: build bot (Jenkins) Reviewed-by: Martin L Roth --- src/soc/amd/genoa/domain.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'src/soc') diff --git a/src/soc/amd/genoa/domain.c b/src/soc/amd/genoa/domain.c index 1a6115fcf2..8ed95abe34 100644 --- a/src/soc/amd/genoa/domain.c +++ b/src/soc/amd/genoa/domain.c @@ -57,9 +57,26 @@ static void genoa_domain_init(struct device *domain) register_new_ioapic((void *)(uintptr_t)res->base); } +static const char *genoa_domain_acpi_name(const struct device *domain) +{ + const char *domain_acpi_names[4] = { + "S0B0", + "S0B1", + "S0B2", + "S0B3", + }; + + if (domain->path.domain.domain < ARRAY_SIZE(domain_acpi_names)) + return domain_acpi_names[domain->path.domain.domain]; + + return NULL; +} + struct device_operations genoa_pci_domain_ops = { .read_resources = genoa_domain_read_resources, .set_resources = genoa_domain_set_resources, .scan_bus = amd_pci_domain_scan_bus, .init = genoa_domain_init, + .acpi_name = genoa_domain_acpi_name, + .acpi_fill_ssdt = amd_pci_domain_fill_ssdt, }; -- cgit v1.2.3