summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFelix Held <felix-coreboot@felixheld.de>2023-12-12 18:45:06 +0100
committerFelix Held <felix-coreboot@felixheld.de>2023-12-14 13:05:41 +0000
commit020d4b605e60664dcb06208df91c69a17ac42319 (patch)
tree0a9744f5eb26bde060202061486713c50310246f
parentd1065a3e640b6cc13a5901b77604ceb3e57063e0 (diff)
soc/amd/genoa/domain: generate SSDT entries for domains
Signed-off-by: Felix Held <felix-coreboot@felixheld.de> Change-Id: Iadc37f2724a9be43cad1f1934403ebabd5cca245 Reviewed-on: https://review.coreboot.org/c/coreboot/+/79469 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Martin L Roth <gaumless@gmail.com>
-rw-r--r--src/soc/amd/genoa/domain.c17
1 files changed, 17 insertions, 0 deletions
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,
};