diff mbox

[Linaro-uefi,3/5] Platforms/AMD/StyxSpiFvDxe: use PCD for base of flash address

Message ID 1463157431-22988-3-git-send-email-ard.biesheuvel@linaro.org
State New
Headers show

Commit Message

Ard Biesheuvel May 13, 2016, 4:37 p.m. UTC
Now that STYX_EFI.fd covers the entire SPI flash, we can use its base
address in the SPI flash driver to calculate the LBA offset of writes
into the in-memory shadow region.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
---
 Platforms/AMD/Styx/Drivers/StyxSpiFvDxe/StyxSpiFvDxe.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
diff mbox

Patch

diff --git a/Platforms/AMD/Styx/Drivers/StyxSpiFvDxe/StyxSpiFvDxe.c b/Platforms/AMD/Styx/Drivers/StyxSpiFvDxe/StyxSpiFvDxe.c
index e27d9afd6c22..7ccfd7f75b19 100644
--- a/Platforms/AMD/Styx/Drivers/StyxSpiFvDxe/StyxSpiFvDxe.c
+++ b/Platforms/AMD/Styx/Drivers/StyxSpiFvDxe/StyxSpiFvDxe.c
@@ -25,9 +25,7 @@ 
 #include <Protocol/AmdIscpDxeProtocol.h>
 #include <Protocol/FirmwareVolumeBlock.h>
 
-// TODO: replace with FixedPcdGet64 (PcdFdBaseAddress) once we have updated
-// the .FDF to let STYX_EFI.fd cover the entire SPI flash
-#define SPI_BASE                0x8000C80000UL
+#define SPI_BASE                (FixedPcdGet64 (PcdFdBaseAddress))
 #define BLOCK_SIZE              (FixedPcdGet32 (PcdFlashNvStorageBlockSize))
 
 STATIC AMD_ISCP_DXE_PROTOCOL    *mIscpDxeProtocol;