Reporting Issues
Bug 3385 - UefiCpuPkg MpLib.c: 'type cast' : conversion from 'int' to 'SEV_ES_AP_JMP_FAR *' of greater size
Summary: UefiCpuPkg MpLib.c: 'type cast' : conversion from 'int' to 'SEV_ES_AP_JMP_FAR...
Status: RESOLVED FIXED
Alias: None
Product: EDK2
Classification: Unclassified
Component: Code (show other bugs)
Version: Current
Hardware: All All
: Lowest normal
Assignee: thomas.lendacky
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-05-10 09:13 UTC by Rebecca Cran
Modified: 2021-05-11 13:53 UTC (History)
3 users (show)

See Also:
EDK II Code First industry standard specifications: ---
Branch URL:
Release(s) the issue is observed: EDK II Master
The OS the target platform is running: ---
Package: UefiCpuPkg
Release(s) the issues must be fixed: EDK II Master
Tianocore documents:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Rebecca Cran 2021-05-10 09:13:46 UTC
c:\users\administrator\src\edk2\UefiCpuPkg\Library\MpInitLib\MpLib.c(1268)
: error C2220: warning treated as error - no 'object' file generated
c:\users\administrator\src\edk2\UefiCpuPkg\Library\MpInitLib\MpLib.c(1268)
: warning C4306: 'type cast' : conversion from 'int' to
'SEV_ES_AP_JMP_FAR *' of greater size

"I think the compiler is justified to complain here:

7b7508ad784d1 (Tom Lendacky     2020-08-12 15:21:42 -0500 1268)   JmpFar = (SEV_ES_AP_JMP_FAR *) FixedPcdGet32 (PcdSevEsWorkAreaBase);

The proper way to spell such casts is with (UINTN) in the middle."
Comment 2 Laszlo Ersek 2021-05-11 13:24:09 UTC
IN_PROGRESS per comment 1.
Comment 3 Laszlo Ersek 2021-05-11 13:53:09 UTC
Merged as commit 6933c78e4dc2, via <https://github.com/tianocore/edk2/pull/1634>.