[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


Chiu, Chasel
 

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

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

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

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@...>
Cc: Nate DeSimone <nathaniel.l.desimone@...>
Signed-off-by: Michael Kubacki <michael.kubacki@...>
---

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


Chiu, Chasel
 

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

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

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

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@...>
Cc: Nate DeSimone <nathaniel.l.desimone@...>
Signed-off-by: Michael Kubacki <michael.kubacki@...>
---

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


Chiu, Chasel
 

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

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

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

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@...>
Cc: Nate DeSimone <nathaniel.l.desimone@...>
Signed-off-by: Michael Kubacki <michael.kubacki@...>
---

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