IntelFsp2Pkg: Support 64bit FspResetType for X64 build.

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3999
FspResetType will be either 32bit or 64 bit basing on
the build type.

Cc: Nate DeSimone <nathaniel.l.desimone@intel.com>
Cc: Star Zeng <star.zeng@intel.com>
Signed-off-by: Chasel Chiu <chasel.chiu@intel.com>
Reviewed-by: Nate DeSimone <nathaniel.l.desimone@intel.com>
This commit is contained in:
Chasel Chiu
2022-07-18 20:28:17 -07:00
committed by mergify[bot]
parent 671b0cea51
commit 140446cd59
4 changed files with 41 additions and 36 deletions

View File

@@ -200,13 +200,13 @@ SetFspCoreStackPointer (
UINT32 StackContextLen;
FspData = GetFspGlobalDataPointer ();
StackContextLen = sizeof(CONTEXT_STACK) / sizeof(UINTN);
StackContextLen = sizeof (CONTEXT_STACK) / sizeof (UINTN);
//
// Reserve space for the ContinuationFunc two parameters
//
OldStack = (UINTN *)FspData->CoreStack;
NewStack = (UINTN *)NewStackTop - StackContextLen - 2;
OldStack = (UINTN *)FspData->CoreStack;
NewStack = (UINTN *)NewStackTop - StackContextLen - 2;
FspData->CoreStack = (UINTN)NewStack;
while (StackContextLen-- != 0) {
*NewStack++ = *OldStack++;
@@ -533,7 +533,7 @@ SetPhaseStatusCode (
VOID
EFIAPI
FspApiReturnStatusReset (
IN UINT32 FspResetType
IN EFI_STATUS FspResetType
)
{
volatile BOOLEAN LoopUntilReset;
@@ -546,7 +546,7 @@ FspApiReturnStatusReset (
/// calls the FSP API without honoring the reset request by FSP
///
do {
SetFspApiReturnStatus ((EFI_STATUS)FspResetType);
SetFspApiReturnStatus (FspResetType);
Pei2LoaderSwitchStack ();
DEBUG ((DEBUG_ERROR, "!!!ERROR: FSP has requested BootLoader for reset. But BootLoader has not honored the reset\n"));
DEBUG ((DEBUG_ERROR, "!!!ERROR: Please add support in BootLoader to honor the reset request from FSP\n"));