From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-x22b.google.com (mail-wm0-x22b.google.com [IPv6:2a00:1450:400c:c09::22b]) (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 5031E1A1DFE for ; Wed, 17 Aug 2016 07:59:18 -0700 (PDT) Received: by mail-wm0-x22b.google.com with SMTP id i5so237926676wmg.0 for ; Wed, 17 Aug 2016 07:59:18 -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=ZAhAiM5i96Ffvdu/k/ZpLKvjnnbYYxGlTrjQDV5WjOY=; b=MHQ4E7tf2u8Wn7IZUQF3+VVwgfBUZOwAp3txkyKKwOOI77EGndsLqyf5zmVRQWGKab dw5aercbBrvNId4OQm6+4gU/1jSvz35V7lcmGg7/88B6mWYd/p1a4B/ttccKZGwTTXuN exMtFyicM1Bce/DGyh7Ox6QgYDoHuHrxYwHy4= 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=ZAhAiM5i96Ffvdu/k/ZpLKvjnnbYYxGlTrjQDV5WjOY=; b=grria8XZjQS+3sDfvoXJ3ZYpbgJJs1QyrbHW92ExMp0WScAei4R97jU33Az4C+crGq a77046j9DX8pAVCf32EejobpJhJM96sCU8pNEyOiw+bd+jSMXcYCOifH28BQm54HhWRB +bZBEvSl7Jyc9PbT6Edf5BESbagN/yJ3RQ+z3a+aUo98gHOwAmDms7JIoBVuFXjuPgFb G2sr6tE2vtn16E+ScOb88JCgEmwN1mIxx9g77JD7iRPBD/PGd1gLilinjUk7nmkfuFbc Zfd8mzNvR5kLbfXLcNuDnF6hCC72X0PV6U5uVaZkYM8wdz4kjodCb+5h56CeaB6D4IRn nYLw== X-Gm-Message-State: AEkoouvfjPjnYMdS2rToWZc4AKMpGg5tx4L2GQCRNizh3p6RCRsgod/+Bxthg9QNv3HiAfuz X-Received: by 10.28.99.86 with SMTP id x83mr27584116wmb.95.1471445956456; Wed, 17 Aug 2016 07:59:16 -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 q137sm27035691wmd.19.2016.08.17.07.59.14 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 17 Aug 2016 07:59:15 -0700 (PDT) From: Ard Biesheuvel To: edk2-devel@lists.01.org, leif.lindholm@linaro.org, jbrasen@codeaurora.org, feng.tian@intel.com, star.zeng@intel.com, daniil.egranov@arm.com Cc: Ard Biesheuvel Date: Wed, 17 Aug 2016 16:59:02 +0200 Message-Id: <1471445945-19239-2-git-send-email-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1471445945-19239-1-git-send-email-ard.biesheuvel@linaro.org> References: <1471445945-19239-1-git-send-email-ard.biesheuvel@linaro.org> Subject: [PATCH v3 1/4] MdeModulePkg/EbcDxe AARCH64: clean up comment style in ASM file 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, 17 Aug 2016 14:59:18 -0000 Change to consistent // style comments. Also, remove bogus global definitions for external functions, and move the real exports to the top of the file. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel --- MdeModulePkg/Universal/EbcDxe/AArch64/EbcLowLevel.S | 111 +++++++++----------- 1 file changed, 52 insertions(+), 59 deletions(-) diff --git a/MdeModulePkg/Universal/EbcDxe/AArch64/EbcLowLevel.S b/MdeModulePkg/Universal/EbcDxe/AArch64/EbcLowLevel.S index e858227586a8..a9678432d549 100644 --- a/MdeModulePkg/Universal/EbcDxe/AArch64/EbcLowLevel.S +++ b/MdeModulePkg/Universal/EbcDxe/AArch64/EbcLowLevel.S @@ -1,40 +1,35 @@ -#/** @file -# -# This code provides low level routines that support the Virtual Machine -# for option ROMs. -# -# Copyright (c) 2015, The Linux Foundation. All rights reserved. -# Copyright (c) 2007 - 2014, Intel Corporation. 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. -# -#**/ - -#--------------------------------------------------------------------------- -# Equate files needed. -#--------------------------------------------------------------------------- - -ASM_GLOBAL ASM_PFX(CopyMem); -ASM_GLOBAL ASM_PFX(EbcInterpret); -ASM_GLOBAL ASM_PFX(ExecuteEbcImageEntryPoint); - -#**************************************************************************** -# EbcLLCALLEX -# -# This function is called to execute an EBC CALLEX instruction. -# This instruction requires that we thunk out to external native -# code. For AArch64, we copy the VM stack into the main stack and then pop -# the first 8 arguments off according to the AArch64 Procedure Call Standard -# On return, we restore the stack pointer to its original location. -# -#**************************************************************************** -# UINTN EbcLLCALLEXNative(UINTN FuncAddr, UINTN NewStackPointer, VOID *FramePtr) -ASM_GLOBAL ASM_PFX(EbcLLCALLEXNative); +///** @file +// +// This code provides low level routines that support the Virtual Machine +// for option ROMs. +// +// Copyright (c) 2015, The Linux Foundation. All rights reserved. +// Copyright (c) 2007 - 2014, Intel Corporation. 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. +// +//**/ + +ASM_GLOBAL ASM_PFX(EbcLLCALLEXNative) +ASM_GLOBAL ASM_PFX(EbcLLEbcInterpret) +ASM_GLOBAL ASM_PFX(EbcLLExecuteEbcImageEntryPoint) + +//**************************************************************************** +// EbcLLCALLEX +// +// This function is called to execute an EBC CALLEX instruction. +// This instruction requires that we thunk out to external native +// code. For AArch64, we copy the VM stack into the main stack and then pop +// the first 8 arguments off according to the AArch64 Procedure Call Standard +// On return, we restore the stack pointer to its original location. +// +//**************************************************************************** +// UINTN EbcLLCALLEXNative(UINTN FuncAddr, UINTN NewStackPointer, VOID *FramePtr) ASM_PFX(EbcLLCALLEXNative): stp x19, x20, [sp, #-16]! stp x29, x30, [sp, #-16]! @@ -61,16 +56,15 @@ ASM_PFX(EbcLLCALLEXNative): ret -#**************************************************************************** -# EbcLLEbcInterpret -# -# This function is called by the thunk code to handle an Native to EBC call -# This can handle up to 16 arguments (1-8 on in x0-x7, 9-16 are on the stack) -# x9 contains the Entry point that will be the first argument when -# EBCInterpret is called. -# -#**************************************************************************** -ASM_GLOBAL ASM_PFX(EbcLLEbcInterpret); +//**************************************************************************** +// EbcLLEbcInterpret +// +// This function is called by the thunk code to handle an Native to EBC call +// This can handle up to 16 arguments (1-8 on in x0-x7, 9-16 are on the stack) +// x9 contains the Entry point that will be the first argument when +// EBCInterpret is called. +// +//**************************************************************************** ASM_PFX(EbcLLEbcInterpret): stp x29, x30, [sp, #-16]! @@ -105,7 +99,7 @@ ASM_PFX(EbcLLEbcInterpret): mov x1, x0 mov x0, x9 - # call C-code + // call C-code bl ASM_PFX(EbcInterpret) add sp, sp, #80 @@ -113,23 +107,22 @@ ASM_PFX(EbcLLEbcInterpret): ret -#**************************************************************************** -# EbcLLExecuteEbcImageEntryPoint -# -# This function is called by the thunk code to handle the image entry point -# x9 contains the Entry point that will be the first argument when -# ExecuteEbcImageEntryPoint is called. -# -#**************************************************************************** -ASM_GLOBAL ASM_PFX(EbcLLExecuteEbcImageEntryPoint); +//**************************************************************************** +// EbcLLExecuteEbcImageEntryPoint +// +// This function is called by the thunk code to handle the image entry point +// x9 contains the Entry point that will be the first argument when +// ExecuteEbcImageEntryPoint is called. +// +//**************************************************************************** ASM_PFX(EbcLLExecuteEbcImageEntryPoint): stp x29, x30, [sp, #-16]! - # build new paramater calling convention + // build new paramater calling convention mov x2, x1 mov x1, x0 mov x0, x9 - # call C-code + // call C-code bl ASM_PFX(ExecuteEbcImageEntryPoint) ldp x29, x30, [sp], #16 ret -- 2.7.4