X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;ds=sidebyside;f=IntelFsp2Pkg%2FFspSecCore%2FIa32%2FFspHelper.nasm;h=43eac973a25f6bce83d8dc8ecd0da3b0a72b352b;hb=8265373e60ad79acd4a20affe2c49470c68d6a9c;hp=00e953b4f100e5e7553f5a531606700342a3bc7e;hpb=d54e2d6c1e68f2edfa06a6a331e808f109df779f;p=mirror_edk2.git diff --git a/IntelFsp2Pkg/FspSecCore/Ia32/FspHelper.nasm b/IntelFsp2Pkg/FspSecCore/Ia32/FspHelper.nasm index 00e953b4f1..43eac973a2 100644 --- a/IntelFsp2Pkg/FspSecCore/Ia32/FspHelper.nasm +++ b/IntelFsp2Pkg/FspSecCore/Ia32/FspHelper.nasm @@ -14,22 +14,21 @@ SECTION .text global ASM_PFX(FspInfoHeaderRelativeOff) -ASM_PFX(FspInfoHeaderRelativeOff): - ; - ; This value will be pached by the build script - ; - DD 0x12345678 global ASM_PFX(AsmGetFspBaseAddress) ASM_PFX(AsmGetFspBaseAddress): - mov eax, ASM_PFX(AsmGetFspInfoHeader) - sub eax, dword [ASM_PFX(FspInfoHeaderRelativeOff)] + call ASM_PFX(AsmGetFspInfoHeader) add eax, 0x1C mov eax, dword [eax] ret global ASM_PFX(AsmGetFspInfoHeader) ASM_PFX(AsmGetFspInfoHeader): - mov eax, ASM_PFX(AsmGetFspInfoHeader) - sub eax, dword [ASM_PFX(FspInfoHeaderRelativeOff)] + call ASM_PFX(NextInstruction) +ASM_PFX(NextInstruction): + pop eax + sub eax, ASM_PFX(NextInstruction) + add eax, ASM_PFX(AsmGetFspInfoHeader) + DB 02Dh ; opcode of sub eax, imm32 +ASM_PFX(FspInfoHeaderRelativeOff): DD 0x12345678 ; sub eax, FspInfoHeaderRelativeOff ret