IntelFsp2Pkg: Fsp T new ARCH UPD Support

Changes to support spec changes

1. Remove usage of Pcd.
2. Change code to validate the Temporary Ram size input.
3. Consume the input saved in YMM Register

Cc: Sai Chaganty <rangasai.v.chaganty@intel.com>
Cc: Nate DeSimone <nathaniel.l.desimone@intel.com>
Cc: Chiu Chasel <chasel.chiu@intel.com>
Cc: Duggapu Chinni B <chinni.b.duggapu@intel.com>
Cc: Ni Ray <ray.ni@intel.com>

Signed-off-by: Duggapu Chinni B <chinni.b.duggapu@intel.com>
Reviewed-by: Chiu Chasel <chasel.chiu@intel.com>
Reviewed-by: Nate DeSimone <nathaniel.l.desimone@intel.com>
This commit is contained in:
Duggapu Chinni B
2024-04-05 09:30:48 +05:30
committed by mergify[bot]
parent 932db9df0c
commit 543add1d41
14 changed files with 212 additions and 28 deletions

View File

@@ -139,7 +139,7 @@ typedef struct {
///
typedef struct {
///
/// Revision of the structure is 2 for this version of the specification.
/// Revision of the structure is 3 for this version of the specification.
///
UINT8 Revision;
UINT8 Reserved[3];
@@ -152,7 +152,15 @@ typedef struct {
/// occurring during FSP execution.
///
EFI_PHYSICAL_ADDRESS FspDebugHandler;
UINT8 Reserved1[16];
///
/// FspTemporaryRamSize is Optional & valid only when
/// FSP image attribute (BIT4) is set. If Programmed as Zero, Platform
/// recommended value will be used, otherwise input value will be used
/// to configure TemporaryRamSize. Refer FSP Integration guide for valid
/// TemporaryRamSize range for each platform.
///
UINT32 FspTemporaryRamSize;
UINT8 Reserved1[12];
} FSPT_ARCH2_UPD;
///

View File

@@ -121,4 +121,17 @@ FspTempRamExitDone2 (
IN EFI_STATUS Status
);
/**
Calculate TemporaryRam Size using Base address.
@param[in] TemporaryRamBase the address of target memory
@param[out] TemporaryRamSize the size of target memory
**/
VOID
EFIAPI
ReadTemporaryRamSize (
IN UINT32 TemporaryRamBase,
OUT UINT32 *TemporaryRamSize
);
#endif

View File

@@ -201,6 +201,27 @@
movq rcx, xmm5
%endmacro
;
; Save TemporaryRamSize to YMM10[192:255]
; arg 1:general purpose register which holds TemporaryRamSize
; Modified: XMM5 and YMM10[192:255]
;
%macro SAVE_TEMPORARY_RAM_SIZE 1
LYMMN ymm10, xmm5, 1
SXMMN xmm5, 1, %1
SYMMN ymm10, 1, xmm5
%endmacro
;
; Restore TemporaryRamSize from YMM10[192:255]
; arg 1:general purpose register where to save TemporaryRamSize
; Modified: XMM5 and %1
;
%macro LOAD_TEMPORARY_RAM_SIZE 1
LYMMN ymm10, xmm5, 1
LXMMN xmm5, %1, 1
%endmacro
;
; YMM7[128:191] for calling stack
; arg 1:Entry