From: "Leif Lindholm" <leif@nuviainc.com>
To: Heinrich Schuchardt <xypron.glpk@gmx.de>
Cc: Daniel Schaefer <daniel.schaefer@hpe.com>,
devel@edk2.groups.io, Abner Chang <abner.chang@hpe.com>,
Gilbert Chen <gilbert.chen@hpe.com>,
Eric Jin <eric.jin@intel.com>,
G Edhaya Chandran <Edhaya.Chandran@arm.com>,
Barton Gao <gaojie@byosoft.com.cn>,
Samer El-Haj-Mahmoud <Samer.El-Haj-Mahmoud@arm.com>
Subject: Re: [edk2-devel] [edk2-test PATCH v1 2/2] SctPkg: Enable RISCV64 support using AARCH64 sources
Date: Tue, 9 Feb 2021 12:42:19 +0000 [thread overview]
Message-ID: <20210209124219.GG1664@vanye> (raw)
In-Reply-To: <7741f08d-efeb-e959-7118-fb74474e3424@gmx.de>
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.<BR>
> >>> +# Copyright (c) 2012, ARM Ltd. All rights reserved.<BR>
> >>> +# Copyright (c) 2020, Hewlett Packard Enterprise Development LP.<BR>
> >>> +#
> >>> +# 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
next prev parent reply other threads:[~2021-02-09 12:42 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-01 16:17 [edk2-test PATCH v1 0/2] Add RISCV64 support to SctPkg Daniel Schaefer
2020-12-01 16:17 ` [edk2-test PATCH v1 1/2] SctPkg: Add RISCV64 support Daniel Schaefer
2020-12-02 11:44 ` [edk2-devel] " Leif Lindholm
2021-02-08 15:09 ` Daniel Schaefer
2020-12-01 16:17 ` [edk2-test PATCH v1 2/2] SctPkg: Enable RISCV64 support using AARCH64 sources Daniel Schaefer
2020-12-02 12:04 ` [edk2-devel] " Leif Lindholm
2021-02-08 15:09 ` Daniel Schaefer
2021-02-08 17:04 ` Heinrich Schuchardt
2021-02-09 12:42 ` Leif Lindholm [this message]
2021-02-09 13:47 ` Heinrich Schuchardt
2021-02-09 14:58 ` Leif Lindholm
2021-02-09 15:11 ` Daniel Schaefer
2020-12-01 16:59 ` [edk2-test PATCH v1 0/2] Add RISCV64 support to SctPkg Heinrich Schuchardt
2020-12-01 17:11 ` Daniel Schaefer
2020-12-01 17:37 ` Heinrich Schuchardt
2021-02-08 14:30 ` Daniel Schaefer
2021-02-08 15:50 ` Heinrich Schuchardt
2020-12-02 12:07 ` Leif Lindholm
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210209124219.GG1664@vanye \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox