* [PATCH edk2-platforms 1/2] Platform/ARM: Juno: Fix usage of deprecated macros
2019-06-27 13:12 [PATCH edk2-platforms 0/2] Platform/ARM: Disable deprecated APIs for Arm Platforms Sami Mujawar
@ 2019-06-27 13:12 ` Sami Mujawar
2019-06-27 13:31 ` [edk2-devel] " Alexei Fedorov
2019-06-27 13:12 ` [PATCH edk2-platforms 2/2] Platform/ARM: Disable deprecated APIs Sami Mujawar
` (2 subsequent siblings)
3 siblings, 1 reply; 7+ messages in thread
From: Sami Mujawar @ 2019-06-27 13:12 UTC (permalink / raw)
To: devel
Cc: Sami Mujawar, ard.biesheuvel, leif.lindholm, michael.d.kinney,
Matteo.Carlini, nd
Replaced the use of unsafe/deprecated macros with alternate safe
options.
Signed-off-by: Sami Mujawar <sami.mujawar@arm.com>
---
Notes:
v1:
- Replace unsafe/deprecated macros with alternate safe options. [SAMI]
Platform/ARM/JunoPkg/Drivers/ArmJunoDxe/ArmJunoDxe.c | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
diff --git a/Platform/ARM/JunoPkg/Drivers/ArmJunoDxe/ArmJunoDxe.c b/Platform/ARM/JunoPkg/Drivers/ArmJunoDxe/ArmJunoDxe.c
index c5967f5b7112fbf794573a6040711a9f1cc14c9f..ea7591d704439cd4216f3e3d7155df2b4d2482b3 100644
--- a/Platform/ARM/JunoPkg/Drivers/ArmJunoDxe/ArmJunoDxe.c
+++ b/Platform/ARM/JunoPkg/Drivers/ArmJunoDxe/ArmJunoDxe.c
@@ -1,6 +1,6 @@
/** @file
*
-* Copyright (c) 2013-2017, ARM Limited. All rights reserved.
+* Copyright (c) 2013-2019, ARM Limited. All rights reserved.
*
* SPDX-License-Identifier: BSD-2-Clause-Patent
*
@@ -407,7 +407,6 @@ ArmJunoEntryPoint (
EFI_PHYSICAL_ADDRESS HypBase;
CHAR16 *TextDevicePath;
UINTN TextDevicePathSize;
- VOID *Buffer;
UINT32 JunoRevision;
EFI_EVENT EndOfDxeEvent;
@@ -495,7 +494,7 @@ ArmJunoEntryPoint (
//
if (JunoRevision != JUNO_REVISION_R0) {
// Enable PCI enumeration
- PcdSetBool (PcdPciDisableBusEnumeration, FALSE);
+ PcdSetBoolS (PcdPciDisableBusEnumeration, FALSE);
//
// Create an event belonging to the "gEfiEndOfDxeEventGroupGuid" group.
@@ -531,8 +530,11 @@ ArmJunoEntryPoint (
TextDevicePath = (CHAR16*)FixedPcdGetPtr (PcdJunoFdtDevicePath);
if (TextDevicePath != NULL) {
TextDevicePathSize = StrSize (TextDevicePath);
- Buffer = PcdSetPtr (PcdFdtDevicePaths, &TextDevicePathSize, TextDevicePath);
- Status = (Buffer != NULL) ? EFI_SUCCESS : EFI_BUFFER_TOO_SMALL;
+ Status = PcdSetPtrS (
+ PcdFdtDevicePaths,
+ &TextDevicePathSize,
+ TextDevicePath
+ );
} else {
Status = EFI_NOT_FOUND;
}
--
'Guid(CE165669-3EF3-493F-B85D-6190EE5B9759)'
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH edk2-platforms 2/2] Platform/ARM: Disable deprecated APIs
2019-06-27 13:12 [PATCH edk2-platforms 0/2] Platform/ARM: Disable deprecated APIs for Arm Platforms Sami Mujawar
2019-06-27 13:12 ` [PATCH edk2-platforms 1/2] Platform/ARM: Juno: Fix usage of deprecated macros Sami Mujawar
@ 2019-06-27 13:12 ` Sami Mujawar
2019-06-27 13:31 ` [edk2-devel] " Alexei Fedorov
2019-06-27 13:32 ` [edk2-devel] [PATCH edk2-platforms 0/2] Platform/ARM: Disable deprecated APIs for Arm Platforms Alexei Fedorov
2019-07-03 15:42 ` Leif Lindholm
3 siblings, 1 reply; 7+ messages in thread
From: Sami Mujawar @ 2019-06-27 13:12 UTC (permalink / raw)
To: devel
Cc: Sami Mujawar, ard.biesheuvel, leif.lindholm, michael.d.kinney,
Matteo.Carlini, nd
Add DISABLE_NEW_DEPRECATED_INTERFACES macro to the Arm platform
build flags to disable the use of deprecated APIs.
Signed-off-by: Sami Mujawar <sami.mujawar@arm.com>
---
Notes:
v1:
- Disable the use of deprecated APIs for Arm Platforms. [SAMI]
Platform/ARM/VExpressPkg/ArmVExpress.dsc.inc | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/Platform/ARM/VExpressPkg/ArmVExpress.dsc.inc b/Platform/ARM/VExpressPkg/ArmVExpress.dsc.inc
index 13f5c6c1e7493a72354744ca37721b4a682f6b50..0d543d2a61b15c9c7dcd9212b81a4594c3bd38f0 100644
--- a/Platform/ARM/VExpressPkg/ArmVExpress.dsc.inc
+++ b/Platform/ARM/VExpressPkg/ArmVExpress.dsc.inc
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2011-2018, ARM Limited. All rights reserved.
+# Copyright (c) 2011-2019, ARM Limited. All rights reserved.
#
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
@@ -17,6 +17,9 @@ [Defines]
DEFINE NETWORK_TLS_ENABLE = FALSE
DEFINE NETWORK_HTTP_BOOT_ENABLE = FALSE
+[BuildOptions.common]
+ *_*_*_CC_FLAGS = -DDISABLE_NEW_DEPRECATED_INTERFACES
+
[BuildOptions.common.EDKII.DXE_CORE,BuildOptions.common.EDKII.DXE_DRIVER,BuildOptions.common.EDKII.UEFI_DRIVER,BuildOptions.common.EDKII.UEFI_APPLICATION]
GCC:*_*_*_DLINK_FLAGS = -z common-page-size=0x1000
--
'Guid(CE165669-3EF3-493F-B85D-6190EE5B9759)'
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [edk2-devel] [PATCH edk2-platforms 0/2] Platform/ARM: Disable deprecated APIs for Arm Platforms
2019-06-27 13:12 [PATCH edk2-platforms 0/2] Platform/ARM: Disable deprecated APIs for Arm Platforms Sami Mujawar
2019-06-27 13:12 ` [PATCH edk2-platforms 1/2] Platform/ARM: Juno: Fix usage of deprecated macros Sami Mujawar
2019-06-27 13:12 ` [PATCH edk2-platforms 2/2] Platform/ARM: Disable deprecated APIs Sami Mujawar
@ 2019-06-27 13:32 ` Alexei Fedorov
2019-07-03 15:42 ` Leif Lindholm
3 siblings, 0 replies; 7+ messages in thread
From: Alexei Fedorov @ 2019-06-27 13:32 UTC (permalink / raw)
To: Sami Mujawar, devel
[-- Attachment #1: Type: text/plain, Size: 54 bytes --]
Reviewed-by: Alexei Fedorov <Alexei.Fedorov@arm.com>
[-- Attachment #2: Type: text/html, Size: 60 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH edk2-platforms 0/2] Platform/ARM: Disable deprecated APIs for Arm Platforms
2019-06-27 13:12 [PATCH edk2-platforms 0/2] Platform/ARM: Disable deprecated APIs for Arm Platforms Sami Mujawar
` (2 preceding siblings ...)
2019-06-27 13:32 ` [edk2-devel] [PATCH edk2-platforms 0/2] Platform/ARM: Disable deprecated APIs for Arm Platforms Alexei Fedorov
@ 2019-07-03 15:42 ` Leif Lindholm
3 siblings, 0 replies; 7+ messages in thread
From: Leif Lindholm @ 2019-07-03 15:42 UTC (permalink / raw)
To: Sami Mujawar; +Cc: devel, ard.biesheuvel, michael.d.kinney, Matteo.Carlini, nd
On Thu, Jun 27, 2019 at 02:12:11PM +0100, Sami Mujawar wrote:
> edk2 implements the DISABLE_NEW_DEPRECATED_INTERFACES macro that prevents the
> usage of unsafe/deprecated APIs/macros by reporting errors at build time.
>
> This patch series:
> - defines DISABLE_NEW_DEPRECATED_INTERFACES macro as part of the build
> options for Arm platforms so that the unsafe/deprecated APIs/macros
> are not used.
> - fixes the usage of unsafe/deprecated APIs/macros in the Juno platform
> code.
>
> The changes can be seen at
> https://github.com/samimujawar/edk2-platforms/tree/580_disable_deprecated_interfaces_v1
>
> Sami Mujawar (2):
> Platform/ARM: Juno: Fix usage of deprecated macros
> Platform/ARM: Disable deprecated APIs
For the series:
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
Pushed as 0b64610961..182903bd2e.
Thanks!
> Platform/ARM/JunoPkg/Drivers/ArmJunoDxe/ArmJunoDxe.c | 12 +++++++-----
> Platform/ARM/VExpressPkg/ArmVExpress.dsc.inc | 5 ++++-
> 2 files changed, 11 insertions(+), 6 deletions(-)
>
> --
> 'Guid(CE165669-3EF3-493F-B85D-6190EE5B9759)'
>
>
^ permalink raw reply [flat|nested] 7+ messages in thread