From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-ej1-f42.google.com (mail-ej1-f42.google.com [209.85.218.42]) by mx.groups.io with SMTP id smtpd.web10.13959.1596181923663098509 for ; Fri, 31 Jul 2020 00:52:04 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@akeo-ie.20150623.gappssmtp.com header.s=20150623 header.b=SQTpObBs; spf=none, err=permanent DNS error (domain: akeo.ie, ip: 209.85.218.42, mailfrom: pete@akeo.ie) Received: by mail-ej1-f42.google.com with SMTP id c16so10138098ejx.12 for ; Fri, 31 Jul 2020 00:52:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=akeo-ie.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=BPhv2Vdq1NuWaenwxcuWCTHqf7fPAXDAHJ1x34bvWZg=; b=SQTpObBssd340GnRqeO4vK1r1ix/DW2VnqVuW/OlFR/mrUiRMUkCp8pg+LndQlKDog 6R+ilwkegfAGWzdSsSus8Z5soJV2Cou8a+dSTisJWDsmfO1L3JQQt3W1f62SsMQ2vAtw 33OFq4NY0sNhOlk5zDDEHdR0NzkJx2+36pEz9ZC+G3GsMOMy75QzxUzvQni7YvHMKNki vWQfBtN6S9F0izqSbFnt7qWNovaO42oX88A09TmnJz+ZXbfK352QG4cg43xPdM63MuM+ ZbUJZseGN1pfa+DSLxfCa+2jw4aspfpxSpeIrPgrHDfjkDXyg9HouBrYclE7P7S1dEAj /Xfg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=BPhv2Vdq1NuWaenwxcuWCTHqf7fPAXDAHJ1x34bvWZg=; b=JC21v98wBEBMcUrO+KZIXvhjUlIaP5yGMSpjCCmC7+GnlOrpJQAFPWEuZkWgUOie28 5B5V8DhyP1w9BG+bc1kXlqxL7prDSJKMMUWXDhiy6M22ZJqE+SO/2r2PSccXVWPJra9q /KvU+nYh1EnfcAsOIsNzapJ+g0Grszw7/B/uB3rMnph6N+/bkV2t/fTfwdo31H1oPdsv 5AXLNj7sLCVy2nW5CdIbS9qAtwAHT8jva5FArWAoZPqvyajg3WmHrAF/8g5Ffj5CfUVV IqcQRDjRMCapigMcYHxfv+H1T22WNHlWX6RnogWciE2prSIht6FsPE4DSKdDAziJbi9k il7A== X-Gm-Message-State: AOAM530z3GbZ4Fl61umAd4QlAaja+Qtgbi8RGafW3CFWTlaP1oVSw6Vf nO5EvmsmVnVY7fHd3D1Bvgll4nel7v+IdQ== X-Google-Smtp-Source: ABdhPJwtXSnlqDZ5nrhBcr+vB93g7sJ4IyVCEjw3qmbiq6C6Re/36hCMFw3mkz23Efu1/d/0sxGQEg== X-Received: by 2002:a17:906:228a:: with SMTP id p10mr2785435eja.23.1596181921896; Fri, 31 Jul 2020 00:52:01 -0700 (PDT) Return-Path: Received: from localhost.localdomain ([84.203.94.233]) by smtp.gmail.com with ESMTPSA id j5sm9044332edh.41.2020.07.31.00.52.00 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 31 Jul 2020 00:52:01 -0700 (PDT) From: "Pete Batard" 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 Message-Id: <20200731075149.5164-1-pete@akeo.ie> X-Mailer: git-send-email 2.21.0.windows.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 --- 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