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.web12.7593.1620702249363823519 for ; Mon, 10 May 2021 20:04:09 -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, 11 May 2021 11:04:05 +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: "'Brijesh Singh'" , "'Eric Dong'" , "'Ray Ni'" , "'Laszlo Ersek'" , "'Rahul Kumar'" References: In-Reply-To: Subject: =?UTF-8?B?5Zue5aSNOiBbZWRrMi1kZXZlbF0gW1BBVENIXSBVZWZpQ3B1UGtnL01wSW5pdExpYjogUHJvcGVybHkgY2FzdCBmcm9tIFBDRCB0byBTRVYtRVMganVtcCB0YWJsZSBwb2ludGVy?= Date: Tue, 11 May 2021 11:04:05 +0800 Message-ID: <008c01d74612$4d9428b0$e8bc7a10$@byosoft.com.cn> MIME-Version: 1.0 X-Mailer: Microsoft Outlook 16.0 Thread-Index: AQIqsb8idLKh2DuZf7VGTq7aa5ObW6o2wRog Content-Type: text/plain; charset="gb2312" Content-Transfer-Encoding: quoted-printable Content-Language: zh-cn Reviewed-by: Liming Gao > -----=D3=CA=BC=FE=D4=AD=BC=FE----- > =B7=A2=BC=FE=C8=CB: devel@edk2.groups.io =B4=FA= =B1=ED Lendacky, > Thomas > =B7=A2=CB=CD=CA=B1=BC=E4: 2021=C4=EA5=D4=C210=C8=D5 22:25 > =CA=D5=BC=FE=C8=CB: devel@edk2.groups.io > =B3=AD=CB=CD: Brijesh Singh ; Eric Dong > ; Ray Ni ; Laszlo Ersek > ; Rahul Kumar > =D6=F7=CC=E2: [edk2-devel] [PATCH] UefiCpuPkg/MpInitLib: Properly cast f= rom PCD to > SEV-ES jump table pointer >=20 > BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=3D3385 >=20 > A VS2012 build fails with a cast conversion warning when the SEV-ES work > area PCD is cast as a pointer to the SEV_ES_AP_JMP_FAR type. >=20 > When casting from a PCD value to a pointer, the cast should first be don= e > to a UINTN and then to the pointer. Update the code to perform a cast to > a UINTN before casting to a pointer to the SEV_ES_AP_JMP_FAR type. >=20 > Cc: Eric Dong > Cc: Ray Ni > Cc: Laszlo Ersek > Cc: Rahul Kumar > Signed-off-by: Tom Lendacky > --- > UefiCpuPkg/Library/MpInitLib/MpLib.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) >=20 > diff --git a/UefiCpuPkg/Library/MpInitLib/MpLib.c > b/UefiCpuPkg/Library/MpInitLib/MpLib.c > index 3d945972a025..dc2a54aa31e8 100644 > --- a/UefiCpuPkg/Library/MpInitLib/MpLib.c > +++ b/UefiCpuPkg/Library/MpInitLib/MpLib.c > @@ -1265,7 +1265,7 @@ SetSevEsJumpTable ( > UINT32 Offset, InsnByte; > UINT8 LoNib, HiNib; >=20 > - JmpFar =3D (SEV_ES_AP_JMP_FAR *) FixedPcdGet32 > (PcdSevEsWorkAreaBase); > + JmpFar =3D (SEV_ES_AP_JMP_FAR *) (UINTN) FixedPcdGet32 > (PcdSevEsWorkAreaBase); > ASSERT (JmpFar !=3D NULL); >=20 > // > -- > 2.31.0 >=20 >=20 >=20 >=20 >=20