@@ -83,6 +83,7 @@
gAmdStyxTokenSpaceGuid.PcdPsciOsSupport
gAmdStyxTokenSpaceGuid.PcdTrustedFWSupport
gAmdStyxTokenSpaceGuid.PcdParkingProtocolVersion
+ gAmdStyxTokenSpaceGuid.PcdSata1PortCount
[Depex]
gAmdMpCoreInfoProtocolGuid
@@ -174,15 +174,10 @@ DsdtHeader (
else if (AsciiStrCmp(Table->Pathname, "_SB_.ETH1._DSD") == 0) {
OverrideMacAddr ((UINT8 *)&AmlCode[Table->Offset], PcdGet64 (PcdEthMacB));
}
-#if DO_SATA1
else if (AsciiStrCmp(Table->Pathname, "_SB_.AHC1._STA") == 0) {
- OverrideStatus ((UINT8 *)&AmlCode[Table->Offset], EnableOnB1);
- }
-#else
- else if (AsciiStrCmp(Table->Pathname, "_SB_.AHC1._STA") == 0) {
- OverrideStatus ((UINT8 *)&AmlCode[Table->Offset], FALSE);
+ OverrideStatus ((UINT8 *)&AmlCode[Table->Offset],
+ EnableOnB1 && FixedPcdGet8(PcdSata1PortCount) > 0);
}
-#endif
else if (AsciiStrCmp(Table->Pathname, "_SB_.GIO2._STA") == 0) {
OverrideStatus ((UINT8 *)&AmlCode[Table->Offset], EnableOnB1);
}
Enable the second AHCI ACPI node when any ports are enabled on the second SATA controller. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> --- Platforms/AMD/Styx/AcpiTables/AcpiTables.inf | 1 + Platforms/AMD/Styx/AcpiTables/Dsdt.c | 9 ++------- 2 files changed, 3 insertions(+), 7 deletions(-)