From 5e32710023e2af6bf86aa946cafa3e0cfed16bbe Mon Sep 17 00:00:00 2001 From: Ard Biesheuvel Date: Wed, 10 Aug 2016 14:09:56 +0200 Subject: ArmPkg/ArmSmcLibNull: move to generic C implementation The C language is powerful enough to implement a function that does absolutely nothing, so there is no need to resort to implementations in assembler for various toolchains/architectures. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel Reviewed-by: Leif Lindholm --- ArmPkg/Library/ArmSmcLibNull/AArch64/ArmSmcNull.S | 20 -------------------- ArmPkg/Library/ArmSmcLibNull/Arm/ArmSmcNull.S | 20 -------------------- ArmPkg/Library/ArmSmcLibNull/Arm/ArmSmcNull.asm | 20 -------------------- ArmPkg/Library/ArmSmcLibNull/ArmSmcLibNull.c | 22 ++++++++++++++++++++++ ArmPkg/Library/ArmSmcLibNull/ArmSmcLibNull.inf | 8 ++------ 5 files changed, 24 insertions(+), 66 deletions(-) delete mode 100644 ArmPkg/Library/ArmSmcLibNull/AArch64/ArmSmcNull.S delete mode 100644 ArmPkg/Library/ArmSmcLibNull/Arm/ArmSmcNull.S delete mode 100644 ArmPkg/Library/ArmSmcLibNull/Arm/ArmSmcNull.asm create mode 100644 ArmPkg/Library/ArmSmcLibNull/ArmSmcLibNull.c (limited to 'ArmPkg/Library') diff --git a/ArmPkg/Library/ArmSmcLibNull/AArch64/ArmSmcNull.S b/ArmPkg/Library/ArmSmcLibNull/AArch64/ArmSmcNull.S deleted file mode 100644 index a6ef0e04da..0000000000 --- a/ArmPkg/Library/ArmSmcLibNull/AArch64/ArmSmcNull.S +++ /dev/null @@ -1,20 +0,0 @@ -// -// Copyright (c) 2012-2014, ARM Limited. All rights reserved. -// -// This program and the accompanying materials -// are licensed and made available under the terms and conditions of the BSD License -// which accompanies this distribution. The full text of the license may be found at -// http://opensource.org/licenses/bsd-license.php -// -// THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -// WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -// -// - -.text -.align 3 - -GCC_ASM_EXPORT(ArmCallSmc) - -ASM_PFX(ArmCallSmc): - ret diff --git a/ArmPkg/Library/ArmSmcLibNull/Arm/ArmSmcNull.S b/ArmPkg/Library/ArmSmcLibNull/Arm/ArmSmcNull.S deleted file mode 100644 index 9eaefd30cf..0000000000 --- a/ArmPkg/Library/ArmSmcLibNull/Arm/ArmSmcNull.S +++ /dev/null @@ -1,20 +0,0 @@ -// -// Copyright (c) 2012-2014, ARM Limited. All rights reserved. -// -// This program and the accompanying materials -// are licensed and made available under the terms and conditions of the BSD License -// which accompanies this distribution. The full text of the license may be found at -// http://opensource.org/licenses/bsd-license.php -// -// THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -// WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -// -// - -.text -.align 3 - -GCC_ASM_EXPORT(ArmCallSmc) - -ASM_PFX(ArmCallSmc): - bx lr diff --git a/ArmPkg/Library/ArmSmcLibNull/Arm/ArmSmcNull.asm b/ArmPkg/Library/ArmSmcLibNull/Arm/ArmSmcNull.asm deleted file mode 100644 index 3dcb25fa22..0000000000 --- a/ArmPkg/Library/ArmSmcLibNull/Arm/ArmSmcNull.asm +++ /dev/null @@ -1,20 +0,0 @@ -// -// Copyright (c) 2012-2014, ARM Limited. All rights reserved. -// -// This program and the accompanying materials -// are licensed and made available under the terms and conditions of the BSD License -// which accompanies this distribution. The full text of the license may be found at -// http://opensource.org/licenses/bsd-license.php -// -// THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -// WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -// -// - - - INCLUDE AsmMacroExport.inc - - RVCT_ASM_EXPORT ArmCallSmc - bx lr - - END diff --git a/ArmPkg/Library/ArmSmcLibNull/ArmSmcLibNull.c b/ArmPkg/Library/ArmSmcLibNull/ArmSmcLibNull.c new file mode 100644 index 0000000000..e5d4e51133 --- /dev/null +++ b/ArmPkg/Library/ArmSmcLibNull/ArmSmcLibNull.c @@ -0,0 +1,22 @@ +// +// Copyright (c) 2016, Linaro Limited. All rights reserved. +// +// This program and the accompanying materials +// are licensed and made available under the terms and conditions of the BSD License +// which accompanies this distribution. The full text of the license may be found at +// http://opensource.org/licenses/bsd-license.php +// +// THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +// WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. +// +// + +#include +#include + +VOID +ArmCallSmc ( + IN OUT ARM_SMC_ARGS *Args + ) +{ +} diff --git a/ArmPkg/Library/ArmSmcLibNull/ArmSmcLibNull.inf b/ArmPkg/Library/ArmSmcLibNull/ArmSmcLibNull.inf index 6d75c28afb..db15a5f8bb 100644 --- a/ArmPkg/Library/ArmSmcLibNull/ArmSmcLibNull.inf +++ b/ArmPkg/Library/ArmSmcLibNull/ArmSmcLibNull.inf @@ -22,12 +22,8 @@ VERSION_STRING = 1.0 LIBRARY_CLASS = ArmSmcLib -[Sources.ARM] - Arm/ArmSmcNull.asm | RVCT - Arm/ArmSmcNull.S | GCC - -[Sources.AARCH64] - AArch64/ArmSmcNull.S +[Sources] + ArmSmcLibNull.c [Packages] MdePkg/MdePkg.dec -- cgit v1.2.3