From e76211191e1279b57eecf1ea0dd79de09e1c613e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mario=20B=C4=83l=C4=83nic=C4=83?= Date: Sat, 5 Aug 2023 06:06:38 +0300 Subject: [PATCH] Fix platform DSC macros used in byte array PCDs Forgot to enclose them in $( ). Also, decimal values used to work fine until I switched to macros, then they suddenly started to read back as zero. --- .../Ameridroid/IndiedroidNova/IndiedroidNova.dsc | 2 +- .../Firefly/ROC-RK3588S-PC/ROC-RK3588S-PC.dsc.inc | 2 +- .../Platform/FriendlyElec/NanoPC-T6/NanoPC-T6.dsc | 2 +- .../FriendlyElec/NanoPi-R6C/NanoPi-R6C.dsc | 2 +- .../FriendlyElec/NanoPi-R6S/NanoPi-R6S.dsc | 2 +- edk2-rockchip/Platform/Hinlink/H88K/H88K.dsc | 2 +- edk2-rockchip/Platform/Khadas/Edge2/Edge2.dsc | 2 +- .../Platform/Mekotronics/R58-Mini/R58-Mini.dsc | 2 +- edk2-rockchip/Platform/Mekotronics/R58X/R58X.dsc | 2 +- edk2-rockchip/Platform/Mixtile/Blade3/Blade3.dsc | 2 +- .../Platform/OrangePi/OrangePi5/OrangePi5.dsc | 2 +- .../OrangePi/OrangePi5Plus/OrangePi5Plus.dsc | 2 +- edk2-rockchip/Platform/Radxa/ROCK5A/ROCK5A.dsc | 2 +- edk2-rockchip/Platform/Radxa/ROCK5B/ROCK5B.dsc | 2 +- .../Silicon/Rockchip/RK3588/RK3588Base.dsc.inc | 14 ++++++++++---- 15 files changed, 24 insertions(+), 18 deletions(-) diff --git a/edk2-rockchip/Platform/Ameridroid/IndiedroidNova/IndiedroidNova.dsc b/edk2-rockchip/Platform/Ameridroid/IndiedroidNova/IndiedroidNova.dsc index 9f9cbd9f7..625e1f269 100644 --- a/edk2-rockchip/Platform/Ameridroid/IndiedroidNova/IndiedroidNova.dsc +++ b/edk2-rockchip/Platform/Ameridroid/IndiedroidNova/IndiedroidNova.dsc @@ -66,7 +66,7 @@ gRockchipTokenSpaceGuid.PcdI2cSlaveBusesRuntimeSupport|{ FALSE, FALSE, TRUE } gRockchipTokenSpaceGuid.PcdRk860xRegulatorAddresses|{ 0x42, 0x43 } gRockchipTokenSpaceGuid.PcdRk860xRegulatorBuses|{ 0x0, 0x0 } - gRockchipTokenSpaceGuid.PcdRk860xRegulatorTags|{ SCMI_CLK_CPUB01, SCMI_CLK_CPUB23 } + gRockchipTokenSpaceGuid.PcdRk860xRegulatorTags|{ $(SCMI_CLK_CPUB01), $(SCMI_CLK_CPUB23) } gPcf8563RealTimeClockLibTokenSpaceGuid.PcdI2cSlaveAddress|0x51 gRockchipTokenSpaceGuid.PcdRtc8563Bus|0x6 diff --git a/edk2-rockchip/Platform/Firefly/ROC-RK3588S-PC/ROC-RK3588S-PC.dsc.inc b/edk2-rockchip/Platform/Firefly/ROC-RK3588S-PC/ROC-RK3588S-PC.dsc.inc index 4fffc0325..7969078fd 100644 --- a/edk2-rockchip/Platform/Firefly/ROC-RK3588S-PC/ROC-RK3588S-PC.dsc.inc +++ b/edk2-rockchip/Platform/Firefly/ROC-RK3588S-PC/ROC-RK3588S-PC.dsc.inc @@ -53,7 +53,7 @@ gRockchipTokenSpaceGuid.PcdI2cSlaveBusesRuntimeSupport|{ FALSE, FALSE, TRUE } gRockchipTokenSpaceGuid.PcdRk860xRegulatorAddresses|{ 0x42, 0x43 } gRockchipTokenSpaceGuid.PcdRk860xRegulatorBuses|{ 0x0, 0x0 } - gRockchipTokenSpaceGuid.PcdRk860xRegulatorTags|{ SCMI_CLK_CPUB01, SCMI_CLK_CPUB23 } + gRockchipTokenSpaceGuid.PcdRk860xRegulatorTags|{ $(SCMI_CLK_CPUB01), $(SCMI_CLK_CPUB23) } gPcf8563RealTimeClockLibTokenSpaceGuid.PcdI2cSlaveAddress|0x51 gRockchipTokenSpaceGuid.PcdRtc8563Bus|0x2 diff --git a/edk2-rockchip/Platform/FriendlyElec/NanoPC-T6/NanoPC-T6.dsc b/edk2-rockchip/Platform/FriendlyElec/NanoPC-T6/NanoPC-T6.dsc index 808b03c2c..b609bd915 100644 --- a/edk2-rockchip/Platform/FriendlyElec/NanoPC-T6/NanoPC-T6.dsc +++ b/edk2-rockchip/Platform/FriendlyElec/NanoPC-T6/NanoPC-T6.dsc @@ -67,7 +67,7 @@ gRockchipTokenSpaceGuid.PcdI2cSlaveBusesRuntimeSupport|{ FALSE, FALSE, TRUE } gRockchipTokenSpaceGuid.PcdRk860xRegulatorAddresses|{ 0x42, 0x43 } gRockchipTokenSpaceGuid.PcdRk860xRegulatorBuses|{ 0x0, 0x0 } - gRockchipTokenSpaceGuid.PcdRk860xRegulatorTags|{ SCMI_CLK_CPUB01, SCMI_CLK_CPUB23 } + gRockchipTokenSpaceGuid.PcdRk860xRegulatorTags|{ $(SCMI_CLK_CPUB01), $(SCMI_CLK_CPUB23) } gPcf8563RealTimeClockLibTokenSpaceGuid.PcdI2cSlaveAddress|0x51 gRockchipTokenSpaceGuid.PcdRtc8563Bus|0x6 diff --git a/edk2-rockchip/Platform/FriendlyElec/NanoPi-R6C/NanoPi-R6C.dsc b/edk2-rockchip/Platform/FriendlyElec/NanoPi-R6C/NanoPi-R6C.dsc index a3e903898..81c60b966 100644 --- a/edk2-rockchip/Platform/FriendlyElec/NanoPi-R6C/NanoPi-R6C.dsc +++ b/edk2-rockchip/Platform/FriendlyElec/NanoPi-R6C/NanoPi-R6C.dsc @@ -68,7 +68,7 @@ gRockchipTokenSpaceGuid.PcdI2cSlaveBusesRuntimeSupport|{ FALSE, FALSE, TRUE } gRockchipTokenSpaceGuid.PcdRk860xRegulatorAddresses|{ 0x42, 0x43 } gRockchipTokenSpaceGuid.PcdRk860xRegulatorBuses|{ 0x0, 0x0 } - gRockchipTokenSpaceGuid.PcdRk860xRegulatorTags|{ SCMI_CLK_CPUB01, SCMI_CLK_CPUB23 } + gRockchipTokenSpaceGuid.PcdRk860xRegulatorTags|{ $(SCMI_CLK_CPUB01), $(SCMI_CLK_CPUB23) } gPcf8563RealTimeClockLibTokenSpaceGuid.PcdI2cSlaveAddress|0x51 gRockchipTokenSpaceGuid.PcdRtc8563Bus|0x6 diff --git a/edk2-rockchip/Platform/FriendlyElec/NanoPi-R6S/NanoPi-R6S.dsc b/edk2-rockchip/Platform/FriendlyElec/NanoPi-R6S/NanoPi-R6S.dsc index 68ff34c21..1feb4b70c 100644 --- a/edk2-rockchip/Platform/FriendlyElec/NanoPi-R6S/NanoPi-R6S.dsc +++ b/edk2-rockchip/Platform/FriendlyElec/NanoPi-R6S/NanoPi-R6S.dsc @@ -67,7 +67,7 @@ gRockchipTokenSpaceGuid.PcdI2cSlaveBusesRuntimeSupport|{ FALSE, FALSE, TRUE } gRockchipTokenSpaceGuid.PcdRk860xRegulatorAddresses|{ 0x42, 0x43 } gRockchipTokenSpaceGuid.PcdRk860xRegulatorBuses|{ 0x0, 0x0 } - gRockchipTokenSpaceGuid.PcdRk860xRegulatorTags|{ SCMI_CLK_CPUB01, SCMI_CLK_CPUB23 } + gRockchipTokenSpaceGuid.PcdRk860xRegulatorTags|{ $(SCMI_CLK_CPUB01), $(SCMI_CLK_CPUB23) } gPcf8563RealTimeClockLibTokenSpaceGuid.PcdI2cSlaveAddress|0x51 gRockchipTokenSpaceGuid.PcdRtc8563Bus|0x6 diff --git a/edk2-rockchip/Platform/Hinlink/H88K/H88K.dsc b/edk2-rockchip/Platform/Hinlink/H88K/H88K.dsc index c3760b4c3..f8a39d80c 100644 --- a/edk2-rockchip/Platform/Hinlink/H88K/H88K.dsc +++ b/edk2-rockchip/Platform/Hinlink/H88K/H88K.dsc @@ -67,7 +67,7 @@ gRockchipTokenSpaceGuid.PcdI2cSlaveBusesRuntimeSupport|{ FALSE, FALSE, TRUE } gRockchipTokenSpaceGuid.PcdRk860xRegulatorAddresses|{ 0x42, 0x43 } gRockchipTokenSpaceGuid.PcdRk860xRegulatorBuses|{ 0x0, 0x0 } - gRockchipTokenSpaceGuid.PcdRk860xRegulatorTags|{ SCMI_CLK_CPUB01, SCMI_CLK_CPUB23 } + gRockchipTokenSpaceGuid.PcdRk860xRegulatorTags|{ $(SCMI_CLK_CPUB01), $(SCMI_CLK_CPUB23) } gPcf8563RealTimeClockLibTokenSpaceGuid.PcdI2cSlaveAddress|0x51 gRockchipTokenSpaceGuid.PcdRtc8563Bus|0x2 diff --git a/edk2-rockchip/Platform/Khadas/Edge2/Edge2.dsc b/edk2-rockchip/Platform/Khadas/Edge2/Edge2.dsc index 77d81f630..6baa2a3d6 100644 --- a/edk2-rockchip/Platform/Khadas/Edge2/Edge2.dsc +++ b/edk2-rockchip/Platform/Khadas/Edge2/Edge2.dsc @@ -66,7 +66,7 @@ gRockchipTokenSpaceGuid.PcdI2cSlaveBusesRuntimeSupport|{ FALSE, FALSE, TRUE } gRockchipTokenSpaceGuid.PcdRk860xRegulatorAddresses|{ 0x42, 0x43 } gRockchipTokenSpaceGuid.PcdRk860xRegulatorBuses|{ 0x0, 0x0 } - gRockchipTokenSpaceGuid.PcdRk860xRegulatorTags|{ SCMI_CLK_CPUB01, SCMI_CLK_CPUB23 } + gRockchipTokenSpaceGuid.PcdRk860xRegulatorTags|{ $(SCMI_CLK_CPUB01), $(SCMI_CLK_CPUB23) } gPcf8563RealTimeClockLibTokenSpaceGuid.PcdI2cSlaveAddress|0x51 gRockchipTokenSpaceGuid.PcdRtc8563Bus|0x2 diff --git a/edk2-rockchip/Platform/Mekotronics/R58-Mini/R58-Mini.dsc b/edk2-rockchip/Platform/Mekotronics/R58-Mini/R58-Mini.dsc index 3a0d31168..46adeff78 100644 --- a/edk2-rockchip/Platform/Mekotronics/R58-Mini/R58-Mini.dsc +++ b/edk2-rockchip/Platform/Mekotronics/R58-Mini/R58-Mini.dsc @@ -70,7 +70,7 @@ gRockchipTokenSpaceGuid.PcdI2cSlaveBusesRuntimeSupport|{ FALSE, FALSE, TRUE } gRockchipTokenSpaceGuid.PcdRk860xRegulatorAddresses|{ 0x42, 0x43 } gRockchipTokenSpaceGuid.PcdRk860xRegulatorBuses|{ 0x0, 0x0 } - gRockchipTokenSpaceGuid.PcdRk860xRegulatorTags|{ SCMI_CLK_CPUB01, SCMI_CLK_CPUB23 } + gRockchipTokenSpaceGuid.PcdRk860xRegulatorTags|{ $(SCMI_CLK_CPUB01), $(SCMI_CLK_CPUB23) } gPcf8563RealTimeClockLibTokenSpaceGuid.PcdI2cSlaveAddress|0x51 gRockchipTokenSpaceGuid.PcdRtc8563Bus|0x6 diff --git a/edk2-rockchip/Platform/Mekotronics/R58X/R58X.dsc b/edk2-rockchip/Platform/Mekotronics/R58X/R58X.dsc index 383a21ffe..65aeac3ee 100644 --- a/edk2-rockchip/Platform/Mekotronics/R58X/R58X.dsc +++ b/edk2-rockchip/Platform/Mekotronics/R58X/R58X.dsc @@ -67,7 +67,7 @@ gRockchipTokenSpaceGuid.PcdI2cSlaveBusesRuntimeSupport|{ FALSE, FALSE, TRUE } gRockchipTokenSpaceGuid.PcdRk860xRegulatorAddresses|{ 0x42, 0x43 } gRockchipTokenSpaceGuid.PcdRk860xRegulatorBuses|{ 0x0, 0x0 } - gRockchipTokenSpaceGuid.PcdRk860xRegulatorTags|{ SCMI_CLK_CPUB01, SCMI_CLK_CPUB23 } + gRockchipTokenSpaceGuid.PcdRk860xRegulatorTags|{ $(SCMI_CLK_CPUB01), $(SCMI_CLK_CPUB23) } gPcf8563RealTimeClockLibTokenSpaceGuid.PcdI2cSlaveAddress|0x51 gRockchipTokenSpaceGuid.PcdRtc8563Bus|0x6 diff --git a/edk2-rockchip/Platform/Mixtile/Blade3/Blade3.dsc b/edk2-rockchip/Platform/Mixtile/Blade3/Blade3.dsc index b61a0e7c5..9e406d4c9 100644 --- a/edk2-rockchip/Platform/Mixtile/Blade3/Blade3.dsc +++ b/edk2-rockchip/Platform/Mixtile/Blade3/Blade3.dsc @@ -60,7 +60,7 @@ gRockchipTokenSpaceGuid.PcdI2cSlaveBusesRuntimeSupport|{ FALSE, FALSE } gRockchipTokenSpaceGuid.PcdRk860xRegulatorAddresses|{ 0x42, 0x43 } gRockchipTokenSpaceGuid.PcdRk860xRegulatorBuses|{ 0x0, 0x0 } - gRockchipTokenSpaceGuid.PcdRk860xRegulatorTags|{ SCMI_CLK_CPUB01, SCMI_CLK_CPUB23 } + gRockchipTokenSpaceGuid.PcdRk860xRegulatorTags|{ $(SCMI_CLK_CPUB01), $(SCMI_CLK_CPUB23) } # # CPU Performance default values diff --git a/edk2-rockchip/Platform/OrangePi/OrangePi5/OrangePi5.dsc b/edk2-rockchip/Platform/OrangePi/OrangePi5/OrangePi5.dsc index 08af098c7..c91bc06e4 100644 --- a/edk2-rockchip/Platform/OrangePi/OrangePi5/OrangePi5.dsc +++ b/edk2-rockchip/Platform/OrangePi/OrangePi5/OrangePi5.dsc @@ -67,7 +67,7 @@ gRockchipTokenSpaceGuid.PcdI2cSlaveBusesRuntimeSupport|{ FALSE, FALSE, TRUE } gRockchipTokenSpaceGuid.PcdRk860xRegulatorAddresses|{ 0x42, 0x43 } gRockchipTokenSpaceGuid.PcdRk860xRegulatorBuses|{ 0x0, 0x0 } - gRockchipTokenSpaceGuid.PcdRk860xRegulatorTags|{ SCMI_CLK_CPUB01, SCMI_CLK_CPUB23 } + gRockchipTokenSpaceGuid.PcdRk860xRegulatorTags|{ $(SCMI_CLK_CPUB01), $(SCMI_CLK_CPUB23) } gPcf8563RealTimeClockLibTokenSpaceGuid.PcdI2cSlaveAddress|0x51 gRockchipTokenSpaceGuid.PcdRtc8563Bus|0x6 diff --git a/edk2-rockchip/Platform/OrangePi/OrangePi5Plus/OrangePi5Plus.dsc b/edk2-rockchip/Platform/OrangePi/OrangePi5Plus/OrangePi5Plus.dsc index d63f44f5c..6fc47e8cc 100644 --- a/edk2-rockchip/Platform/OrangePi/OrangePi5Plus/OrangePi5Plus.dsc +++ b/edk2-rockchip/Platform/OrangePi/OrangePi5Plus/OrangePi5Plus.dsc @@ -66,7 +66,7 @@ gRockchipTokenSpaceGuid.PcdI2cSlaveBusesRuntimeSupport|{ FALSE, FALSE, TRUE } gRockchipTokenSpaceGuid.PcdRk860xRegulatorAddresses|{ 0x42, 0x43 } gRockchipTokenSpaceGuid.PcdRk860xRegulatorBuses|{ 0x0, 0x0 } - gRockchipTokenSpaceGuid.PcdRk860xRegulatorTags|{ SCMI_CLK_CPUB01, SCMI_CLK_CPUB23 } + gRockchipTokenSpaceGuid.PcdRk860xRegulatorTags|{ $(SCMI_CLK_CPUB01), $(SCMI_CLK_CPUB23) } gPcf8563RealTimeClockLibTokenSpaceGuid.PcdI2cSlaveAddress|0x51 gRockchipTokenSpaceGuid.PcdRtc8563Bus|0x6 diff --git a/edk2-rockchip/Platform/Radxa/ROCK5A/ROCK5A.dsc b/edk2-rockchip/Platform/Radxa/ROCK5A/ROCK5A.dsc index bdc2b61d4..e5ae981f7 100644 --- a/edk2-rockchip/Platform/Radxa/ROCK5A/ROCK5A.dsc +++ b/edk2-rockchip/Platform/Radxa/ROCK5A/ROCK5A.dsc @@ -61,7 +61,7 @@ gRockchipTokenSpaceGuid.PcdI2cSlaveBusesRuntimeSupport|{ FALSE, FALSE } gRockchipTokenSpaceGuid.PcdRk860xRegulatorAddresses|{ 0x42, 0x43 } gRockchipTokenSpaceGuid.PcdRk860xRegulatorBuses|{ 0x0, 0x0 } - gRockchipTokenSpaceGuid.PcdRk860xRegulatorTags|{ SCMI_CLK_CPUB01, SCMI_CLK_CPUB23 } + gRockchipTokenSpaceGuid.PcdRk860xRegulatorTags|{ $(SCMI_CLK_CPUB01), $(SCMI_CLK_CPUB23) } # # CPU Performance default values diff --git a/edk2-rockchip/Platform/Radxa/ROCK5B/ROCK5B.dsc b/edk2-rockchip/Platform/Radxa/ROCK5B/ROCK5B.dsc index 65f282eb5..3bcad407f 100644 --- a/edk2-rockchip/Platform/Radxa/ROCK5B/ROCK5B.dsc +++ b/edk2-rockchip/Platform/Radxa/ROCK5B/ROCK5B.dsc @@ -67,7 +67,7 @@ gRockchipTokenSpaceGuid.PcdI2cSlaveBusesRuntimeSupport|{ FALSE, FALSE, TRUE } gRockchipTokenSpaceGuid.PcdRk860xRegulatorAddresses|{ 0x42, 0x43 } gRockchipTokenSpaceGuid.PcdRk860xRegulatorBuses|{ 0x0, 0x0 } - gRockchipTokenSpaceGuid.PcdRk860xRegulatorTags|{ SCMI_CLK_CPUB01, SCMI_CLK_CPUB23 } + gRockchipTokenSpaceGuid.PcdRk860xRegulatorTags|{ $(SCMI_CLK_CPUB01), $(SCMI_CLK_CPUB23) } gPcf8563RealTimeClockLibTokenSpaceGuid.PcdI2cSlaveAddress|0x51 gRockchipTokenSpaceGuid.PcdRtc8563Bus|0x6 diff --git a/edk2-rockchip/Silicon/Rockchip/RK3588/RK3588Base.dsc.inc b/edk2-rockchip/Silicon/Rockchip/RK3588/RK3588Base.dsc.inc index 94e179b05..b05fd3110 100644 --- a/edk2-rockchip/Silicon/Rockchip/RK3588/RK3588Base.dsc.inc +++ b/edk2-rockchip/Silicon/Rockchip/RK3588/RK3588Base.dsc.inc @@ -17,7 +17,13 @@ DEFINE CONFIG_NO_DEBUGLIB = FALSE # - # Must match defines in Silicon/Rockchip/RK3588/Include/VarStoreData.h + # Shared Defines + # - must be kept in sync with their associated headers + # - values must be hexadecimal if used in byte array PCDs + # + + # + # Silicon/Rockchip/RK3588/Include/VarStoreData.h # DEFINE CPU_PERF_CLUSTER_CLOCK_PRESET_BOOTDEFAULT = 0 DEFINE CPU_PERF_CLUSTER_CLOCK_PRESET_MIN = 1 @@ -32,9 +38,9 @@ # # Silicon/Rockchip/RK3588/Drivers/RK3588Dxe/CpuPerformance.h # - DEFINE SCMI_CLK_CPUL = 0 - DEFINE SCMI_CLK_CPUB01 = 2 - DEFINE SCMI_CLK_CPUB23 = 3 + DEFINE SCMI_CLK_CPUL = 0x0 + DEFINE SCMI_CLK_CPUB01 = 0x2 + DEFINE SCMI_CLK_CPUB23 = 0x3 # # Default peripheral support flags