From 6cdcd3f07d9fa0b6464c9fd274b345f02c5c84b3 Mon Sep 17 00:00:00 2001 From: Patrick Rudolph Date: Tue, 22 Oct 2024 08:24:18 +0200 Subject: soc/intel/common: sata: Opt out in sata_acpi_fill_ssdt() when not named When soc_acpi_name() returns NULL do not create the AML code. This prevents errors on the OS side when it tries to parse the AML code and doesn't find a name string for the device: ACPI Warning: Invalid character(s) in name (0x44415F08), repaired: [*_AD] Change-Id: I72225a975663a1028283437cac3b9231b7c77ead Signed-off-by: Patrick Rudolph Reviewed-on: https://review.coreboot.org/c/coreboot/+/84830 Tested-by: build bot (Jenkins) Reviewed-by: Subrata Banik --- src/soc/intel/common/block/sata/sata.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/soc') diff --git a/src/soc/intel/common/block/sata/sata.c b/src/soc/intel/common/block/sata/sata.c index 96b7390791..ca61c682df 100644 --- a/src/soc/intel/common/block/sata/sata.c +++ b/src/soc/intel/common/block/sata/sata.c @@ -10,12 +10,13 @@ static void sata_acpi_fill_ssdt(const struct device *dev) { const char *scope = acpi_device_scope(dev); + const char *name = soc_acpi_name(dev); - if (!scope) + if (!scope || !name) return; acpigen_write_scope(scope); - acpigen_write_device(soc_acpi_name(dev)); + acpigen_write_device(name); acpigen_write_ADR_pci_device(dev); acpigen_write_STA(acpi_device_status(dev)); acpigen_pop_len(); /* Device */ -- cgit v1.2.3