summaryrefslogtreecommitdiffstats
path: root/UefiCpuPkg/CpuDxe/CpuMp.c
diff options
context:
space:
mode:
authorLiu, Zhiguang <Zhiguang.Liu@intel.com>2022-08-26 15:04:46 +0800
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2022-08-31 04:23:55 +0000
commitd1abb876f4846a22bfc72e10c1aea2b5c847f90c (patch)
tree4401ccfc176d9a25f7a60510a9a23582e53d3d65 /UefiCpuPkg/CpuDxe/CpuMp.c
parent76ec17526b7ebd0893f8e2e27ee4e4baf017eeef (diff)
downloadedk2-d1abb876f4846a22bfc72e10c1aea2b5c847f90c.tar.gz
edk2-d1abb876f4846a22bfc72e10c1aea2b5c847f90c.tar.bz2
edk2-d1abb876f4846a22bfc72e10c1aea2b5c847f90c.zip
UefiCpuPkg/MpInitLib: Simplify logic in SwitchBsp
When switch bsp, old bsp and new bsp put CR0/CR4 into stack, and put IDT and GDT register into a structure. After they exchange their stack, they restore these registers. This logic is now implemented by assembly code. This patch aims to reuse (Save/Restore)VolatileRegisters function to replace such assembly code for better code readability. Cc: Eric Dong <eric.dong@intel.com> Reviewed-by: Ray Ni <ray.ni@intel.com> Cc: Rahul Kumar <rahul1.kumar@intel.com> Signed-off-by: Zhiguang Liu <zhiguang.liu@intel.com>
Diffstat (limited to 'UefiCpuPkg/CpuDxe/CpuMp.c')
0 files changed, 0 insertions, 0 deletions