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


Chiu, Chasel
 

Reviewed-by: Chasel Chiu <chasel.chiu@intel.com>
Tested-by: Benjamin Doron <benjamin.doron00@gmail.com>

-----Original Message-----
From: mikuback@linux.microsoft.com <mikuback@linux.microsoft.com>
Sent: Tuesday, August 3, 2021 11:01 PM
To: devel@edk2.groups.io
Cc: Chiu, Chasel <chasel.chiu@intel.com>; Desimone, Nathaniel L
<nathaniel.l.desimone@intel.com>
Subject: [edk2-platforms][PATCH v5 43/46]
KabylakeOpenBoardPkg/PeiSerialPortLibSpiFlash: Update for new SPI PPI API

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

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

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

Cc: Chasel Chiu <chasel.chiu@intel.com>
Cc: Nate DeSimone <nathaniel.l.desimone@intel.com>
Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
---

Platform/Intel/KabylakeOpenBoardPkg/Library/PeiSerialPortLibSpiFlash/PeiS
erialPortLibSpiFlash.c | 4 ++--

Platform/Intel/KabylakeOpenBoardPkg/Library/PeiSerialPortLibSpiFlash/PeiS
erialPortLibSpiFlash.inf | 1 +
2 files changed, 3 insertions(+), 2 deletions(-)

diff --git
a/Platform/Intel/KabylakeOpenBoardPkg/Library/PeiSerialPortLibSpiFlash/P
eiSerialPortLibSpiFlash.c
b/Platform/Intel/KabylakeOpenBoardPkg/Library/PeiSerialPortLibSpiFlash/P
eiSerialPortLibSpiFlash.c
index fc48bdc6fccb..fe8883a8af29 100644
---
a/Platform/Intel/KabylakeOpenBoardPkg/Library/PeiSerialPortLibSpiFlash/P
eiSerialPortLibSpiFlash.c
+++ b/Platform/Intel/KabylakeOpenBoardPkg/Library/PeiSerialPortLibSpiFla
+++ sh/PeiSerialPortLibSpiFlash.c
@@ -98,7 +98,7 @@ SerialPortWrite (
LinearOffset = (UINT32) (FixedPcdGet32 (PcdFlashNvDebugMessageBase)
- FixedPcdGet32 (PcdFlashAreaBaseAddress));
Status = PchSpiPpi->FlashErase (
PchSpiPpi,
- FlashRegionBios,
+ &gFlashRegionBiosGuid,
LinearOffset,
NvMessageAreaSize
);
@@ -118,7 +118,7 @@ SerialPortWrite (

Status = PchSpiPpi->FlashWrite (
PchSpiPpi,
- FlashRegionBios,
+ &gFlashRegionBiosGuid,
LinearOffset,
BytesWritten,
(UINT8 *) &Buffer[SourceBufferOffset] diff --git
a/Platform/Intel/KabylakeOpenBoardPkg/Library/PeiSerialPortLibSpiFlash/P
eiSerialPortLibSpiFlash.inf
b/Platform/Intel/KabylakeOpenBoardPkg/Library/PeiSerialPortLibSpiFlash/P
eiSerialPortLibSpiFlash.inf
index b959cd1f4612..b8ae214f0920 100644
---
a/Platform/Intel/KabylakeOpenBoardPkg/Library/PeiSerialPortLibSpiFlash/P
eiSerialPortLibSpiFlash.inf
+++ b/Platform/Intel/KabylakeOpenBoardPkg/Library/PeiSerialPortLibSpiFla
+++ sh/PeiSerialPortLibSpiFlash.inf
@@ -43,6 +43,7 @@ [Ppis]
gPchSpiPpiGuid

[Guids]
+ gFlashRegionBiosGuid
gSpiFlashDebugHobGuid

[Pcd]
--
2.28.0.windows.1

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