IntelFsp2Pkg: FspSecCore support for X64
REF:https://bugzilla.tianocore.org/show_bug.cgi?id=3893 1.Added FspSecCore support for X64. 2.Bumped FSP header revision to 7 to indicate FSP 64bit is supported. 3.Corrected few typos. Cc: Chasel Chiu <chasel.chiu@intel.com> Cc: Nate DeSimone <nathaniel.l.desimone@intel.com> Cc: Star Zeng <star.zeng@intel.com> Cc: Ashraf Ali S <ashraf.ali.s@intel.com> Signed-off-by: Ted Kuo <ted.kuo@intel.com> Reviewed-by: Chasel Chiu <chasel.chiu@intel.com> Reviewed-by: Nate DeSimone <nathaniel.l.desimone@intel.com>
This commit is contained in:
34
IntelFsp2Pkg/FspSecCore/X64/FspHelper.nasm
Normal file
34
IntelFsp2Pkg/FspSecCore/X64/FspHelper.nasm
Normal file
@@ -0,0 +1,34 @@
|
||||
;; @file
|
||||
; Provide FSP helper function.
|
||||
;
|
||||
; Copyright (c) 2022, Intel Corporation. All rights reserved.<BR>
|
||||
; SPDX-License-Identifier: BSD-2-Clause-Patent
|
||||
;;
|
||||
DEFAULT REL
|
||||
SECTION .text
|
||||
|
||||
global ASM_PFX(AsmGetFspBaseAddress)
|
||||
ASM_PFX(AsmGetFspBaseAddress):
|
||||
call ASM_PFX(AsmGetFspInfoHeader)
|
||||
add rax, 0x1C
|
||||
mov eax, [rax]
|
||||
ret
|
||||
|
||||
global ASM_PFX(AsmGetFspInfoHeader)
|
||||
ASM_PFX(AsmGetFspInfoHeader):
|
||||
lea rax, [ASM_PFX(AsmGetFspInfoHeader)]
|
||||
DB 0x48, 0x2d ; sub rax, 0x????????
|
||||
global ASM_PFX(FspInfoHeaderRelativeOff)
|
||||
ASM_PFX(FspInfoHeaderRelativeOff):
|
||||
DD 0x12345678 ; This value must be patched by the build script
|
||||
and rax, 0xffffffff
|
||||
ret
|
||||
|
||||
global ASM_PFX(AsmGetFspInfoHeaderNoStack)
|
||||
ASM_PFX(AsmGetFspInfoHeaderNoStack):
|
||||
lea rax, [ASM_PFX(AsmGetFspInfoHeader)]
|
||||
lea rcx, [ASM_PFX(FspInfoHeaderRelativeOff)]
|
||||
mov ecx, [rcx]
|
||||
sub rax, rcx
|
||||
and rax, 0xffffffff
|
||||
jmp rdi
|
Reference in New Issue
Block a user