summaryrefslogtreecommitdiff
path: root/MdeModulePkg/Library/DisplayUpdateProgressLibGraphics/DisplayUpdateProgressLibGraphics.c
diff options
context:
space:
mode:
authorAaron Young <Aaron.Young@oracle.com>2025-05-15 19:54:00 +0300
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2025-06-11 18:20:17 +0300
commitb0bc23d1f246dac977b639470a51bcef1bcd6e1d (patch)
tree6d4d96400f8929c0912d480f83dccba833ff1f9d /MdeModulePkg/Library/DisplayUpdateProgressLibGraphics/DisplayUpdateProgressLibGraphics.c
parent5a00ea00e94c3bd6397bc43ee56e67cea789928b (diff)
downloadedk2-b0bc23d1f246dac977b639470a51bcef1bcd6e1d.tar.xz
UefiCpuPkg/MpInitLib: Fix split-lock violation from MP_CPU_EXCHANGE_INFO
A split-lock violation in OVMF was discovered due to the NumApsExecuting field of the MP_CPU_EXCHANGE_INFO struct (which is used atomically by the AP Reset Vector assembly code) crossing a cacheline boundary. Since the MP_CPU_EXCHANGE_INFO struct is unaligned and the NumApsExecuting field resides after other non-UINTN aligned fields in the struct (i.e. GdtrProfile/IdtrProfile), the NumApsExecuting field was allocated at a non-UINTN aligned address (crossing a cache-line) resulting in the split-lock violation. Therefore, align the MP_CPU_EXCHANGE_INFO struct (on a UINTN boundary) and move the NumApsExecuting field to before the GdtrProfile/IdtrProfile fields to ensure it is UINTN aligned and thus resides within a single cacheline avoiding the split-lock. Do the same for the ApIndex field as it is also used atomically and thus subject to a split-lock violation. Cc: Ray Ni <ray.ni@intel.com> Cc: Jiaxin Wu <jiaxin.wu@intel.com> Cc: Zhiguang Liu <zhiguang.liu@intel.com> Cc: Dun Tan <dun.tan@intel.com> Cc: Rahul Kumar <rahul1.kumar@intel.com> Cc: Gerd Hoffmann <kraxel@redhat.com> Cc: Star Zeng <star.zeng@intel.com> Signed-off-by: Aaron Young <aaron.young@oracle.com>
Diffstat (limited to 'MdeModulePkg/Library/DisplayUpdateProgressLibGraphics/DisplayUpdateProgressLibGraphics.c')
0 files changed, 0 insertions, 0 deletions