From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-x231.google.com (mail-wm0-x231.google.com [IPv6:2a00:1450:400c:c09::231]) (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 5CD751A1E43 for ; Wed, 31 Aug 2016 01:46:00 -0700 (PDT) Received: by mail-wm0-x231.google.com with SMTP id w2so20725563wmd.0 for ; Wed, 31 Aug 2016 01:46:00 -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=RBVMwzEbVWerb7TbTZpKnxfhQPDSN0alGMYHho4XDNo=; b=Xd8mHet59E2wRFL9pdGzj6Y9jwctiIIuV1tMF4ilMywvS38O+QXoMY3jzIw/A1gQ9P LomQrq9eeHPXQpUFP5SjpHn/aG3b1OW6Kr1iExBcQMcz/eYuTpWV2DxpKi2J3g9Snb0v XYzyzX12OdM8QGnF8enMRTxIzVZyOuW3SGCbc= 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=RBVMwzEbVWerb7TbTZpKnxfhQPDSN0alGMYHho4XDNo=; b=grTEdaO3ySNHI0qHlqJtPyF2Ce3+4eVAgIo8Ri/04ufdWTWQ4QoqOaqcE6I4I53/sv 6Pjj4lICm601Gvf82oXnITlEAUtfmY1eo/XYcrld8dFbpz1D1/r5w7zoPKiro+l3OBMe Io0+RDfj0Im0lhzY0j6CswHNvAThB8Gk/yN0CcIHHa7k4BUjmnXg+mjh/RDjcPM72Ch8 s3cKc7jTOcM9Z+nx2KFeOxxY1JMBuz3vtwNagDkS+KycRkZoXecAbYpFkrZoR09qzhE1 uR9u5KxTYUkSTq+ENw4iz6pm92gtv6SvtIDc4aNZkG3bg3SOmnyjjy/NnfyL5g4sO089 Xulw== X-Gm-Message-State: AE9vXwMwBfacW7xaoYp5rg9kIz7tN88Dmyts1ziXkr3Aa0/HYNafN8jFwI8IsUexoDfzR9EL X-Received: by 10.28.94.85 with SMTP id s82mr19594885wmb.24.1472633158781; Wed, 31 Aug 2016 01:45:58 -0700 (PDT) Received: from localhost.localdomain ([160.169.158.74]) by smtp.gmail.com with ESMTPSA id f10sm43240579wje.14.2016.08.31.01.45.56 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 31 Aug 2016 01:45:58 -0700 (PDT) From: Ard Biesheuvel To: edk2-devel@lists.01.org, feng.tian@intel.com, star.zeng@intel.com Cc: leif.lindholm@linaro.org, Ard Biesheuvel Date: Wed, 31 Aug 2016 09:45:46 +0100 Message-Id: <1472633149-13817-2-git-send-email-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1472633149-13817-1-git-send-email-ard.biesheuvel@linaro.org> References: <1472633149-13817-1-git-send-email-ard.biesheuvel@linaro.org> Subject: [PATCH v5 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, 31 Aug 2016 08:46:00 -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 Reviewed-by: Leif Lindholm --- 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..17f379248a62 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 parameter 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