From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from walk.intel-email.com (walk.intel-email.com [101.227.64.242]) by mx.groups.io with SMTP id smtpd.web10.3489.1670374939521573246 for ; Tue, 06 Dec 2022 17:02:20 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@byosoft.com.cn header.s=cloud-union header.b=XZQcBO/T; spf=pass (domain: byosoft.com.cn, ip: 101.227.64.242, mailfrom: gaoliming@byosoft.com.cn) Received: from walk.intel-email.com (localhost [127.0.0.1]) by walk.intel-email.com (Postfix) with ESMTP id 4FEB0CD1F6AC for ; Wed, 7 Dec 2022 09:02:17 +0800 (CST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=byosoft.com.cn; s=cloud-union; t=1670374937; bh=G1Dj3QPeoSutNCcgYwIORZFZ24Lm0ZW6vCmfxS6/v4s=; h=From:To:Cc:References:In-Reply-To:Subject:Date; b=XZQcBO/Ty1qUV+5LqGdDbzTy3IbRxLx/jK+TC9tlSD4zxXodL8Mk/cVt/F28hJL5K N24QHX+ISAXQXCFM48OlKhDJ/FehrO2N9hhyvEEXBqnWR3CEmRxbp9NVgdz7TbaJoo lch1eosDzccvIcvRKFIV0qVJxdHOBbV68GwjbIJI= Received: from localhost (localhost [127.0.0.1]) by walk.intel-email.com (Postfix) with ESMTP id 31F24CD1F7ED for ; Wed, 7 Dec 2022 09:02:17 +0800 (CST) Received: from walk.intel-email.com (localhost [127.0.0.1]) by walk.intel-email.com (Postfix) with ESMTP id 0808CCD1F78A for ; Wed, 7 Dec 2022 09:02:17 +0800 (CST) Authentication-Results: walk.intel-email.com; none Received: from mail.byosoft.com.cn (mail.byosoft.com.cn [58.240.74.242]) by walk.intel-email.com (Postfix) with SMTP id 90ABECD1F6AC for ; Wed, 7 Dec 2022 09:02:14 +0800 (CST) Received: from DESKTOPS6D0PVI ([58.246.60.130]) (envelope-sender ) by 192.168.6.13 with ESMTP for ; Wed, 07 Dec 2022 09:02:12 +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: , , "'Ni, Ray'" Cc: "'Kinney, Michael D'" References: <20221202062502.4429-1-zhiguang.liu@intel.com> <20221202062502.4429-2-zhiguang.liu@intel.com> <088e01d90633$29296de0$7b7c49a0$@byosoft.com.cn> In-Reply-To: Subject: =?UTF-8?B?5Zue5aSNOiBbZWRrMi1kZXZlbF0gW1BBVENIXSBNZGVQa2cvVW5pdFRlc3RIb3N0QmFzZUxpYjogUmVtb3ZlIEhPU1RfQVBQTElDQVRJT04gbGltaXRhdGlvbg==?= Date: Wed, 7 Dec 2022 09:02:14 +0800 Message-ID: <039301d909d7$8b7bdf30$a2739d90$@byosoft.com.cn> MIME-Version: 1.0 X-Mailer: Microsoft Outlook 16.0 Thread-Index: AQHBBKmElr8K0HUSg+F8wgU2JmdecAFUOFYUAYizFfwCROzDMQL01TnHrlDvzrA= Sender: "gaoliming" Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Content-Language: zh-cn Zhiguang and Ray: Thanks for your sharing. It is OK to use UnitTestHostBaseLib in emulator = platform.=20 Please also update the file header in module inf to describe this usage. Thanks Liming > -----=E9=82=AE=E4=BB=B6=E5=8E=9F=E4=BB=B6----- > =E5=8F=91=E4=BB=B6=E4=BA=BA: devel@edk2.groups.io = =E4=BB=A3=E8=A1=A8 Zhiguang Liu > =E5=8F=91=E9=80=81=E6=97=B6=E9=97=B4: 2022=E5=B9=B412=E6=9C=885=E6=97=A5 = 13:53 > =E6=94=B6=E4=BB=B6=E4=BA=BA: Ni, Ray ; devel@edk2.group= s.io; Gao, Liming > > =E6=8A=84=E9=80=81: Kinney, Michael D > =E4=B8=BB=E9=A2=98: Re: [edk2-devel] [PATCH] MdePkg/UnitTestHostBaseLib: = Remove > HOST_APPLICATION limitation >=20 > Hi Liming, > Like ray said, we are trying to use some baselib function in EmulatorPkg, > which is assembly code in normal BaseLib, and is mocked in UnitTestBaseLi= b, > such as AsmWriteMsr64 and AsmCpuid. >=20 > Thanks > Zhiguang >=20 > > -----Original Message----- > > From: Ni, Ray > > Sent: Monday, December 5, 2022 1:38 PM > > To: devel@edk2.groups.io; Gao, Liming ; Liu, > > Zhiguang > > Cc: Kinney, Michael D > > Subject: RE: [edk2-devel] [PATCH] MdePkg/UnitTestHostBaseLib: Remove > > HOST_APPLICATION limitation > > > > Liming, > > We are running some code that requires MSR access (e.g.: MtrrLib) in > > EmulatorPkg. > > > > Thanks, > > Ray > > > > > -----Original Message----- > > > From: devel@edk2.groups.io On Behalf Of > > > gaoliming via groups.io > > > Sent: Friday, December 2, 2022 5:48 PM > > > To: devel@edk2.groups.io; Liu, Zhiguang > > > Cc: Kinney, Michael D ; Ni, Ray > > > > > > Subject: =E5=9B=9E=E5=A4=8D: [edk2-devel] [PATCH] MdePkg/UnitTestHost= BaseLib: > > Remove > > > HOST_APPLICATION limitation > > > > > > Zhiguang: > > > Can you explain more about the emulator usage model for this librar= y? > > > > > > Thanks > > > Liming > > > > -----=E9=82=AE=E4=BB=B6=E5=8E=9F=E4=BB=B6----- > > > > =E5=8F=91=E4=BB=B6=E4=BA=BA: devel@edk2.groups.io =E4=BB=A3=E8=A1=A8 > Zhiguang > > Liu > > > > =E5=8F=91=E9=80=81=E6=97=B6=E9=97=B4: 2022=E5=B9=B412=E6=9C=882=E6= =97=A5 14:25 > > > > =E6=94=B6=E4=BB=B6=E4=BA=BA: devel@edk2.groups.io > > > > =E6=8A=84=E9=80=81: Zhiguang Liu ; Michael = D Kinney > > > > ; Liming Gao > > ; > > > > Ray Ni > > > > =E4=B8=BB=E9=A2=98: [edk2-devel] [PATCH] MdePkg/UnitTestHostBaseLib= : Remove > > > > HOST_APPLICATION limitation > > > > > > > > Remove HOST_APPLICATION limitation for UnitTestHostBaseLib, so that > > > > this library can be used as BaseLib by Emulator. > > > > Also, add some missing files > > > > > > > > Cc: Michael D Kinney > > > > Cc: Liming Gao > > > > Signed-off-by: Ray Ni > > > > --- > > > > MdePkg/Library/BaseLib/UnitTestHostBaseLib.inf | 6 ++++-- > > > > 1 file changed, 4 insertions(+), 2 deletions(-) > > > > > > > > diff --git a/MdePkg/Library/BaseLib/UnitTestHostBaseLib.inf > > > > b/MdePkg/Library/BaseLib/UnitTestHostBaseLib.inf > > > > index 09a610c31c..fefa2e79f6 100644 > > > > --- a/MdePkg/Library/BaseLib/UnitTestHostBaseLib.inf > > > > +++ b/MdePkg/Library/BaseLib/UnitTestHostBaseLib.inf > > > > @@ -1,7 +1,7 @@ > > > > ## @file > > > > # Base Library implementation for use with host based unit tests. > > > > # > > > > -# Copyright (c) 2007 - 2021, Intel Corporation. All rights > > > > reserved.
> > > > +# Copyright (c) 2007 - 2022, Intel Corporation. All rights > > > > +reserved.
> > > > # Portions copyright (c) 2008 - 2009, Apple Inc. All rights > > > reserved.
> > > > # Portions copyright (c) 2011 - 2013, ARM Ltd. All rights > > > > reserved.
# Copyright (c) 2020, Hewlett Packard Enterprise > > > > Development LP. All rights reserved.
@@ -18,7 +18,7 @@ > > > > FILE_GUID =3D > > > > 9555A0D3-09BA-46C4-A51A-45198E3C765E > > > > MODULE_TYPE =3D BASE > > > > VERSION_STRING =3D 1.1 > > > > - LIBRARY_CLASS =3D > BaseLib|HOST_APPLICATION > > > > + LIBRARY_CLASS =3D BaseLib > > > > LIBRARY_CLASS =3D > > > > UnitTestHostBaseLib|HOST_APPLICATION > > > > > > > > # > > > > @@ -128,6 +128,7 @@ > > > > X86RdRand.c > > > > X86SpeculationBarrier.c > > > > X86UnitTestHost.c > > > > + IntelTdxNull.c > > > > > > > > [Sources.X64] > > > > X64/LongJump.nasm > > > > @@ -168,6 +169,7 @@ > > > > X64/RdRand.nasm > > > > ChkStkGcc.c | GCC > > > > X86UnitTestHost.c > > > > + IntelTdxNull.c > > > > > > > > [Sources.EBC] > > > > Ebc/CpuBreakpoint.c > > > > -- > > > > 2.31.1.windows.1 > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > >=20 >=20 >=20 >=20 >=20