Skip to content

Commit

Permalink
IntelFsp2Pkg: Correct Assumption of FspInfoheader
Browse files Browse the repository at this point in the history
It is assumed that the address of FspInfoheader is
present in rsi while reading ImageAttribute. Reading
and retrieving the FspInfoheader address to correct
this.

Signed-off-by: Aravind P R <[email protected]>
  • Loading branch information
praravin committed Jan 29, 2025
1 parent 7c5ec51 commit 438cc3a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions IntelFsp2Pkg/FspSecCore/Ia32/FspApiEntryT.nasm
Original file line number Diff line number Diff line change
Expand Up @@ -600,6 +600,7 @@ ASM_PFX(TempRamInitApi):
SAVE_EDX

CALL_EBP ASM_PFX(LoadUpdPointerToECX) ; ECX for UPD param
mov esi, eax ; save FspInfoHeader to esi
SAVE_ECX ; save UPD param to slot 3 in xmm6

mov edx, ASM_PFX(PcdGet32 (PcdTemporaryRamSize))
Expand Down
7 changes: 7 additions & 0 deletions IntelFsp2Pkg/FspSecCore/X64/FspApiEntryT.nasm
Original file line number Diff line number Diff line change
Expand Up @@ -464,6 +464,13 @@ ASM_PFX(TempRamInitApi):
ParamValid:
SAVE_RCX

;
; Get FspInfoHeader address
;
CALL_RDI ASM_PFX(AsmGetFspInfoHeaderNoStack)
mov rsi, rax
LOAD_RCX

mov rdx, ASM_PFX(PcdGet32 (PcdTemporaryRamSize))
mov edx, DWORD [rdx]
;
Expand Down

0 comments on commit 438cc3a

Please sign in to comment.