From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wr1-f54.google.com (mail-wr1-f54.google.com [209.85.221.54]) by mx.groups.io with SMTP id smtpd.web11.9570.1612874543525564603 for ; Tue, 09 Feb 2021 04:42:24 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@nuviainc-com.20150623.gappssmtp.com header.s=20150623 header.b=JHvNiU/a; spf=pass (domain: nuviainc.com, ip: 209.85.221.54, mailfrom: leif@nuviainc.com) Received: by mail-wr1-f54.google.com with SMTP id r21so5261005wrr.9 for ; Tue, 09 Feb 2021 04:42:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nuviainc-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=345ERhOzrzPFB22/GD+mUmr1Utux4MdTqq9nhJK1obY=; b=JHvNiU/a11kgdCW2Ej8OPprj33kFucFEsHjnyEBYHfiSs0WwNqLDfpDlEqtN2Lp1eR TUhyRVzHm7z9Jco+s01hiNWO7V3WykSKmZ1aXU7GUeBYPjjoHr3CwlyDBq4pBZZTFjd3 5uhhxmjVWhJ0xkzaVYz3KTeWKn9sGq9G7FU+qBunphK2nhe1UADwCoaNZg7u17qtDE3k DCb82yd6dopJmCANyfILW4QSC15j/wDLaL5ZGImDgaluAT23OIVdl90j+yicfGyYvyxi vHXqQl8OggROOIXfdbYB6Z7JlNHUnXSYDvhjvY9fbO8ikK2fMjdafiI46mpDm3bbjuLU v2OA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to:user-agent; bh=345ERhOzrzPFB22/GD+mUmr1Utux4MdTqq9nhJK1obY=; b=EInCIOZmTLiRr3s4ry8hEmgAtfAJBXlKeUfg9jVR1s1LQhQ+pCbC8ebmNl13cIM/KE wd1FPf2mY28H+6L5NesJQ1AV8UPTiodj637DcjVTzVXyqNpTqxKTFNs82urYksZAIjKo RjJfUTysRHBqtkB1wMdrDx5dn+3VUIzc6wLcfvkKbCgsNZdcAra5BqIDNOTxq6RB2Mkf Z7vv8TC7JwDZnUjpUm9xhmFoBntxyphruzppiPTSk+XBhCve8Ex8MuAzSHZV0x8aQfNO +gyyoR/+Ul2AkGQ9nSjlZI+83y4oiVzw2kumpKDGvLJm9JYXvxi3ekqpMj0vfwb7A/qp 1KKg== X-Gm-Message-State: AOAM531ZeEUpydfbdaZAnieJ2TmsdBUSmM17akhkpxUN8TYoiNc06hCI RX9gotzrGilxJhcHPOZhFwIocQ== X-Google-Smtp-Source: ABdhPJwS8OSlSOFHOG3gZhnTK167uVll/PXIJtvN9ZE57p2+KnCCR0UrCWj9aNGrrMJx/tb9Ih3ESA== X-Received: by 2002:adf:f192:: with SMTP id h18mr17006892wro.340.1612874542160; Tue, 09 Feb 2021 04:42:22 -0800 (PST) Return-Path: Received: from vanye (cpc1-cmbg19-2-0-cust915.5-4.cable.virginm.net. [82.27.183.148]) by smtp.gmail.com with ESMTPSA id x15sm18974562wro.66.2021.02.09.04.42.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 Feb 2021 04:42:21 -0800 (PST) Date: Tue, 9 Feb 2021 12:42:19 +0000 From: "Leif Lindholm" To: Heinrich Schuchardt Cc: Daniel Schaefer , devel@edk2.groups.io, Abner Chang , Gilbert Chen , Eric Jin , G Edhaya Chandran , Barton Gao , Samer El-Haj-Mahmoud Subject: Re: [edk2-devel] [edk2-test PATCH v1 2/2] SctPkg: Enable RISCV64 support using AARCH64 sources Message-ID: <20210209124219.GG1664@vanye> References: <20201201161752.23734-1-daniel.schaefer@hpe.com> <20201201161752.23734-3-daniel.schaefer@hpe.com> <20201202120436.GE1664@vanye> <7741f08d-efeb-e959-7118-fb74474e3424@gmx.de> MIME-Version: 1.0 In-Reply-To: <7741f08d-efeb-e959-7118-fb74474e3424@gmx.de> User-Agent: Mutt/1.10.1 (2018-07-13) Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit On Mon, Feb 08, 2021 at 18:04:45 +0100, Heinrich Schuchardt wrote: > >>> diff --git a/uefi-sct/SctPkg/SCRT/SCRTApp/Riscv64/GoVirtual.S > >>> b/uefi-sct/SctPkg/SCRT/SCRTApp/Riscv64/GoVirtual.S > >>> new file mode 100644 > >>> index 00000000..8bc2c624 > >>> --- /dev/null > >>> +++ b/uefi-sct/SctPkg/SCRT/SCRTApp/Riscv64/GoVirtual.S > >>> @@ -0,0 +1,45 @@ > >>> +## @file > >>> +# > >>> +#  Copyright 2010 - 2012 Unified EFI, Inc.
> >>> +#  Copyright (c) 2012, ARM Ltd. All rights reserved.
> >>> +#  Copyright (c) 2020, Hewlett Packard Enterprise Development LP.
> >>> +# > >>> +#  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. > >>> +# > >>> +## > >>> +# > >>> +# > >>> +#/*++ > >>> +# > >>> +# Module Name: > >>> +# > >>> +#  GoVirtual.S > >>> +# > >>> +#--*/ > >>> +#start of the code section > >>> +.text > >>> +/* FIXME: Should alignment be different on Aarch64? */ > >> > >> 1) FIXME > >> 2) Aarch64. > > > > I have no idea why the alignment would be 3 on other platforms, so I > > don't know how to fix it. > > If anyone knows more, please let me know. I'll just change the comment > > to say Riscv64. > > > >>> +.align 3 > > Both on Aarch64 and on RISC-V an odd alignment value makes no sense. > > .align 8 should do no harm. But is it needed? The glory of the GAS .align directive is that its meaning differs between architectures and executable formats. On ARM/AArch64, as well as on RISC-V (I think?) the alignment is described as a power of 2. So .align 3 on ARM and others are the same as .align 8 on x86 (ELF) and others. (It might not be a bad idea to start replacing .align directives with .baligh to reduce confusion.) I haven't looked into whether 8-byte alignment is actually required by the code here. / Leif