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

Michael Kubacki posted 46 patches 4 years, 6 months ago
Only 6 patches received!
There is a newer version of this series
[edk2-devel] [edk2-platforms][PATCH v5 43/46] KabylakeOpenBoardPkg/PeiSerialPortLibSpiFlash: Update for new SPI PPI API
Posted by Michael Kubacki 4 years, 6 months ago
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/PeiSerialPortLibSpiFlash.c   | 4 ++--
 Platform/Intel/KabylakeOpenBoardPkg/Library/PeiSerialPortLibSpiFlash/PeiSerialPortLibSpiFlash.inf | 1 +
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/Platform/Intel/KabylakeOpenBoardPkg/Library/PeiSerialPortLibSpiFlash/PeiSerialPortLibSpiFlash.c b/Platform/Intel/KabylakeOpenBoardPkg/Library/PeiSerialPortLibSpiFlash/PeiSerialPortLibSpiFlash.c
index fc48bdc6fccb..fe8883a8af29 100644
--- a/Platform/Intel/KabylakeOpenBoardPkg/Library/PeiSerialPortLibSpiFlash/PeiSerialPortLibSpiFlash.c
+++ b/Platform/Intel/KabylakeOpenBoardPkg/Library/PeiSerialPortLibSpiFlash/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/PeiSerialPortLibSpiFlash.inf b/Platform/Intel/KabylakeOpenBoardPkg/Library/PeiSerialPortLibSpiFlash/PeiSerialPortLibSpiFlash.inf
index b959cd1f4612..b8ae214f0920 100644
--- a/Platform/Intel/KabylakeOpenBoardPkg/Library/PeiSerialPortLibSpiFlash/PeiSerialPortLibSpiFlash.inf
+++ b/Platform/Intel/KabylakeOpenBoardPkg/Library/PeiSerialPortLibSpiFlash/PeiSerialPortLibSpiFlash.inf
@@ -43,6 +43,7 @@ [Ppis]
   gPchSpiPpiGuid
 
 [Guids]
+  gFlashRegionBiosGuid
   gSpiFlashDebugHobGuid
 
 [Pcd]
-- 
2.28.0.windows.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#78607): https://edk2.groups.io/g/devel/message/78607
Mute This Topic: https://groups.io/mt/84640511/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-


Re: [edk2-devel] [edk2-platforms][PATCH v5 43/46] KabylakeOpenBoardPkg/PeiSerialPortLibSpiFlash: Update for new SPI PPI API
Posted by Chiu, Chasel 4 years, 6 months ago
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



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#78777): https://edk2.groups.io/g/devel/message/78777
Mute This Topic: https://groups.io/mt/84640511/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-


Re: [edk2-devel] [edk2-platforms][PATCH v5 43/46] KabylakeOpenBoardPkg/PeiSerialPortLibSpiFlash: Update for new SPI PPI API
Posted by Chiu, Chasel 4 years, 6 months ago
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



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#78778): https://edk2.groups.io/g/devel/message/78778
Mute This Topic: https://groups.io/mt/84640511/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-