diff --git a/src/soc/amd/cezanne/acpi/acp.asl b/src/soc/amd/cezanne/acpi/acp.asl index 806b587f75..51d22183df 100644 --- a/src/soc/amd/cezanne/acpi/acp.asl +++ b/src/soc/amd/cezanne/acpi/acp.asl @@ -11,9 +11,6 @@ Scope (\_SB.PCI0.GP41) { Return (STAT) } - External (\_SB.PCI0.GNB.SMNA, FieldUnitObj) - External (\_SB.PCI0.GNB.SMND, FieldUnitObj) - /* Read SMN register and store value into ACPI variable */ Method (SMNR, 1, Serialized) { diff --git a/src/soc/amd/cezanne/acpi/pci.asl b/src/soc/amd/cezanne/acpi/pci.asl index 770a8701f6..4942f989e3 100644 --- a/src/soc/amd/cezanne/acpi/pci.asl +++ b/src/soc/amd/cezanne/acpi/pci.asl @@ -15,6 +15,26 @@ Device (GNB) { Return (0x0F) } + + /* Add opregion to host bridge needed for ACP driver. + * + * This is used by an ACPI method in the ACP's ACPI code to access different mailbox + * interfaces in the hardware. Some ACP drivers will use that to both notify the PSP + * that the DSP firmware has been loaded, so that the PSP can validate the firmware + * and set the qualifier bit to enable running it, and to configure the ACP's clock + * source. + * + * As this SMN access is not arbitrated and there may be other drivers or parts of + * the firmware attempting to use the SMN access register pair, there is a risk of + * conflict / incorrect data, but given the frequency and duration of accesses, the + * risk is deemed to be quite low. + */ + OperationRegion (PSMN, PCI_Config, 0x00, 0x100) + Field(PSMN, AnyAcc, NoLock, Preserve) { + Offset (0xB8), + SMNA, 32, + SMND, 32, + } } /* PCIe GPP */ diff --git a/src/soc/amd/cezanne/root_complex.c b/src/soc/amd/cezanne/root_complex.c index 81a99e55ec..d9999b9163 100644 --- a/src/soc/amd/cezanne/root_complex.c +++ b/src/soc/amd/cezanne/root_complex.c @@ -59,51 +59,6 @@ static void root_complex_fill_ssdt(const struct device *device) { if (CONFIG(SOC_AMD_COMMON_BLOCK_ACPI_DPTC)) acipgen_dptci(); - - /* Add ACPI device, opregion to host bridge needed for ACP driver. - * - * This is used by an ACPI method in the ACP's ACPI code to access different mailbox - * interfaces in th hardware. Some ACP drivers will use that to both notify the PSP - * that the DSP firmware has been loaded, so that the PSP can validate the firmware - * and set the qualifier bit to enable running it, and to configure the ACP's clock - * source. - * - * As this SMN access is not arbitrated and there may be other drivers or parts of - * the firmware attempting to use the SMN access register pair, there is a risk of - * conflict / incorrect data, but given the frequency and duration of accesses, the - * risk is deemed to be quite low. - * - * Scope (\_SB.PCI0) - * { - * Device (GNB) - * { - * Name (_ADR, 0x0000000000000000) - * Method (_STA, 0, NotSerialized) - * { - * Return (0x0F) - * } - * } - * } - * Scope (\_SB.PCI0.GNB) - * { - * OperationRegion(SMN, SystemMemory , 0xF80000B8, 0x8) - * Field(SMN, AnyAcc, NoLock, Preserve) { - * SMNA, 32, - * SMND, 32, - * } - * } - */ - acpigen_write_scope(acpi_device_path(device)); - struct opregion opreg = OPREGION("SMN", SYSTEMMEMORY, - CONFIG_ECAM_MMCONF_BASE_ADDRESS + 0xb8, 0x8); - acpigen_write_opregion(&opreg); - static const struct fieldlist list[] = { - FIELDLIST_NAMESTR("SMNA", 32), - FIELDLIST_NAMESTR("SMND", 32), - }; - acpigen_write_field(opreg.name, list, ARRAY_SIZE(list), - FIELD_ANYACC | FIELD_NOLOCK | FIELD_PRESERVE); - acpigen_write_scope_end(); } static const char *gnb_acpi_name(const struct device *dev)