From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-x230.google.com (mail-wm0-x230.google.com [IPv6:2a00:1450:400c:c09::230]) (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 9AEC11A1E00 for ; Fri, 26 Aug 2016 04:06:15 -0700 (PDT) Received: by mail-wm0-x230.google.com with SMTP id f65so273703474wmi.0 for ; Fri, 26 Aug 2016 04:06:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=M7YaTpfbQAPhQsv2S5xf6GVcxU43dPid3chbRGr8Zv8=; b=gisXb7tnujuj6hdGZXVq9MOS6kJEs10mZ09rM6AoEd/MPh66sQvIJiBkvnVnKXIcb0 x32M57OJ5wqVXG/SR0/meqfITZXWUDYvhxuYRX+GDo+5gm4Fl5s5jCLSxDxZocTxAIbn 0wrChQFJKcgnA4a4u99zQC+r2aD7hqQBP7cz0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=M7YaTpfbQAPhQsv2S5xf6GVcxU43dPid3chbRGr8Zv8=; b=eY2h7XjdugKKiL577KwQBuoUZXHeCS4iWhtwSha+uwr76awsh5iM251jJHC8Mnh6vI qCkSC2g4nhzpZPw2nm+SYhIdusCU/lVTn8L2o7BwdP2cj0FU3CVUKzOh4KcGpb5Xg1nB symIiP4NO8fNLqV72XZ+GmmoaPiM6xmDXHEVyDUBk0w6l6AHIbi6ay8oKuH+3qyOZlIk l/yiZR0YooHZnR9LiHXIeYU+wJS0pZQiWfl1To/BpQ2VvcDXGus3n6VsS9aevgp+Ukzf lSAvuzBw8hZUIJKP4fDagUDUXHZ23YnnWfWgQgkCGyJBhu4w4/EE5j1QCc42zpmp3YIu lP5A== X-Gm-Message-State: AE9vXwOxEZkhGwRpo6WdYj0fO1HwG1J8rdieGwyoCGLvKdXcn7JuZaPMKOJ6M8nLi0HxRK2q X-Received: by 10.194.127.37 with SMTP id nd5mr3198368wjb.156.1472209573989; Fri, 26 Aug 2016 04:06:13 -0700 (PDT) Received: from bivouac.eciton.net (bivouac.eciton.net. [2a00:1098:0:86:1000:23:0:2]) by smtp.gmail.com with ESMTPSA id d80sm43268345wmd.14.2016.08.26.04.06.12 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 26 Aug 2016 04:06:12 -0700 (PDT) Date: Fri, 26 Aug 2016 12:06:10 +0100 From: Leif Lindholm To: Ard Biesheuvel Cc: edk2-devel@lists.01.org, jbrasen@codeaurora.org, feng.tian@intel.com, star.zeng@intel.com, daniil.egranov@arm.com Message-ID: <20160826110610.GD4715@bivouac.eciton.net> References: <1471445945-19239-1-git-send-email-ard.biesheuvel@linaro.org> <1471445945-19239-2-git-send-email-ard.biesheuvel@linaro.org> MIME-Version: 1.0 In-Reply-To: <1471445945-19239-2-git-send-email-ard.biesheuvel@linaro.org> User-Agent: Mutt/1.5.23 (2014-03-12) Subject: Re: [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: Fri, 26 Aug 2016 11:06:16 -0000 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Wed, Aug 17, 2016 at 04:59:02PM +0200, Ard Biesheuvel wrote: > 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 Fix typo while you're at it (paramater -> parameter)? With that: Reviewed-by: Leif Lindholm > 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 >