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 Feb 4, 2025
1 parent fe5c2df commit b1884b1
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
6 changes: 6 additions & 0 deletions IntelFsp2Pkg/FspSecCore/Ia32/FspApiEntryT.nasm
Original file line number Diff line number Diff line change
Expand Up @@ -602,6 +602,12 @@ ASM_PFX(TempRamInitApi):
CALL_EBP ASM_PFX(LoadUpdPointerToECX) ; ECX for UPD param
SAVE_ECX ; save UPD param to slot 3 in xmm6

;
; Get FspInfoHeader address
;
CALL_EDI ASM_PFX(AsmGetFspInfoHeaderNoStack)
mov esi, eax

mov edx, ASM_PFX(PcdGet32 (PcdTemporaryRamSize))
mov edx, DWORD [edx]
;
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 b1884b1

Please sign in to comment.