diff options
-rw-r--r-- | IntelFsp2Pkg/FspSecCore/SecFspApiChk.c | 12 | ||||
-rw-r--r-- | IntelFsp2Pkg/Library/BaseFspCommonLib/FspCommonLib.c | 6 |
2 files changed, 9 insertions, 9 deletions
diff --git a/IntelFsp2Pkg/FspSecCore/SecFspApiChk.c b/IntelFsp2Pkg/FspSecCore/SecFspApiChk.c index 5f59938518..644c374bd6 100644 --- a/IntelFsp2Pkg/FspSecCore/SecFspApiChk.c +++ b/IntelFsp2Pkg/FspSecCore/SecFspApiChk.c @@ -31,7 +31,7 @@ FspApiCallingCheck ( //
// NotifyPhase check
//
- if ((FspData == NULL) || ((UINTN)FspData == MAX_ADDRESS) || ((UINTN)FspData == MAX_UINT32)) {
+ if ((FspData == NULL) || ((UINT32)(UINTN)FspData == MAX_UINT32)) {
Status = EFI_UNSUPPORTED;
} else {
if (FspData->Signature != FSP_GLOBAL_DATA_SIGNATURE) {
@@ -42,7 +42,7 @@ FspApiCallingCheck ( //
// FspMemoryInit check
//
- if (((UINTN)FspData != MAX_ADDRESS) && ((UINTN)FspData != MAX_UINT32)) {
+ if ((UINT32)(UINTN)FspData != MAX_UINT32) {
Status = EFI_UNSUPPORTED;
} else if (ApiParam == NULL) {
Status = EFI_SUCCESS;
@@ -53,7 +53,7 @@ FspApiCallingCheck ( //
// TempRamExit check
//
- if ((FspData == NULL) || ((UINTN)FspData == MAX_ADDRESS) || ((UINTN)FspData == MAX_UINT32)) {
+ if ((FspData == NULL) || ((UINT32)(UINTN)FspData == MAX_UINT32)) {
Status = EFI_UNSUPPORTED;
} else {
if (FspData->Signature != FSP_GLOBAL_DATA_SIGNATURE) {
@@ -64,7 +64,7 @@ FspApiCallingCheck ( //
// FspSiliconInit check
//
- if ((FspData == NULL) || ((UINTN)FspData == MAX_ADDRESS) || ((UINTN)FspData == MAX_UINT32)) {
+ if ((FspData == NULL) || ((UINT32)(UINTN)FspData == MAX_UINT32)) {
Status = EFI_UNSUPPORTED;
} else {
if (FspData->Signature != FSP_GLOBAL_DATA_SIGNATURE) {
@@ -83,14 +83,14 @@ FspApiCallingCheck ( }
}
} else if (ApiIdx == FspMultiPhaseMemInitApiIndex) {
- if ((FspData == NULL) || ((UINTN)FspData == MAX_ADDRESS) || ((UINTN)FspData == MAX_UINT32)) {
+ if ((FspData == NULL) || ((UINT32)(UINTN)FspData == MAX_UINT32)) {
Status = EFI_UNSUPPORTED;
}
} else if (ApiIdx == FspSmmInitApiIndex) {
//
// FspSmmInitApiIndex check
//
- if ((FspData == NULL) || ((UINTN)FspData == MAX_ADDRESS) || ((UINTN)FspData == MAX_UINT32)) {
+ if ((FspData == NULL) || ((UINT32)(UINTN)FspData == MAX_UINT32)) {
Status = EFI_UNSUPPORTED;
} else {
if (FspData->Signature != FSP_GLOBAL_DATA_SIGNATURE) {
diff --git a/IntelFsp2Pkg/Library/BaseFspCommonLib/FspCommonLib.c b/IntelFsp2Pkg/Library/BaseFspCommonLib/FspCommonLib.c index d33d01fe22..54dbf546c3 100644 --- a/IntelFsp2Pkg/Library/BaseFspCommonLib/FspCommonLib.c +++ b/IntelFsp2Pkg/Library/BaseFspCommonLib/FspCommonLib.c @@ -89,10 +89,10 @@ GetFspGlobalDataPointer ( VOID
)
{
- FSP_GLOBAL_DATA *FspData;
+ UINT32 FspDataAddress;
- FspData = *(FSP_GLOBAL_DATA **)(UINTN)PcdGet32 (PcdGlobalDataPointerAddress);
- return FspData;
+ FspDataAddress = *(UINT32 *)(UINTN)PcdGet32 (PcdGlobalDataPointerAddress);
+ return (FSP_GLOBAL_DATA *)(UINTN)FspDataAddress;
}
/**
|