IntelFsp2Pkg: X64 compatible changes to support PEI in 64bit
REF:https://bugzilla.tianocore.org/show_bug.cgi?id=3893 1.Added EFIAPI to FspNotifyPhasePeimEntryPoint, SwapStack and PEI_CORE_ENTRY. 2.Treat both MAX_ADDRESS and MAX_UINT32 as invalid address for FSP global data in FspApiCallingCheck(). 3.Changed AsmReadEsp to AsmReadStackPointer. 4.Changed the type of the return value of AsmReadStackPointer from UINT32 to UINTN. 5.Changed the type of TemporaryMemoryBase, PermenentMemoryBase and BootLoaderStack from UINT32 to UINTN. 6.Some type casting to pointers are UINT32. Changed them to UINTN to accommodate both IA32 and X64. 7.Corrected some 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:
@@ -1,6 +1,6 @@
|
||||
/** @file
|
||||
|
||||
Copyright (c) 2014 - 2019, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2014 - 2022, Intel Corporation. All rights reserved.<BR>
|
||||
SPDX-License-Identifier: BSD-2-Clause-Patent
|
||||
|
||||
**/
|
||||
@@ -23,9 +23,11 @@
|
||||
#include <Library/UefiCpuLib.h>
|
||||
#include <FspEas.h>
|
||||
|
||||
typedef VOID (*PEI_CORE_ENTRY) ( \
|
||||
IN CONST EFI_SEC_PEI_HAND_OFF *SecCoreData, \
|
||||
IN CONST EFI_PEI_PPI_DESCRIPTOR *PpiList \
|
||||
typedef
|
||||
VOID
|
||||
(EFIAPI *PEI_CORE_ENTRY) (
|
||||
IN CONST EFI_SEC_PEI_HAND_OFF *SecCoreData,
|
||||
IN CONST EFI_PEI_PPI_DESCRIPTOR *PpiList
|
||||
);
|
||||
|
||||
typedef struct _SEC_IDT_TABLE {
|
||||
@@ -51,8 +53,8 @@ typedef struct _SEC_IDT_TABLE {
|
||||
VOID
|
||||
EFIAPI
|
||||
SecSwitchStack (
|
||||
IN UINT32 TemporaryMemoryBase,
|
||||
IN UINT32 PermenentMemoryBase
|
||||
IN UINTN TemporaryMemoryBase,
|
||||
IN UINTN PermenentMemoryBase
|
||||
);
|
||||
|
||||
/**
|
||||
@@ -104,7 +106,7 @@ SecStartup (
|
||||
IN UINT32 TempRamBase,
|
||||
IN VOID *BootFirmwareVolume,
|
||||
IN PEI_CORE_ENTRY PeiCore,
|
||||
IN UINT32 BootLoaderStack,
|
||||
IN UINTN BootLoaderStack,
|
||||
IN UINT32 ApiIdx
|
||||
);
|
||||
|
||||
@@ -127,9 +129,9 @@ ProcessLibraryConstructorList (
|
||||
@return value of esp.
|
||||
|
||||
**/
|
||||
UINT32
|
||||
UINTN
|
||||
EFIAPI
|
||||
AsmReadEsp (
|
||||
AsmReadStackPointer (
|
||||
VOID
|
||||
);
|
||||
|
||||
|
Reference in New Issue
Block a user