[edk2-platforms][PATCH v5 43/46] KabylakeOpenBoardPkg/PeiSerialPortLibSpiFlash: Update for new SPI PPI API


Michael Kubacki
 

From: Michael Kubacki <michael.kubacki@...>

REF:https://bugzilla.tianocore.org/show_bug.cgi?id=3D3307

Updates usage of gPchSpiPpiGuid to use the new interface that
identifies SPI flash regions by GUID.

Cc: Chasel Chiu <chasel.chiu@...>
Cc: Nate DeSimone <nathaniel.l.desimone@...>
Signed-off-by: Michael Kubacki <michael.kubacki@...>
---
Platform/Intel/KabylakeOpenBoardPkg/Library/PeiSerialPortLibSpiFlash/Pei=
SerialPortLibSpiFlash.c | 4 ++--
Platform/Intel/KabylakeOpenBoardPkg/Library/PeiSerialPortLibSpiFlash/Pei=
SerialPortLibSpiFlash.inf | 1 +
2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/Platform/Intel/KabylakeOpenBoardPkg/Library/PeiSerialPortLib=
SpiFlash/PeiSerialPortLibSpiFlash.c b/Platform/Intel/KabylakeOpenBoardPkg=
/Library/PeiSerialPortLibSpiFlash/PeiSerialPortLibSpiFlash.c
index fc48bdc6fccb..fe8883a8af29 100644
--- a/Platform/Intel/KabylakeOpenBoardPkg/Library/PeiSerialPortLibSpiFlas=
h/PeiSerialPortLibSpiFlash.c
+++ b/Platform/Intel/KabylakeOpenBoardPkg/Library/PeiSerialPortLibSpiFlas=
h/PeiSerialPortLibSpiFlash.c
@@ -98,7 +98,7 @@ SerialPortWrite (
LinearOffset =3D (UINT32) (FixedPcdGet32 (PcdFlashNvDebugMessageBase=
) - FixedPcdGet32 (PcdFlashAreaBaseAddress));
Status =3D PchSpiPpi->FlashErase (
PchSpiPpi,
- FlashRegionBios,
+ &gFlashRegionBiosGuid,
LinearOffset,
NvMessageAreaSize
);
@@ -118,7 +118,7 @@ SerialPortWrite (
=20
Status =3D PchSpiPpi->FlashWrite (
PchSpiPpi,
- FlashRegionBios,
+ &gFlashRegionBiosGuid,
LinearOffset,
BytesWritten,
(UINT8 *) &Buffer[SourceBufferOffset]
diff --git a/Platform/Intel/KabylakeOpenBoardPkg/Library/PeiSerialPortLib=
SpiFlash/PeiSerialPortLibSpiFlash.inf b/Platform/Intel/KabylakeOpenBoardP=
kg/Library/PeiSerialPortLibSpiFlash/PeiSerialPortLibSpiFlash.inf
index b959cd1f4612..b8ae214f0920 100644
--- a/Platform/Intel/KabylakeOpenBoardPkg/Library/PeiSerialPortLibSpiFlas=
h/PeiSerialPortLibSpiFlash.inf
+++ b/Platform/Intel/KabylakeOpenBoardPkg/Library/PeiSerialPortLibSpiFlas=
h/PeiSerialPortLibSpiFlash.inf
@@ -43,6 +43,7 @@ [Ppis]
gPchSpiPpiGuid
=20
[Guids]
+ gFlashRegionBiosGuid
gSpiFlashDebugHobGuid
=20
[Pcd]
--=20
2.28.0.windows.1

Join devel@edk2.groups.io to automatically receive all group messages.