edk2/IntelFsp2Pkg/Library/BaseFspSwitchStackLib/X64
Ray Ni 11868992cc IntelFsp2Pkg: Save/restore FSBASE/GSBASE in entry and exit
FSP may store something in FSBASE/GSBASE while bootloader may do so as well.
Add the FSBASE/GSBASE save/restore logic in the FSP entry and exit
to avoid the contents in FSBASE/GSBASE are corrupted by the other party.

The change assumes there is no very old CPU that does not support
rdfsbase/wrfsbase/rdgsbase/wrgsbase instructions.

Signed-off-by: Ray Ni <ray.ni@intel.com>
2026-03-09 16:21:26 +00:00
..
Stack.nasm IntelFsp2Pkg: Save/restore FSBASE/GSBASE in entry and exit 2026-03-09 16:21:26 +00:00