IntelFsp2Pkg: Add FSPx_ARCH2_UPD support for X64
REF:https://bugzilla.tianocore.org/show_bug.cgi?id=3893 1.Added FSPx_ARCH2_UPD structures which support both IA32 and X64. 2.Added FSPx_UPD_COMMON_FSP24 structures. 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:
@@ -1,7 +1,7 @@
|
||||
;; @file
|
||||
; Provide FSP API entry points.
|
||||
;
|
||||
; Copyright (c) 2016 - 2019, Intel Corporation. All rights reserved.<BR>
|
||||
; Copyright (c) 2016 - 2022, Intel Corporation. All rights reserved.<BR>
|
||||
; SPDX-License-Identifier: BSD-2-Clause-Patent
|
||||
;;
|
||||
|
||||
@@ -32,6 +32,24 @@ struc FSPM_UPD_COMMON
|
||||
.size:
|
||||
endstruc
|
||||
|
||||
struc FSPM_UPD_COMMON_FSP24
|
||||
; FSP_UPD_HEADER {
|
||||
.FspUpdHeader: resd 8
|
||||
; }
|
||||
; FSPM_ARCH2_UPD {
|
||||
.Revision: resb 1
|
||||
.Reserved: resb 3
|
||||
.Length resd 1
|
||||
.StackBase: resq 1
|
||||
.StackSize: resq 1
|
||||
.BootLoaderTolumSize: resd 1
|
||||
.BootMode: resd 1
|
||||
.FspEventHandler resq 1
|
||||
.Reserved1: resb 24
|
||||
; }
|
||||
.size:
|
||||
endstruc
|
||||
|
||||
;
|
||||
; Following functions will be provided in C
|
||||
;
|
||||
@@ -124,12 +142,22 @@ ASM_PFX(FspApiCommonContinue):
|
||||
pop eax
|
||||
|
||||
FspStackSetup:
|
||||
mov ecx, [edx + FSPM_UPD_COMMON.Revision]
|
||||
cmp ecx, 3
|
||||
jae FspmUpdCommon2
|
||||
|
||||
;
|
||||
; StackBase = temp memory base, StackSize = temp memory size
|
||||
;
|
||||
mov edi, [edx + FSPM_UPD_COMMON.StackBase]
|
||||
mov ecx, [edx + FSPM_UPD_COMMON.StackSize]
|
||||
jmp ChkFspHeapSize
|
||||
|
||||
FspmUpdCommon2:
|
||||
mov edi, [edx + FSPM_UPD_COMMON_FSP24.StackBase]
|
||||
mov ecx, [edx + FSPM_UPD_COMMON_FSP24.StackSize]
|
||||
|
||||
ChkFspHeapSize:
|
||||
;
|
||||
; Keep using bootloader stack if heap size % is 0
|
||||
;
|
||||
@@ -219,7 +247,7 @@ exit:
|
||||
global ASM_PFX(FspPeiCoreEntryOff)
|
||||
ASM_PFX(FspPeiCoreEntryOff):
|
||||
;
|
||||
; This value will be pached by the build script
|
||||
; This value will be patched by the build script
|
||||
;
|
||||
DD 0x12345678
|
||||
|
||||
|
Reference in New Issue
Block a user