From: "Pete Batard" <pete@akeo.ie>
To: devel@edk2.groups.io
Cc: ard.biesheuvel@arm.com, leif@nuviainc.com
Subject: [edk2-platforms][PATCH 1/1] Platforms/RaspberryPi: Switch to PcdSet##S
Date: Fri, 31 Jul 2020 08:51:49 +0100 [thread overview]
Message-ID: <20200731075149.5164-1-pete@akeo.ie> (raw)
According to the bug:
https://bugzilla.tianocore.org/show_bug.cgi?id=2777
the deprecated code under DISABLE_NEW_DEPRECATED_INTERFACES
will be removed, which will result in compilation breakage
of the Raspberry Pi platforms. Prevent that by switching to
the different PcdSet API.
Signed-off-by: Pete Batard <pete@akeo.ie>
---
Platform/RaspberryPi/Drivers/ConfigDxe/ConfigDxe.c | 34 ++++++++++----------
Platform/RaspberryPi/Drivers/DisplayDxe/DisplayDxe.c | 4 +--
2 files changed, 19 insertions(+), 19 deletions(-)
diff --git a/Platform/RaspberryPi/Drivers/ConfigDxe/ConfigDxe.c b/Platform/RaspberryPi/Drivers/ConfigDxe/ConfigDxe.c
index bab494a7c254..9f3372a7631d 100644
--- a/Platform/RaspberryPi/Drivers/ConfigDxe/ConfigDxe.c
+++ b/Platform/RaspberryPi/Drivers/ConfigDxe/ConfigDxe.c
@@ -202,7 +202,7 @@ SetupVariables (
&gConfigDxeFormSetGuid,
NULL, &Size, &Var32);
if (EFI_ERROR (Status)) {
- PcdSet32 (PcdCpuClock, PcdGet32 (PcdCpuClock));
+ PcdSet32S (PcdCpuClock, PcdGet32 (PcdCpuClock));
}
Size = sizeof (UINT32);
@@ -210,25 +210,25 @@ SetupVariables (
&gConfigDxeFormSetGuid,
NULL, &Size, &Var32);
if (EFI_ERROR (Status)) {
- PcdSet32 (PcdCustomCpuClock, PcdGet32 (PcdCustomCpuClock));
+ PcdSet32S (PcdCustomCpuClock, PcdGet32 (PcdCustomCpuClock));
}
if (mModelFamily >= 4 && mModelInstalledMB > 3 * 1024) {
/*
* This allows changing PcdRamLimitTo3GB in forms.
*/
- PcdSet32 (PcdRamMoreThan3GB, 1);
+ PcdSet32S (PcdRamMoreThan3GB, 1);
Size = sizeof (UINT32);
Status = gRT->GetVariable (L"RamLimitTo3GB",
&gConfigDxeFormSetGuid,
NULL, &Size, &Var32);
if (EFI_ERROR (Status)) {
- PcdSet32 (PcdRamLimitTo3GB, PcdGet32 (PcdRamLimitTo3GB));
+ PcdSet32S (PcdRamLimitTo3GB, PcdGet32 (PcdRamLimitTo3GB));
}
} else {
- PcdSet32 (PcdRamMoreThan3GB, 0);
- PcdSet32 (PcdRamLimitTo3GB, 0);
+ PcdSet32S (PcdRamMoreThan3GB, 0);
+ PcdSet32S (PcdRamLimitTo3GB, 0);
}
Size = sizeof (UINT32);
@@ -236,7 +236,7 @@ SetupVariables (
&gConfigDxeFormSetGuid,
NULL, &Size, &Var32);
if (EFI_ERROR (Status)) {
- PcdSet32 (PcdSystemTableMode, PcdGet32 (PcdSystemTableMode));
+ PcdSet32S (PcdSystemTableMode, PcdGet32 (PcdSystemTableMode));
}
Size = sizeof(AssetTagVar);
@@ -260,7 +260,7 @@ SetupVariables (
&gConfigDxeFormSetGuid,
NULL, &Size, &Var32);
if (EFI_ERROR (Status)) {
- PcdSet32 (PcdSdIsArasan, PcdGet32 (PcdSdIsArasan));
+ PcdSet32S (PcdSdIsArasan, PcdGet32 (PcdSdIsArasan));
}
Size = sizeof (UINT32);
@@ -268,7 +268,7 @@ SetupVariables (
&gConfigDxeFormSetGuid,
NULL, &Size, &Var32);
if (EFI_ERROR (Status)) {
- PcdSet32 (PcdMmcDisableMulti, PcdGet32 (PcdMmcDisableMulti));
+ PcdSet32S (PcdMmcDisableMulti, PcdGet32 (PcdMmcDisableMulti));
}
Size = sizeof (UINT32);
@@ -276,7 +276,7 @@ SetupVariables (
&gConfigDxeFormSetGuid,
NULL, &Size, &Var32);
if (EFI_ERROR (Status)) {
- PcdSet32 (PcdMmcForce1Bit, PcdGet32 (PcdMmcForce1Bit));
+ PcdSet32S (PcdMmcForce1Bit, PcdGet32 (PcdMmcForce1Bit));
}
Size = sizeof (UINT32);
@@ -284,7 +284,7 @@ SetupVariables (
&gConfigDxeFormSetGuid,
NULL, &Size, &Var32);
if (EFI_ERROR (Status)) {
- PcdSet32 (PcdMmcForceDefaultSpeed, PcdGet32 (PcdMmcForceDefaultSpeed));
+ PcdSet32S (PcdMmcForceDefaultSpeed, PcdGet32 (PcdMmcForceDefaultSpeed));
}
Size = sizeof (UINT32);
@@ -292,7 +292,7 @@ SetupVariables (
&gConfigDxeFormSetGuid,
NULL, &Size, &Var32);
if (EFI_ERROR (Status)) {
- PcdSet32 (PcdMmcSdDefaultSpeedMHz, PcdGet32 (PcdMmcSdDefaultSpeedMHz));
+ PcdSet32S (PcdMmcSdDefaultSpeedMHz, PcdGet32 (PcdMmcSdDefaultSpeedMHz));
}
Size = sizeof (UINT32);
@@ -300,7 +300,7 @@ SetupVariables (
&gConfigDxeFormSetGuid,
NULL, &Size, &Var32);
if (EFI_ERROR (Status)) {
- PcdSet32 (PcdMmcSdHighSpeedMHz, PcdGet32 (PcdMmcSdHighSpeedMHz));
+ PcdSet32S (PcdMmcSdHighSpeedMHz, PcdGet32 (PcdMmcSdHighSpeedMHz));
}
Size = sizeof (UINT32);
@@ -308,7 +308,7 @@ SetupVariables (
&gConfigDxeFormSetGuid,
NULL, &Size, &Var32);
if (EFI_ERROR (Status)) {
- PcdSet32 (PcdDebugEnableJTAG, PcdGet32 (PcdDebugEnableJTAG));
+ PcdSet32S (PcdDebugEnableJTAG, PcdGet32 (PcdDebugEnableJTAG));
}
Size = sizeof (UINT8);
@@ -316,7 +316,7 @@ SetupVariables (
&gConfigDxeFormSetGuid,
NULL, &Size, &Var8);
if (EFI_ERROR (Status)) {
- PcdSet8 (PcdDisplayEnableScaledVModes, PcdGet8 (PcdDisplayEnableScaledVModes));
+ PcdSet8S (PcdDisplayEnableScaledVModes, PcdGet8 (PcdDisplayEnableScaledVModes));
}
Size = sizeof (UINT32);
@@ -324,7 +324,7 @@ SetupVariables (
&gConfigDxeFormSetGuid,
NULL, &Size, &Var32);
if (EFI_ERROR (Status)) {
- PcdSet32 (PcdDisplayEnableSShot, PcdGet32 (PcdDisplayEnableSShot));
+ PcdSet32S (PcdDisplayEnableSShot, PcdGet32 (PcdDisplayEnableSShot));
}
if (mModelFamily == 4) {
@@ -381,7 +381,7 @@ ApplyVariables (
if (Status != EFI_SUCCESS) {
DEBUG ((DEBUG_ERROR, "Couldn't set the CPU speed: %r\n", Status));
} else {
- PcdSet32 (PcdCustomCpuClock, Rate / FREQ_1_MHZ);
+ PcdSet32S (PcdCustomCpuClock, Rate / FREQ_1_MHZ);
}
}
diff --git a/Platform/RaspberryPi/Drivers/DisplayDxe/DisplayDxe.c b/Platform/RaspberryPi/Drivers/DisplayDxe/DisplayDxe.c
index b880ca827bd6..96fd4ccd611b 100644
--- a/Platform/RaspberryPi/Drivers/DisplayDxe/DisplayDxe.c
+++ b/Platform/RaspberryPi/Drivers/DisplayDxe/DisplayDxe.c
@@ -485,11 +485,11 @@ DriverStart (
goto Done;
}
- PcdSet8 (PcdDisplayEnableScaledVModes,
+ PcdSet8S (PcdDisplayEnableScaledVModes,
PcdGet8 (PcdDisplayEnableScaledVModes) & ALL_MODES);
if (PcdGet8 (PcdDisplayEnableScaledVModes) == 0) {
- PcdSet8 (PcdDisplayEnableScaledVModes, JUST_NATIVE_ENABLED);
+ PcdSet8S (PcdDisplayEnableScaledVModes, JUST_NATIVE_ENABLED);
}
mLastMode = 0;
--
2.21.0.windows.1
reply other threads:[~2020-07-31 7:52 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200731075149.5164-1-pete@akeo.ie \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox