From: "Laszlo Ersek" <lersek@redhat.com>
To: devel@edk2.groups.io, thomas.lendacky@amd.com
Cc: Brijesh Singh <brijesh.singh@amd.com>,
Eric Dong <eric.dong@intel.com>, Ray Ni <ray.ni@intel.com>,
Rahul Kumar <rahul1.kumar@intel.com>
Subject: Re: [edk2-devel] [PATCH] UefiCpuPkg/MpInitLib: Properly cast from PCD to SEV-ES jump table pointer
Date: Tue, 11 May 2021 19:53:14 +0200 [thread overview]
Message-ID: <c3e88856-588b-5950-d114-bd9342ed57e1@redhat.com> (raw)
In-Reply-To: <c89bc819856d448360430c32cb3833a9667f987b.1620656694.git.thomas.lendacky@amd.com>
On 05/10/21 16:24, Lendacky, Thomas wrote:
> BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=3385
>
> 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.
>
> When casting from a PCD value to a pointer, the cast should first be done
> 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.
>
> Cc: Eric Dong <eric.dong@intel.com>
> Cc: Ray Ni <ray.ni@intel.com>
> Cc: Laszlo Ersek <lersek@redhat.com>
> Cc: Rahul Kumar <rahul1.kumar@intel.com>
> Signed-off-by: Tom Lendacky <thomas.lendacky@amd.com>
> ---
> UefiCpuPkg/Library/MpInitLib/MpLib.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> 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;
>
> - JmpFar = (SEV_ES_AP_JMP_FAR *) FixedPcdGet32 (PcdSevEsWorkAreaBase);
> + JmpFar = (SEV_ES_AP_JMP_FAR *) (UINTN) FixedPcdGet32 (PcdSevEsWorkAreaBase);
> ASSERT (JmpFar != NULL);
>
> //
>
Merged as commit 6933c78e4dc2, via
<https://github.com/tianocore/edk2/pull/1634>.
Thanks
Laszlo
next prev parent reply other threads:[~2021-05-11 17:53 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-10 14:24 [PATCH] UefiCpuPkg/MpInitLib: Properly cast from PCD to SEV-ES jump table pointer Lendacky, Thomas
2021-05-11 3:04 ` 回复: [edk2-devel] " gaoliming
2021-05-14 19:54 ` Lendacky, Thomas
[not found] ` <167F06F8CCEA121A.12775@groups.io>
2021-05-14 20:32 ` Lendacky, Thomas
2021-05-11 17:18 ` Laszlo Ersek
2021-05-11 17:53 ` Laszlo Ersek [this message]
[not found] <167DBAB14C9048A8.15120@groups.io>
2021-05-10 19:33 ` Lendacky, Thomas
2021-05-11 17:20 ` Laszlo Ersek
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=c3e88856-588b-5950-d114-bd9342ed57e1@redhat.com \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox