From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx0b-002e3701.pphosted.com (mx0b-002e3701.pphosted.com [148.163.143.35]) by mx.groups.io with SMTP id smtpd.web09.3324.1621305462562358422 for ; Mon, 17 May 2021 19:37:42 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="body hash did not verify" header.i=@hpe.com header.s=pps0720 header.b=EaHOv+dd; spf=pass (domain: hpe.com, ip: 148.163.143.35, mailfrom: prvs=077265d86c=daniel.schaefer@hpe.com) Received: from pps.filterd (m0150245.ppops.net [127.0.0.1]) by mx0b-002e3701.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 14I2XVIA031653; Tue, 18 May 2021 02:35:33 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hpe.com; h=subject : to : cc : references : from : message-id : date : in-reply-to : content-type : content-transfer-encoding : mime-version; s=pps0720; bh=k+2CBzF3EqJJUH9X39uPu8wt/9i8NdQgNIOyqWT3+ZQ=; b=EaHOv+ddF1uZcdyfoKS5hDfHUi18+ypiowYpEEtWbMebibqpj/GwuXN9MJE0NXDwwfPo m6uxG/uqeFsc3AsVse78qrkFw7DTolWq6TG9q5V2keHXJ6ceCN01OZtc6p//hFZ5ruJ8 qbesByepPOQONJ/9PrNFjB54b9fupA3FIKhKimADJmdSrwq/wWRt44HqZz21k80yeg4P lWrSRBwIff+LGFtF9uWDzudgNct1qfcTByULS8EkAg9Nb2+WvyAJsWrQ+4KAoeyszbx7 7UOAuZZsee9lWqT6Hc7oZSHXhXaR9cs2Y+fjIg64qckQ+ifloV5xpgtxICZmea+2jyoP AQ== Received: from g9t5009.houston.hpe.com (g9t5009.houston.hpe.com [15.241.48.73]) by mx0b-002e3701.pphosted.com with ESMTP id 38m4fpg50c-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 18 May 2021 02:35:33 +0000 Received: from G4W9119.americas.hpqcorp.net (g4w9119.houston.hp.com [16.210.20.214]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by g9t5009.houston.hpe.com (Postfix) with ESMTPS id 0AD5251; Tue, 18 May 2021 02:35:31 +0000 (UTC) Received: from G4W9120.americas.hpqcorp.net (2002:10d2:150f::10d2:150f) by G4W9119.americas.hpqcorp.net (2002:10d2:14d6::10d2:14d6) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Tue, 18 May 2021 02:35:31 +0000 Received: from NAM02-BN1-obe.outbound.protection.outlook.com (15.241.52.11) by G4W9120.americas.hpqcorp.net (16.210.21.15) with Microsoft SMTP Server (TLS) id 15.0.1497.2 via Frontend Transport; Tue, 18 May 2021 02:35:31 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=hXsF4ZT/Ad9qdOji1NnfeVnMPcARETlajuSiSEovPg5hJ5vgqHA1HgWKBxDp+Rht3B4TboupiXkyQ0pCw3E6EVyHjOxJkwIfxvcmc5uXMRNlVVC72w8RyEbgOC5q8ZS8BmdEKbQTRuhAr9AY+tdAcN3nsQKGeTMIPiGjPIjQYTOowEBcN5Se61tWc2VXRYAZ/bGkCvx1RICf0gT4pBHd9P5E+mMMHkTM5xjSq/NGTLqiEbBvahQ9Zbpp8BS44VHIQ730TGUDl8VREmRzvvRaq1r4HjZa/MnWvuQI7XXEJ25eiCINXGq7TNtKhziXrZzxZgFKHFjyu8AnMYJKdmg7lg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=z6wICrRQ5cIqJwVFSMtR2SkcJU+hIdES4aeTzG5arOQ=; b=XnY7j1XcKB04ncWaepu82XSSptGkpg7KiQGPeUyQpJfuOVhvxSvHWxauQD3AgUzEdPs8Dnk92AqzgErKneQsOk5WgfIEQa6atsOQ1jXClO9cbrQ4UcjEqnaNc1gX8hHfgfV3oMRnICD535pwGQIT+8QqwajUu2wIq+nBHrzOf3xKGPXyYBWotLdKkqdP8mVMP5PQ+8R+UWX6cCbQ5ZesHK3mMdyeNnfjeKF8xIYUC4BElRC8HjchR5jmJMtvSdY7lvLRPgf0UzAoXKifKdRZglRf3xTx0SF0CB6atuGS5GbFHMIG+jJVsm/q4AI0r/HwNff0UyLudtoH0/s1MJ3Yaw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=hpe.com; dmarc=pass action=none header.from=hpe.com; dkim=pass header.d=hpe.com; arc=none Authentication-Results: nuviainc.com; dkim=none (message not signed) header.d=none;nuviainc.com; dmarc=none action=none header.from=hpe.com; Received: from DF4PR8401MB0444.NAMPRD84.PROD.OUTLOOK.COM (2a01:111:e400:760d::23) by DF4PR8401MB1243.NAMPRD84.PROD.OUTLOOK.COM (2a01:111:e400:760b::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4129.26; Tue, 18 May 2021 02:35:30 +0000 Received: from DF4PR8401MB0444.NAMPRD84.PROD.OUTLOOK.COM ([fe80::1055:761b:7ee6:52ca]) by DF4PR8401MB0444.NAMPRD84.PROD.OUTLOOK.COM ([fe80::1055:761b:7ee6:52ca%11]) with mapi id 15.20.4129.031; Tue, 18 May 2021 02:35:30 +0000 Subject: =?UTF-8?B?UmU6IOWbnuWkjTogW2VkazItZGV2ZWxdIFtQQVRDSCB2MSAxLzFdIEFkZCBNZW1vcnlGZW5jZSBpbXBsZW1lbnRhdGlvbiBmb3IgUmlzY1Y2NA==?= To: , CC: 'Abner Chang' , 'Michael D Kinney' , 'Zhiguang Liu' , 'Leif Lindholm' References: <20210515181234.15186-1-daniel.schaefer@hpe.com> <009501d74b81$bf063b40$3d12b1c0$@byosoft.com.cn> From: "Daniel Schaefer" Message-ID: Date: Tue, 18 May 2021 10:35:20 +0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.0 In-Reply-To: <009501d74b81$bf063b40$3d12b1c0$@byosoft.com.cn> X-Originating-IP: [123.193.59.220] X-ClientProxiedBy: HKAPR03CA0012.apcprd03.prod.outlook.com (2603:1096:203:c8::17) To DF4PR8401MB0444.NAMPRD84.PROD.OUTLOOK.COM (2a01:111:e400:760d::23) X-MS-Exchange-MessageSentRepresentingType: 1 Received: from [192.168.100.176] (123.193.59.220) by HKAPR03CA0012.apcprd03.prod.outlook.com (2603:1096:203:c8::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4150.11 via Frontend Transport; Tue, 18 May 2021 02:35:27 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 3f2a589c-f1f9-476a-2e82-08d919a59a39 X-MS-TrafficTypeDiagnostic: DF4PR8401MB1243: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:4303; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Xg5vpJlhxHKmIu+zDKYOMNCZ+SRmHU7jqqp+2B6DCZxqJSyyQc88E7R7B4kTB1zdjAxVvEoAdn0aBjmqVRLAfzlRSGRPuWpXAelKxxUC4ffGAz3KQVSOHr1SB8uTQ06tqMvCVwfmFlrSNL/nqbSaZOYAXbvrGe1T/2iTBKHLFcoWUHgVhVQ+Xi0yDHWzJO0+/VwlJC/1a9eW2WIsiFNUptl346Q9TFA5SwIBtcnUfGBX6t8SJGmRoggES86DiGAImNcDEN5H4cx0LQZFU5ZSpQ907W8FWN3Gwsl5JOTS7ueFsVak7WHua/jGuXOaluNXMncvwAn4KTW/ju+Q7RzrzZnyvtDzw0qqc4qRCqnEA9y4RY2LOQxZY3Mkb72x/PdGYThI1DI3fyWou6oQkDQqMu/h9CLkiuoKWybSLf6e45yGWMSXlG0uLarvzATORWbx2ybVJEGG2LE0XLIfoafn6YtHimemvHLkz+C1yHKGWjEmTqlrbNrFuFdcR2InQedK5I/bTYCrwUbLOt6D1IGgaXxCiYcLLfVHF0i9XwwfYEk0hD9uarllKerTXAVcQqRKmv3esvY8eVcDUjcRRrKh8Tt9Lz4APdp1RgBWMPICbH7Sxmn7v/jS0KwMdc872JGQbmMcXNGxR2g8nbyCVPzAq1rNzLV940bKzA2FTK+u9TWthXdyIq1802OVFFaZH5q3dlSkGu6z6arVhIsopIuu92fwnpXt1VfIQVQ6hsgsN01k+ig8/14nfTvo1HwrteAq4vD1kIsadROIqM0D1mKMZrevWxn6j9iYhKG5QsvoR8IjwGxQtwFrrR/guPuI1rOWylevS4UYTecAEPHYjR5WCA== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DF4PR8401MB0444.NAMPRD84.PROD.OUTLOOK.COM;PTR:;CAT:NONE;SFS:(376002)(39860400002)(396003)(366004)(346002)(136003)(224303003)(83380400001)(38100700002)(186003)(66476007)(66556008)(26005)(53546011)(4326008)(16526019)(86362001)(66946007)(31696002)(6666004)(44832011)(478600001)(966005)(2616005)(2906002)(6486002)(16576012)(54906003)(956004)(19627235002)(8936002)(5660300002)(316002)(36756003)(31686004)(43740500002)(45980500001);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData: =?gb2312?B?N2FYallUUlJPNWNKaXcrdkppQXZiUURKOU1nOElmK3hsN291K2pjUzI3Yjdr?= =?gb2312?B?S29NbHYxbmEvN0pieUlYb0NMbkpqRkUraTFlSEkwR0FYN2xPMVR1ZjJpRFVx?= =?gb2312?B?eFZRSnlLb3ZJZXJ0UklYcWlhaWlocEtCSEc2dkFPa2kyVlV2d3g1UEljL0hz?= =?gb2312?B?MCthUWxwYWZCRkVGZ2NzZWZnZVF5dmxiam4zekpVQnY0M3hJeUc3VGM5a2hS?= =?gb2312?B?SnR3MFdIeGNmOFAzck9EL1RUbFdQ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VTL00xWFNVS05SaGNOdjBDRDZSYk5yQ0I5K1hiWk1lT0IwcGI0Y0do?= =?gb2312?B?N2ZOYSs1Q0FudUdaUVlvMmpHVWVQT0g1VHV3TlkzK2RybUpZdkhEOUZuenBw?= =?gb2312?B?SlpOc0t0dUpSUnhRbE1YMCtpY1RCTXRqVHpwb0R6T1B3VDRMVld2enU4eThu?= =?gb2312?B?dnZYM0tWeGh2Si9qRUM3UG9YZS9HbWVtUkJ5TkxuNVA0Mk51Z1psTzZ3cHd6?= =?gb2312?B?NnFkRE11aUQyVEk5Zm9wSFE2QjJMN1N5N3R4cm1ENFF6K2hreXVsUFIvQ1hp?= =?gb2312?B?VUZYbEFCRTN2akE5NkFmdFpsNVZ3OXRQQ3FtcE96RkxRUzhmZXA3Smhwck01?= =?gb2312?B?OU9qT3FNcWEvNUprcFNWVGxaMzcxdDVRd0V6cFRUOXZ4VXNTWG1Lb05Ndy9h?= =?gb2312?B?TW5CRStDYjcraGV3SGYxdjlyNVUvdmJHdTVHVTRjVGs3TlR4MGx4b0Y2eFJk?= =?gb2312?B?dDdYMGwxUm1UdkNGYjJGWFFBVlpOZ3NIdzdHQmZHK3pOd1Zod0VacFJWa0w0?= =?gb2312?B?Y3NCV2hrUTVQTWZkTmNBR3RRQXpxUG0vV3lDcUQ4NkFyNVdZZUJoT2pSdjJz?= =?gb2312?Q?hL2L12iCgBimPPe6xAkKUfY+aVPcVn7GMxDuRgp?= X-MS-Exchange-CrossTenant-Network-Message-Id: 3f2a589c-f1f9-476a-2e82-08d919a59a39 X-MS-Exchange-CrossTenant-AuthSource: DF4PR8401MB0444.NAMPRD84.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 May 2021 02:35:29.9711 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 105b2061-b669-4b31-92ac-24d304d195dc X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: d4VJBUrGpJb4EMflkzfC0CCJ9n3WPvaiGDhsYCt3WVyLIMTPjFvvEpHeynibAPHzr0qoqw3M3C++xd34aWUflw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DF4PR8401MB1243 X-OriginatorOrg: hpe.com X-Proofpoint-ORIG-GUID: aT9FNtQMMSuTDPWpvC6H6k9PKJ9m7T62 X-Proofpoint-GUID: aT9FNtQMMSuTDPWpvC6H6k9PKJ9m7T62 X-Proofpoint-UnRewURL: 3 URL's were un-rewritten MIME-Version: 1.0 X-HPE-SCL: -1 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.391,18.0.761 definitions=2021-05-18_02:2021-05-17,2021-05-18 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxlogscore=999 bulkscore=0 spamscore=0 lowpriorityscore=0 phishscore=0 priorityscore=1501 mlxscore=0 malwarescore=0 suspectscore=0 impostorscore=0 clxscore=1015 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2104190000 definitions=main-2105180017 X-MIME-Autoconverted: from 8bit to quoted-printable by mx0b-002e3701.pphosted.com id 14I2XVIA031653 Content-Type: text/plain; charset=gbk Content-Language: en-US Content-Transfer-Encoding: quoted-printable On 5/18/21 9:04 AM, gaoliming wrote: > Daniel: > Seemly, this API is missing in BaseLib for RiscV64 arch. How do you det= ect > this issue?=20 What do you mean it's missing? Yes MemoryFence() for RiscV64 is missing currently, that's why I'm adding = it here. Maybe you mean that it's not currently used? That's also true. I'm enabling the generic QEMU virt machine (like OVMF or ArmVirtPkg) for R= ISC-V. At least QemuFwCfgLib and VirtioLib need it. That's why I have the need to add this implementation now. Does that clear it up? > 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 implementatio= n 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 righ= ts >> 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 >> >> >> >> >> >=20 >=20 >=20 >=20 >=20 >=20 >=20 >=20