From: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
To: Michael Brown <mcb30@ipxe.org>
Cc: Abner Chang <abner.chang@amd.com>,
Daniel Schaefer <git@danielschaefer.me>,
Michael D Kinney <michael.d.kinney@intel.com>,
Liming Gao <gaoliming@byosoft.com.cn>,
Ard Biesheuvel <ardb+tianocore@kernel.org>,
Jiewen Yao <jiewen.yao@intel.com>,
Jordan Justen <jordan.l.justen@intel.com>,
Gerd Hoffmann <kraxel@redhat.com>,
Sami Mujawar <sami.mujawar@arm.com>,
Leif Lindholm <quic_llindhol@quicinc.com>,
Eric Dong <eric.dong@intel.com>, Ray Ni <ray.ni@intel.com>,
Rahul Kumar <rahul1.kumar@intel.com>,
Zhiguang Liu <zhiguang.liu@intel.com>,
Anup Patel <apatel@ventanamicro.com>,
Andrei Warkentin <andrei.warkentin@intel.com>,
devel@edk2.groups.io, sunilvl@ventanamicro.com,
dann frazier <dann.frazier@canonical.com>
Subject: Re: [edk2-devel] [edk2-staging/RiscV64QemuVirt PATCH V8 00/19] Add support for RISC-V virt machine
Date: Fri, 17 Feb 2023 11:12:24 +0100 [thread overview]
Message-ID: <0d898a1b-a5ee-a037-c7da-4a12c170aad9@canonical.com> (raw)
In-Reply-To: <010201865ea973b9-f0358277-9198-4adc-a8c9-9c106220b25a-000000@eu-west-1.amazonses.com>
On 2/17/23 10:16, Michael Brown wrote:
> On 17/02/2023 04:27, Sunil V L wrote:
>> On Thu, Feb 16, 2023 at 03:45:49PM -0700, dann frazier wrote:
>>> Thanks for your work getting this merged! In the above wiki, it
>>> notes that GCC 12+ is not supported. Is that still accurate? If so,
>>> can you clarify what is blocking that?
>>
>> Please see https://bugzilla.tianocore.org/show_bug.cgi?id=4061.
>>
>> My attempt to fix this issue
>> (https://edk2.groups.io/g/devel/message/93831) was not accepted due to
>> the concerns that it can cause weird issues in CI.
>>
>> So, we are left with either support gcc <12 or gcc >=12. We can mandate
>> gcc 12 itself for RISC-V, but that change need to be done hand in hand
>> with CI tests moving to use gcc 12. Otherwise, it will break CI.
>
> Is there an alternative (and presumably less ideal) way to force an
> instruction cache invalidation? For example, does a global TSO "fence"
> instruction as used in RiscVInvalidateDataCacheAsm() also invalidate the
> instruction cache?
>
> If so, then a viable solution would be:
>
> --- a/MdePkg/Library/BaseLib/RiscV64/FlushCache.S
> +++ b/MdePkg/Library/BaseLib/RiscV64/FlushCache.S
> @@ -15,3 +15,7 @@ ASM_GLOBAL ASM_PFX(RiscVInvalidateDataCacheAsm)
> ASM_PFX(RiscVInvalidateInstCacheAsm):
> - fence.i
> +#ifdef __riscv_zifencei
> + fence.i
> +#else
> + fence
> +#endif
> ret
>
>
> This would also permit EDK2 to be used on implementations that genuinely
> do not provide the fence.i instruction.
>
> Michael
>
fence.i is the right instruction to use. The problem are not platforms
that do not provide the fence.i instruction but that the fence.i
instruction was removed from RVGC64 in the specification.
Now all programs like OpenSBI, U-Boot, Linux have to be compiled with
different -march parameters for GCC11 and GCC12.
Sunil suggested dropping support for GCC < 12. This seems to be the
easiest approach. An alternative would be adding a GCC12 profile to
BaseTools/Conf/tools_def.template but that would create a high effort.
Best regards
Heinrich
next prev parent reply other threads:[~2023-02-17 10:12 UTC|newest]
Thread overview: 44+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-10 12:30 [edk2-staging/RiscV64QemuVirt PATCH V8 00/19] Add support for RISC-V virt machine Sunil V L
2023-02-10 12:30 ` [edk2-staging/RiscV64QemuVirt PATCH V8 01/19] MdePkg/Register: Add register definition header files for RISC-V Sunil V L
2023-02-10 12:30 ` [edk2-staging/RiscV64QemuVirt PATCH V8 02/19] MdePkg/BaseLib: RISC-V: Add few more helper functions Sunil V L
2023-02-10 18:19 ` Michael D Kinney
2023-02-10 12:30 ` [edk2-staging/RiscV64QemuVirt PATCH V8 03/19] MdePkg: Add BaseRiscVSbiLib Library for RISC-V Sunil V L
2023-02-10 18:21 ` Michael D Kinney
2023-02-15 23:18 ` Michael D Kinney
2023-02-16 2:12 ` [edk2-devel] " Sunil V L
2023-02-16 3:46 ` Sunil V L
2023-02-16 5:54 ` Michael D Kinney
2023-02-16 6:14 ` Sunil V L
2023-02-16 6:28 ` Andrei Warkentin
2023-02-10 12:30 ` [edk2-staging/RiscV64QemuVirt PATCH V8 04/19] UefiCpuPkg: Add RISCV_EFI_BOOT_PROTOCOL related definitions Sunil V L
2023-02-10 12:30 ` [edk2-staging/RiscV64QemuVirt PATCH V8 05/19] UefiCpuPkg: Add BaseRiscV64CpuExceptionHandlerLib Sunil V L
2023-02-10 12:54 ` [edk2-devel] " Ni, Ray
2023-02-10 12:30 ` [edk2-staging/RiscV64QemuVirt PATCH V8 06/19] UefiCpuPkg: Add BaseRiscV64CpuTimerLib library Sunil V L
2023-02-10 12:46 ` [edk2-devel] " Ni, Ray
2023-02-10 12:30 ` [edk2-staging/RiscV64QemuVirt PATCH V8 07/19] UefiCpuPkg: Add CpuTimerDxeRiscV64 module Sunil V L
2023-02-10 12:46 ` Ni, Ray
[not found] ` <1742774BE3C3A342.6713@groups.io>
2023-02-10 12:55 ` [edk2-devel] " Ni, Ray
2023-02-10 15:41 ` Sunil V L
2023-02-11 10:03 ` Dhaval Sharma
2023-02-11 12:45 ` Sunil V L
2023-02-10 12:30 ` [edk2-staging/RiscV64QemuVirt PATCH V8 08/19] UefiCpuPkg: Add CpuDxeRiscV64 module Sunil V L
2023-02-10 12:30 ` [edk2-staging/RiscV64QemuVirt PATCH V8 09/19] UefiCpuPkg/UefiCpuPkg.ci.yaml: Ignore RISC-V file Sunil V L
2023-02-10 12:30 ` [edk2-staging/RiscV64QemuVirt PATCH V8 10/19] ArmVirtPkg/PlatformHasAcpiDtDxe: Move to OvmfPkg Sunil V L
2023-02-10 12:30 ` [edk2-staging/RiscV64QemuVirt PATCH V8 11/19] ArmVirtPkg: Fix up the location of PlatformHasAcpiDtDxe Sunil V L
2023-02-10 12:30 ` [edk2-staging/RiscV64QemuVirt PATCH V8 12/19] OvmfPkg/RiscVVirt: Add PlatformBootManagerLib library Sunil V L
2023-02-10 12:30 ` [edk2-staging/RiscV64QemuVirt PATCH V8 13/19] OvmfPkg/RiscVVirt: Add PrePiHobListPointerLib library Sunil V L
2023-02-10 12:30 ` [edk2-staging/RiscV64QemuVirt PATCH V8 14/19] OvmfPkg/RiscVVirt: Add ResetSystemLib library Sunil V L
2023-02-10 12:30 ` [edk2-staging/RiscV64QemuVirt PATCH V8 15/19] OvmfPkg/RiscVVirt: Add VirtNorFlashPlatformLib library Sunil V L
2023-02-10 12:30 ` [edk2-staging/RiscV64QemuVirt PATCH V8 16/19] OvmfPkg/RiscVVirt: Add PciCpuIo2Dxe module Sunil V L
2023-02-10 12:30 ` [edk2-staging/RiscV64QemuVirt PATCH V8 17/19] OvmfPkg/RiscVVirt: Add SEC module Sunil V L
2023-02-10 12:30 ` [edk2-staging/RiscV64QemuVirt PATCH V8 18/19] OvmfPkg/RiscVVirt: Add build files for Qemu Virt platform Sunil V L
2023-02-10 12:30 ` [edk2-staging/RiscV64QemuVirt PATCH V8 19/19] Maintainers.txt: Add entry for OvmfPkg/RiscVVirt Sunil V L
2023-02-10 13:20 ` [edk2-staging/RiscV64QemuVirt PATCH V8 00/19] Add support for RISC-V virt machine Yao, Jiewen
2023-02-10 13:49 ` Ard Biesheuvel
2023-02-10 16:22 ` Sunil V L
2023-02-16 22:45 ` [edk2-devel] " dann frazier
2023-02-17 4:27 ` Sunil V L
2023-02-17 9:16 ` Michael Brown
2023-02-17 10:12 ` Heinrich Schuchardt [this message]
2023-02-20 17:44 ` Oliver Steffen
2023-02-20 20:00 ` Sunil V L
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=0d898a1b-a5ee-a037-c7da-4a12c170aad9@canonical.com \
--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