diff options
author | Chasel Chiu <chasel.chiu@intel.com> | 2022-07-18 21:08:31 -0700 |
---|---|---|
committer | mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> | 2022-07-19 22:24:31 +0000 |
commit | 24eac4caf31afae48349af44588a52783c1819b8 (patch) | |
tree | 7fb5df8425fe503e48714bfeb1eba2758401a2e9 /IntelFsp2WrapperPkg/Library | |
parent | 140446cd595cad870a0e8cef7a367bae8f09effa (diff) | |
download | edk2-24eac4caf31afae48349af44588a52783c1819b8.tar.gz edk2-24eac4caf31afae48349af44588a52783c1819b8.tar.bz2 edk2-24eac4caf31afae48349af44588a52783c1819b8.zip |
IntelFsp2WrapperPkg: 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>
Diffstat (limited to 'IntelFsp2WrapperPkg/Library')
-rw-r--r-- | IntelFsp2WrapperPkg/Library/BaseFspWrapperApiLib/X64/DispatchExecute.c | 5 | ||||
-rw-r--r-- | IntelFsp2WrapperPkg/Library/BaseFspWrapperPlatformLibSample/FspWrapperPlatformLibSample.c | 2 |
2 files changed, 5 insertions, 2 deletions
diff --git a/IntelFsp2WrapperPkg/Library/BaseFspWrapperApiLib/X64/DispatchExecute.c b/IntelFsp2WrapperPkg/Library/BaseFspWrapperApiLib/X64/DispatchExecute.c index 591a5c7a55..22e009ace3 100644 --- a/IntelFsp2WrapperPkg/Library/BaseFspWrapperApiLib/X64/DispatchExecute.c +++ b/IntelFsp2WrapperPkg/Library/BaseFspWrapperApiLib/X64/DispatchExecute.c @@ -121,6 +121,10 @@ Execute32BitCode ( //
AsmReadIdtr (&Idtr);
Status = AsmExecute32BitCode (Function, Param1, Param2, &mGdt);
+ //
+ // Convert FSP Status code from 32bit to 64bit to match caller expectation.
+ //
+ Status = (Status & ~(BIT31 + BIT30)) | LShiftU64 (Status & (BIT31 + BIT30), 32);
AsmWriteIdtr (&Idtr);
return Status;
@@ -150,4 +154,3 @@ Execute64BitCode ( return Status;
}
-
diff --git a/IntelFsp2WrapperPkg/Library/BaseFspWrapperPlatformLibSample/FspWrapperPlatformLibSample.c b/IntelFsp2WrapperPkg/Library/BaseFspWrapperPlatformLibSample/FspWrapperPlatformLibSample.c index fa7d60c292..00b4799fb4 100644 --- a/IntelFsp2WrapperPkg/Library/BaseFspWrapperPlatformLibSample/FspWrapperPlatformLibSample.c +++ b/IntelFsp2WrapperPkg/Library/BaseFspWrapperPlatformLibSample/FspWrapperPlatformLibSample.c @@ -86,7 +86,7 @@ GetS3MemoryInfo ( VOID
EFIAPI
CallFspWrapperResetSystem (
- IN UINT32 FspStatusResetType
+ IN EFI_STATUS FspStatusResetType
)
{
//
|