From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-x233.google.com (mail-wm0-x233.google.com [IPv6:2a00:1450:400c:c09::233]) (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 8B2F91A1E01 for ; Tue, 30 Aug 2016 07:27:34 -0700 (PDT) Received: by mail-wm0-x233.google.com with SMTP id i5so39163142wmg.0 for ; Tue, 30 Aug 2016 07:27:34 -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=UHcszYIw7A+eCM8aSUqOuwaukK1/dES750+c6quqj5Y01Bjlg0HLnIuHjHY6GrdlNs mQQMSysblV8pjGFOShaEtDBekW1nbgfXmr0Nu+640xhCy3h4CHsxLXeHbfdrJwv9CuXt ik8xRBLEbW3FtQwime+XOqYBHK/rBhTyBa0I4= 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=aDM+JgKKzUyQHRHfJJPsDO9wodYHJOVk8AxUhlZUPug04bBUhO5ZZIK3+/nJbN8rKl jXfHAm7nSeKuf+aJLkxjo7hMG+v1dw5M2bDYdl1ozazqbRt4jnwWFiPBBqI57y0JTJFh AhtrZr+J/Qpu7qUi16ZeO3eefUYVaHMRKCb6XDTKQqGyHmpuczpCMbIoO1zNJL5PAHGI 99a968dGIuj4IsdBwXX2s/mKM1bqBVBSdSfs06ucjgpnIeAZ/ZZDFaSubXDU4j0YGSvq sjqxNcScJDQRXVKWm+HA9SjnLH9Osgyw3UIrbyidYHMxPGeJfzqRC7tE1QdN0QDIWuqV TCUQ== X-Gm-Message-State: AE9vXwNlWzPeLNod5UKpFaKej1kcusH6Gxb0ZINzeR/R8XxJHZ34ivIZpcQGxy1xv6V+c11H X-Received: by 10.28.152.5 with SMTP id a5mr3995780wme.76.1472567252828; Tue, 30 Aug 2016 07:27:32 -0700 (PDT) Received: from localhost.localdomain ([160.165.12.73]) by smtp.gmail.com with ESMTPSA id us9sm39773620wjb.43.2016.08.30.07.27.30 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 30 Aug 2016 07:27:32 -0700 (PDT) From: Ard Biesheuvel To: edk2-devel@lists.01.org, leif.lindholm@linaro.org Cc: Ard Biesheuvel Date: Tue, 30 Aug 2016 15:27:21 +0100 Message-Id: <1472567244-32031-2-git-send-email-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1472567244-32031-1-git-send-email-ard.biesheuvel@linaro.org> References: <1472567244-32031-1-git-send-email-ard.biesheuvel@linaro.org> Subject: [PATCH v4 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: Tue, 30 Aug 2016 14:27:35 -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