summaryrefslogtreecommitdiff
path: root/src/soc/intel
diff options
context:
space:
mode:
authorPatrick Rudolph <patrick.rudolph@9elements.com>2024-10-22 08:24:18 +0200
committerLean Sheng Tan <sheng.tan@9elements.com>2024-11-08 07:34:33 +0000
commit6cdcd3f07d9fa0b6464c9fd274b345f02c5c84b3 (patch)
treeae8f798bd3d5584018fff1a1b32b980ab3fcc55d /src/soc/intel
parentbc1e422665d44c01d9beb8bceef5b614c61d621e (diff)
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 <patrick.rudolph@9elements.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/84830 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Subrata Banik <subratabanik@google.com>
Diffstat (limited to 'src/soc/intel')
-rw-r--r--src/soc/intel/common/block/sata/sata.c5
1 files changed, 3 insertions, 2 deletions
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 */