diff options
Diffstat (limited to 'Silicon/AMD')
-rw-r--r-- | Silicon/AMD/Styx/Library/StyxPlatformFlashAccessLib/StyxPlatformFlashAccessLib.c | 12 | ||||
-rw-r--r-- | Silicon/AMD/Styx/Library/StyxPlatformFlashAccessLib/StyxPlatformFlashAccessLib.inf | 3 |
2 files changed, 5 insertions, 10 deletions
diff --git a/Silicon/AMD/Styx/Library/StyxPlatformFlashAccessLib/StyxPlatformFlashAccessLib.c b/Silicon/AMD/Styx/Library/StyxPlatformFlashAccessLib/StyxPlatformFlashAccessLib.c index a23500dd35..a94373bb4b 100644 --- a/Silicon/AMD/Styx/Library/StyxPlatformFlashAccessLib/StyxPlatformFlashAccessLib.c +++ b/Silicon/AMD/Styx/Library/StyxPlatformFlashAccessLib/StyxPlatformFlashAccessLib.c @@ -22,9 +22,7 @@ #include <Protocol/AmdIscpDxeProtocol.h>
-STATIC CONST UINT64 mFlashOffset = FixedPcdGet64 (PcdFvBaseAddress) -
- FixedPcdGet64 (PcdFdBaseAddress);
-STATIC CONST UINT64 mFlashMaxSize = FixedPcdGet64 (PcdFvSize);
+STATIC CONST UINT64 mFlashMaxSize = FixedPcdGet64 (PcdFdSize);
STATIC CONST UINTN mBlockSize = SIZE_64KB;
@@ -77,12 +75,10 @@ PerformFlashWrite ( return EFI_INVALID_PARAMETER;
}
- if (FlashAddress < mFlashOffset ||
- (FlashAddress + Length) > (mFlashOffset + mFlashMaxSize)) {
+ if ((FlashAddress + Length) > mFlashMaxSize) {
DEBUG ((DEBUG_ERROR,
- "%a: updated region [0x%lx, 0x%lx) outside of FV region [0x%lx, 0x%lx)\n",
- __FUNCTION__, FlashAddress, FlashAddress + Length, mFlashOffset,
- mFlashOffset + mFlashMaxSize));
+ "%a: updated region [0x%lx, 0x%lx) outside of FV region [0x0, 0x%lx)\n",
+ __FUNCTION__, FlashAddress, FlashAddress + Length, mFlashMaxSize));
return EFI_INVALID_PARAMETER;
}
diff --git a/Silicon/AMD/Styx/Library/StyxPlatformFlashAccessLib/StyxPlatformFlashAccessLib.inf b/Silicon/AMD/Styx/Library/StyxPlatformFlashAccessLib/StyxPlatformFlashAccessLib.inf index 411173f1f3..b54a2e90ff 100644 --- a/Silicon/AMD/Styx/Library/StyxPlatformFlashAccessLib/StyxPlatformFlashAccessLib.inf +++ b/Silicon/AMD/Styx/Library/StyxPlatformFlashAccessLib/StyxPlatformFlashAccessLib.inf @@ -40,8 +40,7 @@ [FixedPcd]
gArmTokenSpaceGuid.PcdFdBaseAddress
- gArmTokenSpaceGuid.PcdFvBaseAddress
- gArmTokenSpaceGuid.PcdFvSize
+ gArmTokenSpaceGuid.PcdFdSize
[Depex]
gAmdIscpDxeProtocolGuid
|