From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail.byosoft.com.cn (mail.byosoft.com.cn [58.240.74.242]) by mx.groups.io with SMTP id smtpd.web09.2347.1621299867793852268 for ; Mon, 17 May 2021 18:04:28 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=none, err=permanent DNS error (domain: byosoft.com.cn, ip: 58.240.74.242, mailfrom: gaoliming@byosoft.com.cn) Received: from DESKTOPS6D0PVI ([58.246.60.130]) (envelope-sender ) by 192.168.6.13 with ESMTP for ; Tue, 18 May 2021 09:04:24 +0800 X-WM-Sender: gaoliming@byosoft.com.cn X-Originating-IP: 58.246.60.130 X-WM-AuthFlag: YES X-WM-AuthUser: gaoliming@byosoft.com.cn From: "gaoliming" To: , Cc: "'Abner Chang'" , "'Michael D Kinney'" , "'Zhiguang Liu'" , "'Leif Lindholm'" References: <20210515181234.15186-1-daniel.schaefer@hpe.com> In-Reply-To: <20210515181234.15186-1-daniel.schaefer@hpe.com> Subject: =?UTF-8?B?5Zue5aSNOiBbZWRrMi1kZXZlbF0gW1BBVENIIHYxIDEvMV0gQWRkIE1lbW9yeUZlbmNlIGltcGxlbWVudGF0aW9uIGZvciBSaXNjVjY0?= Date: Tue, 18 May 2021 09:04:25 +0800 Message-ID: <009501d74b81$bf063b40$3d12b1c0$@byosoft.com.cn> MIME-Version: 1.0 X-Mailer: Microsoft Outlook 16.0 Thread-Index: AQFJypucKS8cqqScHdSjLYIRs6xE8awDbWQQ Content-Type: text/plain; charset="gb2312" Content-Transfer-Encoding: quoted-printable Content-Language: zh-cn Daniel: Seemly, this API is missing in BaseLib for RiscV64 arch. How do you detec= t this issue?=20 Thanks Liming > -----=D3=CA=BC=FE=D4=AD=BC=FE----- > =B7=A2=BC=FE=C8=CB: devel@edk2.groups.io =B4=FA= =B1=ED Daniel > Schaefer > =B7=A2=CB=CD=CA=B1=BC=E4: 2021=C4=EA5=D4=C216=C8=D5 2:13 > =CA=D5=BC=FE=C8=CB: devel@edk2.groups.io > =B3=AD=CB=CD: Abner Chang ; Michael D Kinney > ; Liming Gao ; > Zhiguang Liu ; Leif Lindholm > =D6=F7=CC=E2: [edk2-devel] [PATCH v1 1/1] Add MemoryFence implementation= for > RiscV64 >=20 > Cc: Abner Chang > Cc: Michael D Kinney > Cc: Liming Gao > Cc: Zhiguang Liu > Cc: Leif Lindholm > Signed-off-by: Daniel Schaefer > --- > MdePkg/Library/BaseLib/BaseLib.inf | 1 + > MdePkg/Library/BaseLib/RiscV64/MemoryFence.S | 33 > ++++++++++++++++++++ > 2 files changed, 34 insertions(+) >=20 > diff --git a/MdePkg/Library/BaseLib/BaseLib.inf > b/MdePkg/Library/BaseLib/BaseLib.inf > index b76f3af380ea..b7ab5f632366 100644 > --- a/MdePkg/Library/BaseLib/BaseLib.inf > +++ b/MdePkg/Library/BaseLib/BaseLib.inf > @@ -399,6 +399,7 @@ > RiscV64/DisableInterrupts.c >=20 >=20 > RiscV64/EnableInterrupts.c >=20 >=20 > RiscV64/CpuPause.c >=20 >=20 > + RiscV64/MemoryFence.S | GCC >=20 >=20 > RiscV64/RiscVSetJumpLongJump.S | GCC >=20 >=20 > RiscV64/RiscVCpuBreakpoint.S | GCC >=20 >=20 > RiscV64/RiscVCpuPause.S | GCC >=20 >=20 > diff --git a/MdePkg/Library/BaseLib/RiscV64/MemoryFence.S > b/MdePkg/Library/BaseLib/RiscV64/MemoryFence.S > new file mode 100644 > index 000000000000..283df9356a9a > --- /dev/null > +++ b/MdePkg/Library/BaseLib/RiscV64/MemoryFence.S > @@ -0,0 +1,33 @@ > +##-----------------------------------------------------------------------= -- ----- >=20 >=20 > +# >=20 >=20 > +# MemoryFence() for RiscV64 >=20 >=20 > + >=20 >=20 > +# Copyright (c) 2021, Hewlett Packard Enterprise Development. All right= s > reserved. >=20 >=20 > +# >=20 >=20 > +# SPDX-License-Identifier: BSD-2-Clause-Patent >=20 >=20 > +# >=20 >=20 > +##-----------------------------------------------------------------------= -- ----- >=20 >=20 > + >=20 >=20 > +.text >=20 >=20 > +.p2align 2 >=20 >=20 > + >=20 >=20 > +ASM_GLOBAL ASM_PFX(MemoryFence) >=20 >=20 > + >=20 >=20 > + >=20 >=20 > +#/** >=20 >=20 > +# Used to serialize load and store operations. >=20 >=20 > +# >=20 >=20 > +# All loads and stores that proceed calls to this function are guaranteed to > be >=20 >=20 > +# globally visible when this function returns. >=20 >=20 > +# >=20 >=20 > +#**/ >=20 >=20 > +#VOID >=20 >=20 > +#EFIAPI >=20 >=20 > +#MemoryFence ( >=20 >=20 > +# VOID >=20 >=20 > +# ); >=20 >=20 > +# >=20 >=20 > +ASM_PFX(MemoryFence): >=20 >=20 > + // Fence on all memory and I/O >=20 >=20 > + fence >=20 >=20 > + ret >=20 >=20 > -- > 2.30.1 >=20 >=20 >=20 >=20 >=20