From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-x229.google.com (mail-wm0-x229.google.com [IPv6:2a00:1450:400c:c09::229]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id C1F121A1DF8 for ; Wed, 10 Aug 2016 08:18:32 -0700 (PDT) Received: by mail-wm0-x229.google.com with SMTP id i5so111319194wmg.0 for ; Wed, 10 Aug 2016 08:18:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=t0/kfA9bO5dJhzCbHaGKqSx6PSr2i7TOHlE48cluT2Q=; b=F4gLfTFRExoVYqOru6NPztNmsXisDkV86LlelW1xpQEN84Fh2nWiIhxmzBzXew4eMx 484qZJbJKU+IBaPUW+P9zLdn+rK0170udLI0s5KCpGE+e7t97l9RYDzkJ8p9t74r3Rtz ViTVKFiYwy9C7Rw0Mtnk0XqIlpKLmlx7Nrav8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=t0/kfA9bO5dJhzCbHaGKqSx6PSr2i7TOHlE48cluT2Q=; b=B3Qvz5L3neIQtchpgFnrD/FECN/8hJOmQz99XRtDiqiqW6fW6gppcq+FsGYyNifQxq jzfGEf6uSxkY98/au1uIdtp9kKGjg/O9ibvbQ8TTuzRnkjgEBhl1nx+orJ3NKfsNfBEe 0rfuRQpLsVCa/QLeLIN88NOvIXGtcYSMhqgLTBeiNGFA/SYKC/q9kETpP1gXEVojTuN6 ya8Q9ztZChCk6z9zWuE07J+whAMMwB9cDgaoD7eQikF32lvm5AHRlf21sd+VIv92d7j+ FuwjkuowwdxLsEE+nodRPynAohZ8t4b4jICMWDDDQd5blyGuJWu01aFYA/uLYUAg65Db yApw== X-Gm-Message-State: AEkoouvwL67nzo+sj/yJ3rHgCmFij0WZLp18BrfED2ffYvxR7j2hhBWMAkBpGus2WIZXc5hy X-Received: by 10.28.154.208 with SMTP id c199mr4135318wme.102.1470842311044; Wed, 10 Aug 2016 08:18:31 -0700 (PDT) Received: from localhost.localdomain (46.red-81-37-107.dynamicip.rima-tde.net. [81.37.107.46]) by smtp.gmail.com with ESMTPSA id c16sm8908374wme.4.2016.08.10.08.18.29 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 10 Aug 2016 08:18:30 -0700 (PDT) From: Ard Biesheuvel To: edk2-devel@lists.01.org, leif.lindholm@linaro.org, eugene@hp.com Cc: lersek@redhat.com, Ard Biesheuvel Date: Wed, 10 Aug 2016 17:17:44 +0200 Message-Id: <1470842282-8415-9-git-send-email-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1470842282-8415-1-git-send-email-ard.biesheuvel@linaro.org> References: <1470842282-8415-1-git-send-email-ard.biesheuvel@linaro.org> Subject: [PATCH 08/26] ArmPkg/ArmSmcLibNull: move to generic C implementation X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Aug 2016 15:18:33 -0000 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 --- ArmPkg/Library/ArmSmcLibNull/Arm/ArmSmcNull.S | 20 ---------- ArmPkg/Library/ArmSmcLibNull/Arm/ArmSmcNull.asm | 20 ---------- ArmPkg/Library/ArmSmcLibNull/{AArch64/ArmSmcNull.S => ArmSmcLibNull.c} | 42 ++++++++++---------- ArmPkg/Library/ArmSmcLibNull/ArmSmcLibNull.inf | 8 +--- 4 files changed, 24 insertions(+), 66 deletions(-) diff --git a/ArmPkg/Library/ArmSmcLibNull/Arm/ArmSmcNull.S b/ArmPkg/Library/ArmSmcLibNull/Arm/ArmSmcNull.S deleted file mode 100644 index 9eaefd30cff4..000000000000 --- 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 3dcb25fa22f6..000000000000 --- 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/AArch64/ArmSmcNull.S b/ArmPkg/Library/ArmSmcLibNull/ArmSmcLibNull.c similarity index 73% rename from ArmPkg/Library/ArmSmcLibNull/AArch64/ArmSmcNull.S rename to ArmPkg/Library/ArmSmcLibNull/ArmSmcLibNull.c index a6ef0e04da82..e5d4e511330c 100644 --- a/ArmPkg/Library/ArmSmcLibNull/AArch64/ArmSmcNull.S +++ b/ArmPkg/Library/ArmSmcLibNull/ArmSmcLibNull.c @@ -1,20 +1,22 @@ -// -// 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 +// +// 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 6d75c28afbdd..db15a5f8bbb3 100644 --- a/ArmPkg/Library/ArmSmcLibNull/ArmSmcLibNull.inf +++ b/ArmPkg/Library/ArmSmcLibNull/ArmSmcLibNull.inf @@ -22,12 +22,8 @@ [Defines] 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 -- 2.7.4