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.web08.4073.1626760213103901485 for ; Mon, 19 Jul 2021 22:50:13 -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, 20 Jul 2021 13:50:08 +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: "'Chang, Abner \(HPS SW/FW Technologist\)'" , "'Schaefer, Daniel'" , Cc: "'Michael D Kinney'" , "'Zhiguang Liu'" , "'Leif Lindholm'" References: <20210515181234.15186-1-daniel.schaefer@hpe.com> In-Reply-To: Subject: =?UTF-8?B?5Zue5aSNOiBbUEFUQ0ggdjEgMS8xXSBBZGQgTWVtb3J5RmVuY2UgaW1wbGVtZW50YXRpb24gZm9yIFJpc2NWNjQ=?= Date: Tue, 20 Jul 2021 13:50:08 +0800 Message-ID: <000101d77d2b$198ff710$4cafe530$@byosoft.com.cn> MIME-Version: 1.0 X-Mailer: Microsoft Outlook 16.0 Thread-Index: AQFJypucKS8cqqScHdSjLYIRs6xE8QITAF8srFYo9JA= Content-Type: text/plain; charset="gb2312" Content-Transfer-Encoding: quoted-printable Content-Language: zh-cn Acked-by: Liming Gao > -----=D3=CA=BC=FE=D4=AD=BC=FE----- > =B7=A2=BC=FE=C8=CB: Chang, Abner (HPS SW/FW Technologist) = > =B7=A2=CB=CD=CA=B1=BC=E4: 2021=C4=EA7=D4=C214=C8=D5 22:12 > =CA=D5=BC=FE=C8=CB: Schaefer, Daniel ; = devel@edk2.groups.io > =B3=AD=CB=CD: Michael D Kinney ; Liming = Gao > ; Zhiguang Liu ; = Leif > Lindholm > =D6=F7=CC=E2: RE: [PATCH v1 1/1] Add MemoryFence implementation for = RiscV64 >=20 > Reviewed-by: Abner Chang >=20 > > -----Original Message----- > > From: Schaefer, Daniel > > Sent: Sunday, May 16, 2021 2:13 AM > > To: devel@edk2.groups.io > > Cc: Chang, Abner (HPS SW/FW Technologist) ; > > Michael D Kinney ; Liming Gao > > ; Zhiguang Liu ; = Leif > > Lindholm > > Subject: [PATCH v1 1/1] Add MemoryFence implementation for RiscV64 > > > > 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(+) > > > > 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 > > > > RiscV64/EnableInterrupts.c > > > > RiscV64/CpuPause.c > > > > + RiscV64/MemoryFence.S | GCC > > > > RiscV64/RiscVSetJumpLongJump.S | GCC > > > > RiscV64/RiscVCpuBreakpoint.S | GCC > > > > RiscV64/RiscVCpuPause.S | GCC > > > > 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 @@ > > +##----------------------------------------------------------------------= --- ----- > > > > +# > > > > +# MemoryFence() for RiscV64 > > > > + > > > > +# Copyright (c) 2021, Hewlett Packard Enterprise Development. All rights > > reserved. > > > > +# > > > > +# SPDX-License-Identifier: BSD-2-Clause-Patent > > > > +# > > > > +##----------------------------------------------------------------------= --- ----- > > > > + > > > > +.text > > > > +.p2align 2 > > > > + > > > > +ASM_GLOBAL ASM_PFX(MemoryFence) > > > > + > > > > + > > > > +#/** > > > > +# Used to serialize load and store operations. > > > > +# > > > > +# All loads and stores that proceed calls to this function are guaranteed > to > > be > > > > +# globally visible when this function returns. > > > > +# > > > > +#**/ > > > > +#VOID > > > > +#EFIAPI > > > > +#MemoryFence ( > > > > +# VOID > > > > +# ); > > > > +# > > > > +ASM_PFX(MemoryFence): > > > > + // Fence on all memory and I/O > > > > + fence > > > > + ret > > > > -- > > 2.30.1