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 --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;