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 address
is present in rsi while reading ImageAttirbute. Reading and
retrieving the FspInfoheader to correct this.

Signed-off-by: Aravind P R <[email protected]>
  • Loading branch information
praravin committed Jan 27, 2025
1 parent 7c5ec51 commit 37e78bd
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
8 changes: 8 additions & 0 deletions IntelFsp2Pkg/FspSecCore/Ia32/FspApiEntryT.nasm
Original file line number Diff line number Diff line change
Expand Up @@ -602,6 +602,14 @@ 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_RDI ASM_PFX(AsmGetFspInfoHeaderNoStack)
xor rsi, rsi
mov rsi, rax
LOAD_RCX

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

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

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

0 comments on commit 37e78bd

Please sign in to comment.