Reporting Issues
Bug 3319 - MpInitLib/Dxe: BackupBuffer and WakeupBufferHigh have been deprecated
Summary: MpInitLib/Dxe: BackupBuffer and WakeupBufferHigh have been deprecated
Status: UNCONFIRMED
Alias: None
Product: EDK2
Classification: Unclassified
Component: Code (show other bugs)
Version: Current
Hardware: All All
: Normal normal
Assignee: Marvin Häuser
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-04-12 09:46 UTC by Marvin Häuser
Modified: 2021-04-13 21:57 UTC (History)
4 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 Marvin Häuser 2021-04-12 09:46:15 UTC
DXE MpInitLib used to "borrow" memory for the WakeupBuffer (i.e. usage without allocation). To work around all sorts of issues with this approach, BackupBuffer[1] and WakeupBufferHigh[2] have been introduced to mitigate memory corruption (conflict of memory ownership) and NX exceptions (conflict of intended memory attributes) respectively. Some time after, gladly the former "borrowing" technique was removed[3], yet said workaround exist even today[4][5].

[1] https://github.com/tianocore/edk2/commit/a6b3d753f98118ee547ae935b347f4f00fa67e7c

[2] https://github.com/tianocore/edk2/commit/66833b2a87d98be8d81d1337c193bcbf0de47d47

[3] https://github.com/tianocore/edk2/commit/e4ff6349bf9ee4f3f392141374901ea4994e043e

[4] https://github.com/tianocore/edk2/blob/2072c22a0d63c780b0cc6377f6d4ffb116ad6144/UefiCpuPkg/Library/MpInitLib/MpLib.c#L1114

[5] https://github.com/tianocore/edk2/blob/2072c22a0d63c780b0cc6377f6d4ffb116ad6144/UefiCpuPkg/Library/MpInitLib/MpLib.c#L1204-L1208
Comment 1 gaoliming 2021-04-13 21:57:20 UTC
Marvin, you can continue to provide the proposal.