public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Michael Kubacki" <mikuback@linux.microsoft.com>
To: devel@edk2.groups.io
Cc: Agyeman Prince <prince.agyeman@intel.com>,
	Nate DeSimone <nathaniel.l.desimone@intel.com>
Subject: [edk2-platforms][PATCH v5 37/46] SimicsIch10Pkg: Remove PCH SPI SMM Protocol from package
Date: Mon,  2 Aug 2021 22:39:05 -0400	[thread overview]
Message-ID: <20210803023914.1569-38-mikuback@linux.microsoft.com> (raw)
In-Reply-To: <20210803023914.1569-1-mikuback@linux.microsoft.com>

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

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

gEfiSmmSpiProtocolGuid is now declared in IntelSiliconPkg.dec. This
change updates Ich10Pkg to remove the protocol declaration in the
package and update libraries and modules to use the protocol from
IntelSiliconPkg.

Cc: Agyeman Prince <prince.agyeman@intel.com>
Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
Reviewed-by: Nate DeSimone <nathaniel.l.desimone@intel.com>
---
 Silicon/Intel/SimicsIch10Pkg/LibraryPrivate/BasePchSpiCommonLib/SpiCommon.c |  24 +-
 Silicon/Intel/SimicsIch10Pkg/Spi/Smm/PchSpi.c                               |   4 +-
 Silicon/Intel/SimicsIch10Pkg/Ich10Pkg.dec                                   |   5 -
 Silicon/Intel/SimicsIch10Pkg/Include/Protocol/Spi.h                         | 295 --------------------
 Silicon/Intel/SimicsIch10Pkg/IncludePrivate/Library/PchSpiCommonLib.h       |  26 +-
 Silicon/Intel/SimicsIch10Pkg/Spi/Smm/PchSpiSmm.inf                          |   3 +-
 6 files changed, 29 insertions(+), 328 deletions(-)

diff --git a/Silicon/Intel/SimicsIch10Pkg/LibraryPrivate/BasePchSpiCommonLib/SpiCommon.c b/Silicon/Intel/SimicsIch10Pkg/LibraryPrivate/BasePchSpiCommonLib/SpiCommon.c
index f2907ef53bfc..fc2a8be76b6a 100644
--- a/Silicon/Intel/SimicsIch10Pkg/LibraryPrivate/BasePchSpiCommonLib/SpiCommon.c
+++ b/Silicon/Intel/SimicsIch10Pkg/LibraryPrivate/BasePchSpiCommonLib/SpiCommon.c
@@ -158,7 +158,7 @@ PchPmTimerStallRuntimeSafe (
 EFI_STATUS
 EFIAPI
 SpiProtocolFlashRead (
-  IN     EFI_SPI_PROTOCOL   *This,
+  IN     PCH_SPI_PROTOCOL   *This,
   IN     FLASH_REGION_TYPE  FlashRegionType,
   IN     UINT32             Address,
   IN     UINT32             ByteCount,
@@ -197,7 +197,7 @@ SpiProtocolFlashRead (
 EFI_STATUS
 EFIAPI
 SpiProtocolFlashWrite (
-  IN     EFI_SPI_PROTOCOL   *This,
+  IN     PCH_SPI_PROTOCOL   *This,
   IN     FLASH_REGION_TYPE  FlashRegionType,
   IN     UINT32             Address,
   IN     UINT32             ByteCount,
@@ -235,7 +235,7 @@ SpiProtocolFlashWrite (
 EFI_STATUS
 EFIAPI
 SpiProtocolFlashErase (
-  IN     EFI_SPI_PROTOCOL   *This,
+  IN     PCH_SPI_PROTOCOL   *This,
   IN     FLASH_REGION_TYPE  FlashRegionType,
   IN     UINT32             Address,
   IN     UINT32             ByteCount
@@ -274,7 +274,7 @@ SpiProtocolFlashErase (
 EFI_STATUS
 EFIAPI
 SpiProtocolFlashReadSfdp (
-  IN     EFI_SPI_PROTOCOL   *This,
+  IN     PCH_SPI_PROTOCOL   *This,
   IN     UINT8              ComponentNumber,
   IN     UINT32             Address,
   IN     UINT32             ByteCount,
@@ -328,7 +328,7 @@ SpiProtocolFlashReadSfdp (
 EFI_STATUS
 EFIAPI
 SpiProtocolFlashReadJedecId (
-  IN     EFI_SPI_PROTOCOL   *This,
+  IN     PCH_SPI_PROTOCOL   *This,
   IN     UINT8              ComponentNumber,
   IN     UINT32             ByteCount,
   OUT    UINT8              *JedecId
@@ -379,7 +379,7 @@ SpiProtocolFlashReadJedecId (
 EFI_STATUS
 EFIAPI
 SpiProtocolFlashWriteStatus (
-  IN     EFI_SPI_PROTOCOL   *This,
+  IN     PCH_SPI_PROTOCOL   *This,
   IN     UINT32             ByteCount,
   IN     UINT8              *StatusValue
   )
@@ -414,7 +414,7 @@ SpiProtocolFlashWriteStatus (
 EFI_STATUS
 EFIAPI
 SpiProtocolFlashReadStatus (
-  IN     EFI_SPI_PROTOCOL   *This,
+  IN     PCH_SPI_PROTOCOL   *This,
   IN     UINT32             ByteCount,
   OUT    UINT8              *StatusValue
   )
@@ -450,7 +450,7 @@ SpiProtocolFlashReadStatus (
 EFI_STATUS
 EFIAPI
 SpiProtocolGetRegionAddress (
-  IN     EFI_SPI_PROTOCOL   *This,
+  IN     PCH_SPI_PROTOCOL   *This,
   IN     FLASH_REGION_TYPE  FlashRegionType,
   OUT    UINT32             *BaseAddress,
   OUT    UINT32             *RegionSize
@@ -510,7 +510,7 @@ SpiProtocolGetRegionAddress (
 EFI_STATUS
 EFIAPI
 SpiProtocolReadPchSoftStrap (
-  IN     EFI_SPI_PROTOCOL   *This,
+  IN     PCH_SPI_PROTOCOL   *This,
   IN     UINT32             SoftStrapAddr,
   IN     UINT32             ByteCount,
   OUT    VOID               *SoftStrapValue
@@ -568,7 +568,7 @@ SpiProtocolReadPchSoftStrap (
 EFI_STATUS
 EFIAPI
 SpiProtocolReadCpuSoftStrap (
-  IN     EFI_SPI_PROTOCOL   *This,
+  IN     PCH_SPI_PROTOCOL   *This,
   IN     UINT32             SoftStrapAddr,
   IN     UINT32             ByteCount,
   OUT    VOID               *SoftStrapValue
@@ -626,7 +626,7 @@ SpiProtocolReadCpuSoftStrap (
 **/
 EFI_STATUS
 SendSpiCmd (
-  IN     EFI_SPI_PROTOCOL   *This,
+  IN     PCH_SPI_PROTOCOL   *This,
   IN     FLASH_REGION_TYPE  FlashRegionType,
   IN     FLASH_CYCLE_TYPE   FlashCycleType,
   IN     UINT32             Address,
@@ -897,7 +897,7 @@ SendSpiCmd (
 **/
 BOOLEAN
 WaitForSpiCycleComplete (
-  IN     EFI_SPI_PROTOCOL   *This,
+  IN     PCH_SPI_PROTOCOL   *This,
   IN     UINTN              PchSpiBar0,
   IN     BOOLEAN            ErrorCheck
   )
diff --git a/Silicon/Intel/SimicsIch10Pkg/Spi/Smm/PchSpi.c b/Silicon/Intel/SimicsIch10Pkg/Spi/Smm/PchSpi.c
index 0baf730a4823..e4a81f91316c 100644
--- a/Silicon/Intel/SimicsIch10Pkg/Spi/Smm/PchSpi.c
+++ b/Silicon/Intel/SimicsIch10Pkg/Spi/Smm/PchSpi.c
@@ -92,11 +92,11 @@ InstallPchSpi (
     return Status;
   }
   //
-  // Install the SMM EFI_SPI_PROTOCOL interface
+  // Install the SMM PCH_SPI_PROTOCOL interface
   //
   Status = gSmst->SmmInstallProtocolInterface (
                     &(mSpiInstance->Handle),
-                    &gEfiSmmSpiProtocolGuid,
+                    &gPchSmmSpiProtocolGuid,
                     EFI_NATIVE_INTERFACE,
                     &(mSpiInstance->SpiProtocol)
                     );
diff --git a/Silicon/Intel/SimicsIch10Pkg/Ich10Pkg.dec b/Silicon/Intel/SimicsIch10Pkg/Ich10Pkg.dec
index 8d395a8b4370..58850f54e95c 100644
--- a/Silicon/Intel/SimicsIch10Pkg/Ich10Pkg.dec
+++ b/Silicon/Intel/SimicsIch10Pkg/Ich10Pkg.dec
@@ -13,8 +13,3 @@ [Defines]
 
 [Includes]
   Include
-
-[Ppis]
-
-[Protocols]
-  gEfiSmmSpiProtocolGuid = {0xbd75fe35, 0xfdce, 0x49d7, {0xa9, 0xdd, 0xb2, 0x6f, 0x1f, 0xc6, 0xb4, 0x37}}
diff --git a/Silicon/Intel/SimicsIch10Pkg/Include/Protocol/Spi.h b/Silicon/Intel/SimicsIch10Pkg/Include/Protocol/Spi.h
deleted file mode 100644
index b0c5b3d0e624..000000000000
--- a/Silicon/Intel/SimicsIch10Pkg/Include/Protocol/Spi.h
+++ /dev/null
@@ -1,295 +0,0 @@
-/** @file
-  This file defines the PCH SPI Protocol which implements the
-  Intel(R) PCH SPI Host Controller Compatibility Interface.
-
-  Copyright (c) 2019 Intel Corporation. All rights reserved. <BR>
-
-  SPDX-License-Identifier: BSD-2-Clause-Patent
-**/
-
-#ifndef _PCH_SPI_PROTOCOL_H_
-#define _PCH_SPI_PROTOCOL_H_
-
-//
-// Extern the GUID for protocol users.
-//
-extern EFI_GUID                   gEfiSpiProtocolGuid;
-extern EFI_GUID                   gEfiSmmSpiProtocolGuid;
-
-//
-// Forward reference for ANSI C compatibility
-//
-typedef struct _PCH_SPI_PROTOCOL  EFI_SPI_PROTOCOL;
-
-//
-// SPI protocol data structures and definitions
-//
-
-/**
-  Flash Region Type
-**/
-typedef enum {
-  FlashRegionDescriptor,
-  FlashRegionBios,
-  FlashRegionMe,
-  FlashRegionGbE,
-  FlashRegionPlatformData,
-  FlashRegionDer,
-  FlashRegionAll,
-  FlashRegionMax
-} FLASH_REGION_TYPE;
-
-
-//
-// Protocol member functions
-//
-
-/**
-  Read data from the flash part.
-
-  @param[in] This                 Pointer to the PCH_SPI_PROTOCOL instance.
-  @param[in] FlashRegionType      The Flash Region type for flash cycle which is listed in the Descriptor.
-  @param[in] Address              The Flash Linear Address must fall within a region for which BIOS has access permissions.
-  @param[in] ByteCount            Number of bytes in the data portion of the SPI cycle.
-  @param[out] Buffer              The Pointer to caller-allocated buffer containing the dada received.
-                                  It is the caller's responsibility to make sure Buffer is large enough for the total number of bytes read.
-
-  @retval EFI_SUCCESS             Command succeed.
-  @retval EFI_INVALID_PARAMETER   The parameters specified are not valid.
-  @retval EFI_DEVICE_ERROR        Device error, command aborts abnormally.
-**/
-typedef
-EFI_STATUS
-(EFIAPI *PCH_SPI_FLASH_READ) (
-  IN     EFI_SPI_PROTOCOL   *This,
-  IN     FLASH_REGION_TYPE  FlashRegionType,
-  IN     UINT32             Address,
-  IN     UINT32             ByteCount,
-  OUT    UINT8              *Buffer
-  );
-
-/**
-  Write data to the flash part. Remark: Erase may be needed before write to the flash part.
-
-  @param[in] This                 Pointer to the PCH_SPI_PROTOCOL instance.
-  @param[in] FlashRegionType      The Flash Region type for flash cycle which is listed in the Descriptor.
-  @param[in] Address              The Flash Linear Address must fall within a region for which BIOS has access permissions.
-  @param[in] ByteCount            Number of bytes in the data portion of the SPI cycle.
-  @param[in] Buffer               Pointer to caller-allocated buffer containing the data sent during the SPI cycle.
-
-  @retval EFI_SUCCESS             Command succeed.
-  @retval EFI_INVALID_PARAMETER   The parameters specified are not valid.
-  @retval EFI_DEVICE_ERROR        Device error, command aborts abnormally.
-**/
-typedef
-EFI_STATUS
-(EFIAPI *PCH_SPI_FLASH_WRITE) (
-  IN     EFI_SPI_PROTOCOL   *This,
-  IN     FLASH_REGION_TYPE  FlashRegionType,
-  IN     UINT32             Address,
-  IN     UINT32             ByteCount,
-  IN     UINT8              *Buffer
-  );
-
-/**
-  Erase some area on the flash part.
-
-  @param[in] This                 Pointer to the PCH_SPI_PROTOCOL instance.
-  @param[in] FlashRegionType      The Flash Region type for flash cycle which is listed in the Descriptor.
-  @param[in] Address              The Flash Linear Address must fall within a region for which BIOS has access permissions.
-  @param[in] ByteCount            Number of bytes in the data portion of the SPI cycle.
-
-  @retval EFI_SUCCESS             Command succeed.
-  @retval EFI_INVALID_PARAMETER   The parameters specified are not valid.
-  @retval EFI_DEVICE_ERROR        Device error, command aborts abnormally.
-**/
-typedef
-EFI_STATUS
-(EFIAPI *PCH_SPI_FLASH_ERASE) (
-  IN     EFI_SPI_PROTOCOL   *This,
-  IN     FLASH_REGION_TYPE  FlashRegionType,
-  IN     UINT32             Address,
-  IN     UINT32             ByteCount
-  );
-
-/**
-  Read SFDP data from the flash part.
-
-  @param[in] This                 Pointer to the PCH_SPI_PROTOCOL instance.
-  @param[in] ComponentNumber      The Componen Number for chip select
-  @param[in] Address              The starting byte address for SFDP data read.
-  @param[in] ByteCount            Number of bytes in SFDP data portion of the SPI cycle
-  @param[out] SfdpData            The Pointer to caller-allocated buffer containing the SFDP data received
-                                  It is the caller's responsibility to make sure Buffer is large enough for the total number of bytes read
-
-  @retval EFI_SUCCESS             Command succeed.
-  @retval EFI_INVALID_PARAMETER   The parameters specified are not valid.
-  @retval EFI_DEVICE_ERROR        Device error, command aborts abnormally.
-**/
-typedef
-EFI_STATUS
-(EFIAPI *PCH_SPI_FLASH_READ_SFDP) (
-  IN     EFI_SPI_PROTOCOL   *This,
-  IN     UINT8              ComponentNumber,
-  IN     UINT32             Address,
-  IN     UINT32             ByteCount,
-  OUT    UINT8              *SfdpData
-  );
-
-/**
-  Read Jedec Id from the flash part.
-
-  @param[in] This                 Pointer to the PCH_SPI_PROTOCOL instance.
-  @param[in] ComponentNumber      The Componen Number for chip select
-  @param[in] ByteCount            Number of bytes in JedecId data portion of the SPI cycle, the data size is 3 typically
-  @param[out] JedecId             The Pointer to caller-allocated buffer containing JEDEC ID received
-                                  It is the caller's responsibility to make sure Buffer is large enough for the total number of bytes read.
-
-  @retval EFI_SUCCESS             Command succeed.
-  @retval EFI_INVALID_PARAMETER   The parameters specified are not valid.
-  @retval EFI_DEVICE_ERROR        Device error, command aborts abnormally.
-**/
-typedef
-EFI_STATUS
-(EFIAPI *PCH_SPI_FLASH_READ_JEDEC_ID) (
-  IN     EFI_SPI_PROTOCOL   *This,
-  IN     UINT8              ComponentNumber,
-  IN     UINT32             ByteCount,
-  OUT    UINT8              *JedecId
-  );
-
-/**
-  Write the status register in the flash part.
-
-  @param[in] This                 Pointer to the PCH_SPI_PROTOCOL instance.
-  @param[in] ByteCount            Number of bytes in Status data portion of the SPI cycle, the data size is 1 typically
-  @param[in] StatusValue          The Pointer to caller-allocated buffer containing the value of Status register writing
-
-  @retval EFI_SUCCESS             Command succeed.
-  @retval EFI_INVALID_PARAMETER   The parameters specified are not valid.
-  @retval EFI_DEVICE_ERROR        Device error, command aborts abnormally.
-**/
-typedef
-EFI_STATUS
-(EFIAPI *PCH_SPI_FLASH_WRITE_STATUS) (
-  IN     EFI_SPI_PROTOCOL   *This,
-  IN     UINT32             ByteCount,
-  IN     UINT8              *StatusValue
-  );
-
-/**
-  Read status register in the flash part.
-
-  @param[in] This                 Pointer to the PCH_SPI_PROTOCOL instance.
-  @param[in] ByteCount            Number of bytes in Status data portion of the SPI cycle, the data size is 1 typically
-  @param[out] StatusValue         The Pointer to caller-allocated buffer containing the value of Status register received.
-
-  @retval EFI_SUCCESS             Command succeed.
-  @retval EFI_INVALID_PARAMETER   The parameters specified are not valid.
-  @retval EFI_DEVICE_ERROR        Device error, command aborts abnormally.
-**/
-typedef
-EFI_STATUS
-(EFIAPI *PCH_SPI_FLASH_READ_STATUS) (
-  IN     EFI_SPI_PROTOCOL   *This,
-  IN     UINT32             ByteCount,
-  OUT    UINT8              *StatusValue
-  );
-
-/**
-  Get the SPI region base and size, based on the enum type
-
-  @param[in] This                 Pointer to the PCH_SPI_PROTOCOL instance.
-  @param[in] FlashRegionType      The Flash Region type for for the base address which is listed in the Descriptor.
-  @param[out] BaseAddress         The Flash Linear Address for the Region 'n' Base
-  @param[out] RegionSize          The size for the Region 'n'
-
-  @retval EFI_SUCCESS             Read success
-  @retval EFI_INVALID_PARAMETER   Invalid region type given
-  @retval EFI_DEVICE_ERROR        The region is not used
-**/
-typedef
-EFI_STATUS
-(EFIAPI *PCH_SPI_GET_REGION_ADDRESS) (
-  IN     EFI_SPI_PROTOCOL   *This,
-  IN     FLASH_REGION_TYPE  FlashRegionType,
-  OUT    UINT32             *BaseAddress,
-  OUT    UINT32             *RegionSize
-  );
-
-/**
-  Read PCH Soft Strap Values
-
-  @param[in] This                 Pointer to the PCH_SPI_PROTOCOL instance.
-  @param[in] SoftStrapAddr        PCH Soft Strap address offset from FPSBA.
-  @param[in] ByteCount            Number of bytes in SoftStrap data portion of the SPI cycle
-  @param[out] SoftStrapValue      The Pointer to caller-allocated buffer containing PCH Soft Strap Value.
-                                  If the value of ByteCount is 0, the data type of SoftStrapValue should be UINT16 and SoftStrapValue will be PCH Soft Strap Length
-                                  It is the caller's responsibility to make sure Buffer is large enough for the total number of bytes read.
-
-  @retval EFI_SUCCESS             Command succeed.
-  @retval EFI_INVALID_PARAMETER   The parameters specified are not valid.
-  @retval EFI_DEVICE_ERROR        Device error, command aborts abnormally.
-**/
-typedef
-EFI_STATUS
-(EFIAPI *PCH_SPI_READ_PCH_SOFTSTRAP) (
-  IN     EFI_SPI_PROTOCOL   *This,
-  IN     UINT32             SoftStrapAddr,
-  IN     UINT32             ByteCount,
-  OUT    VOID               *SoftStrapValue
-  );
-
-/**
-  Read CPU Soft Strap Values
-
-  @param[in] This                 Pointer to the PCH_SPI_PROTOCOL instance.
-  @param[in] SoftStrapAddr        CPU Soft Strap address offset from FCPUSBA.
-  @param[in] ByteCount            Number of bytes in SoftStrap data portion of the SPI cycle.
-  @param[out] SoftStrapValue      The Pointer to caller-allocated buffer containing CPU Soft Strap Value.
-                                  If the value of ByteCount is 0, the data type of SoftStrapValue should be UINT16 and SoftStrapValue will be PCH Soft Strap Length
-                                  It is the caller's responsibility to make sure Buffer is large enough for the total number of bytes read.
-
-  @retval EFI_SUCCESS             Command succeed.
-  @retval EFI_INVALID_PARAMETER   The parameters specified are not valid.
-  @retval EFI_DEVICE_ERROR        Device error, command aborts abnormally.
-**/
-typedef
-EFI_STATUS
-(EFIAPI *PCH_SPI_READ_CPU_SOFTSTRAP) (
-  IN     EFI_SPI_PROTOCOL   *This,
-  IN     UINT32             SoftStrapAddr,
-  IN     UINT32             ByteCount,
-  OUT    VOID               *SoftStrapValue
-  );
-
-/**
-  These protocols/PPI allows a platform module to perform SPI operations through the
-  Intel PCH SPI Host Controller Interface.
-**/
-struct _PCH_SPI_PROTOCOL {
-  /**
-    This member specifies the revision of this structure. This field is used to
-    indicate backwards compatible changes to the protocol.
-  **/
-  UINT8                             Revision;
-  PCH_SPI_FLASH_READ                FlashRead;          ///< Read data from the flash part.
-  PCH_SPI_FLASH_WRITE               FlashWrite;         ///< Write data to the flash part. Remark: Erase may be needed before write to the flash part.
-  PCH_SPI_FLASH_ERASE               FlashErase;         ///< Erase some area on the flash part.
-  PCH_SPI_FLASH_READ_SFDP           FlashReadSfdp;      ///< Read SFDP data from the flash part.
-  PCH_SPI_FLASH_READ_JEDEC_ID       FlashReadJedecId;   ///< Read Jedec Id from the flash part.
-  PCH_SPI_FLASH_WRITE_STATUS        FlashWriteStatus;   ///< Write the status register in the flash part.
-  PCH_SPI_FLASH_READ_STATUS         FlashReadStatus;    ///< Read status register in the flash part.
-  PCH_SPI_GET_REGION_ADDRESS        GetRegionAddress;   ///< Get the SPI region base and size
-  PCH_SPI_READ_PCH_SOFTSTRAP        ReadPchSoftStrap;   ///< Read PCH Soft Strap Values
-  PCH_SPI_READ_CPU_SOFTSTRAP        ReadCpuSoftStrap;   ///< Read CPU Soft Strap Values
-};
-
-/**
-  PCH SPI PPI/PROTOCOL revision number
-
-  Revision 1:   Initial version
-**/
-#define PCH_SPI_SERVICES_REVISION       1
-
-#endif
diff --git a/Silicon/Intel/SimicsIch10Pkg/IncludePrivate/Library/PchSpiCommonLib.h b/Silicon/Intel/SimicsIch10Pkg/IncludePrivate/Library/PchSpiCommonLib.h
index cf60f1fd5881..2c8162ac8170 100644
--- a/Silicon/Intel/SimicsIch10Pkg/IncludePrivate/Library/PchSpiCommonLib.h
+++ b/Silicon/Intel/SimicsIch10Pkg/IncludePrivate/Library/PchSpiCommonLib.h
@@ -48,7 +48,7 @@ typedef enum {
 typedef struct {
   UINT32                Signature;
   EFI_HANDLE            Handle;
-  EFI_SPI_PROTOCOL      SpiProtocol;
+  PCH_SPI_PROTOCOL      SpiProtocol;
   UINT16                PchAcpiBase;
   UINTN                 PchSpiBase;
   UINT16                ReadPermission;
@@ -148,7 +148,7 @@ ReleaseSpiBar0 (
 EFI_STATUS
 EFIAPI
 SpiProtocolFlashRead (
-  IN     EFI_SPI_PROTOCOL   *This,
+  IN     PCH_SPI_PROTOCOL   *This,
   IN     FLASH_REGION_TYPE  FlashRegionType,
   IN     UINT32             Address,
   IN     UINT32             ByteCount,
@@ -171,7 +171,7 @@ SpiProtocolFlashRead (
 EFI_STATUS
 EFIAPI
 SpiProtocolFlashWrite (
-  IN     EFI_SPI_PROTOCOL   *This,
+  IN     PCH_SPI_PROTOCOL   *This,
   IN     FLASH_REGION_TYPE  FlashRegionType,
   IN     UINT32             Address,
   IN     UINT32             ByteCount,
@@ -193,7 +193,7 @@ SpiProtocolFlashWrite (
 EFI_STATUS
 EFIAPI
 SpiProtocolFlashErase (
-  IN     EFI_SPI_PROTOCOL   *This,
+  IN     PCH_SPI_PROTOCOL   *This,
   IN     FLASH_REGION_TYPE  FlashRegionType,
   IN     UINT32             Address,
   IN     UINT32             ByteCount
@@ -216,7 +216,7 @@ SpiProtocolFlashErase (
 EFI_STATUS
 EFIAPI
 SpiProtocolFlashReadSfdp (
-  IN     EFI_SPI_PROTOCOL   *This,
+  IN     PCH_SPI_PROTOCOL   *This,
   IN     UINT8              ComponentNumber,
   IN     UINT32             Address,
   IN     UINT32             ByteCount,
@@ -239,7 +239,7 @@ SpiProtocolFlashReadSfdp (
 EFI_STATUS
 EFIAPI
 SpiProtocolFlashReadJedecId (
-  IN     EFI_SPI_PROTOCOL   *This,
+  IN     PCH_SPI_PROTOCOL   *This,
   IN     UINT8              ComponentNumber,
   IN     UINT32             ByteCount,
   OUT    UINT8              *JedecId
@@ -259,7 +259,7 @@ SpiProtocolFlashReadJedecId (
 EFI_STATUS
 EFIAPI
 SpiProtocolFlashWriteStatus (
-  IN     EFI_SPI_PROTOCOL   *This,
+  IN     PCH_SPI_PROTOCOL   *This,
   IN     UINT32             ByteCount,
   IN     UINT8              *StatusValue
   );
@@ -278,7 +278,7 @@ SpiProtocolFlashWriteStatus (
 EFI_STATUS
 EFIAPI
 SpiProtocolFlashReadStatus (
-  IN     EFI_SPI_PROTOCOL   *This,
+  IN     PCH_SPI_PROTOCOL   *This,
   IN     UINT32             ByteCount,
   OUT    UINT8              *StatusValue
   );
@@ -298,7 +298,7 @@ SpiProtocolFlashReadStatus (
 EFI_STATUS
 EFIAPI
 SpiProtocolGetRegionAddress (
-  IN     EFI_SPI_PROTOCOL   *This,
+  IN     PCH_SPI_PROTOCOL   *This,
   IN     FLASH_REGION_TYPE  FlashRegionType,
   OUT    UINT32             *BaseAddress,
   OUT    UINT32             *RegionSize
@@ -321,7 +321,7 @@ SpiProtocolGetRegionAddress (
 EFI_STATUS
 EFIAPI
 SpiProtocolReadPchSoftStrap (
-  IN     EFI_SPI_PROTOCOL   *This,
+  IN     PCH_SPI_PROTOCOL   *This,
   IN     UINT32             SoftStrapAddr,
   IN     UINT32             ByteCount,
   OUT    VOID               *SoftStrapValue
@@ -344,7 +344,7 @@ SpiProtocolReadPchSoftStrap (
 EFI_STATUS
 EFIAPI
 SpiProtocolReadCpuSoftStrap (
-  IN     EFI_SPI_PROTOCOL   *This,
+  IN     PCH_SPI_PROTOCOL   *This,
   IN     UINT32             SoftStrapAddr,
   IN     UINT32             ByteCount,
   OUT    VOID               *SoftStrapValue
@@ -367,7 +367,7 @@ SpiProtocolReadCpuSoftStrap (
 **/
 EFI_STATUS
 SendSpiCmd (
-  IN     EFI_SPI_PROTOCOL   *This,
+  IN     PCH_SPI_PROTOCOL   *This,
   IN     FLASH_REGION_TYPE  FlashRegionType,
   IN     FLASH_CYCLE_TYPE   FlashCycleType,
   IN     UINT32             Address,
@@ -388,7 +388,7 @@ SendSpiCmd (
 **/
 BOOLEAN
 WaitForSpiCycleComplete (
-  IN     EFI_SPI_PROTOCOL   *This,
+  IN     PCH_SPI_PROTOCOL   *This,
   IN     UINTN              PchSpiBar0,
   IN     BOOLEAN            ErrorCheck
   );
diff --git a/Silicon/Intel/SimicsIch10Pkg/Spi/Smm/PchSpiSmm.inf b/Silicon/Intel/SimicsIch10Pkg/Spi/Smm/PchSpiSmm.inf
index 7b60d36c5b9c..35655ed5b5aa 100644
--- a/Silicon/Intel/SimicsIch10Pkg/Spi/Smm/PchSpiSmm.inf
+++ b/Silicon/Intel/SimicsIch10Pkg/Spi/Smm/PchSpiSmm.inf
@@ -28,6 +28,7 @@ [Defines]
 
 [Packages]
   MdePkg/MdePkg.dec
+  IntelSiliconPkg/IntelSiliconPkg.dec
   SimicsIch10Pkg/Ich10Pkg.dec
 
 [Sources]
@@ -36,7 +37,7 @@ [Sources]
 
 
 [Protocols]
-  gEfiSmmSpiProtocolGuid      # PRODUCES   #SERVER_BIOS
+  gPchSmmSpiProtocolGuid      # PRODUCES
 
 
 [Depex]
-- 
2.28.0.windows.1


  parent reply	other threads:[~2021-08-03  3:18 UTC|newest]

Thread overview: 49+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20210803023914.1569-1-mikuback@linux.microsoft.com>
2021-08-03  2:38 ` [edk2-platforms][PATCH v5 01/46] CometlakeOpenBoardPkg: Remove redundant IntelSiliconPkg.dec entry Michael Kubacki
2021-08-03  2:38 ` [edk2-platforms][PATCH v5 02/46] WhiskeylakeOpenBoardPkg: " Michael Kubacki
2021-08-03  2:38 ` [edk2-platforms][PATCH v5 03/46] CometlakeOpenBoardPkg/PeiPolicyUpdateLib: Add missing GUID to INF Michael Kubacki
2021-08-03  2:38 ` [edk2-platforms][PATCH v5 04/46] IntelSiliconPkg: Add BIOS area base address and size PCDs Michael Kubacki
2021-08-03  2:38 ` [edk2-platforms][PATCH v5 05/46] IntelSiliconPkg: Add microcode FV PCDs Michael Kubacki
2021-08-03  2:38 ` [edk2-platforms][PATCH v5 06/46] IntelSiliconPkg: Add PCH SPI PPI Michael Kubacki
2021-08-03  2:38 ` [edk2-platforms][PATCH v5 07/46] IntelSiliconPkg: Add PCH SPI Protocol Michael Kubacki
2021-08-03  2:38 ` [edk2-platforms][PATCH v5 08/46] IntelSiliconPkg: Add SpiFlashCommonLib Michael Kubacki
2021-08-03  2:38 ` [edk2-platforms][PATCH v5 09/46] IntelSiliconPkg: Add SmmSpiFlashCommonLib Michael Kubacki
2021-08-03  2:38 ` [edk2-platforms][PATCH v5 12/46] KabylakeOpenBoardPkg: Use IntelSiliconPkg BIOS area and ucode PCDs Michael Kubacki
2021-08-03  2:38 ` [edk2-platforms][PATCH v5 13/46] SimicsOpenBoardPkg: " Michael Kubacki
2021-08-03  2:38 ` [edk2-platforms][PATCH v5 14/46] TigerlakeOpenBoardPkg: " Michael Kubacki
2021-08-23  3:15   ` Heng Luo
2021-08-03  2:38 ` [edk2-platforms][PATCH v5 16/46] CoffeelakeSiliconPkg: " Michael Kubacki
2021-08-03  2:38 ` [edk2-platforms][PATCH v5 17/46] KabylakeSiliconPkg: " Michael Kubacki
2021-08-03  2:38 ` [edk2-platforms][PATCH v5 18/46] SimicsIch10Pkg: " Michael Kubacki
2021-08-03  2:38 ` [edk2-platforms][PATCH v5 19/46] TigerlakeSiliconPkg: " Michael Kubacki
2021-08-03  2:38 ` [edk2-platforms][PATCH v5 20/46] CometlakeOpenBoardPkg: Update SpiFvbService & SpiFlashCommonLib Michael Kubacki
2021-08-03  2:38 ` [edk2-platforms][PATCH v5 21/46] KabylakeOpenBoardPkg: " Michael Kubacki
2021-08-03  7:38   ` Chiu, Chasel
2021-08-03 15:09     ` [edk2-devel] " Michael Kubacki
2021-08-03  2:38 ` [edk2-platforms][PATCH v5 22/46] SimicsOpenBoardPkg: " Michael Kubacki
2021-08-03  2:38 ` [edk2-platforms][PATCH v5 24/46] WhiskeylakeOpenBoardPkg: " Michael Kubacki
2021-08-03  2:38 ` [edk2-platforms][PATCH v5 25/46] PurleyOpenBoardPkg: Use IntelSiliconPkg SpiFvbServiceSmm Michael Kubacki
2021-08-03  2:38 ` [edk2-platforms][PATCH v5 26/46] WhitleyOpenBoardPkg: UseIntelSiliconPkg SpiFvbServiceSmm Michael Kubacki
2021-08-03  2:38 ` [edk2-platforms][PATCH v5 27/46] MinPlatformPkg: Remove SpiFvbService modules Michael Kubacki
2021-08-03  2:38 ` [edk2-platforms][PATCH v5 28/46] CoffeelakeSiliconPkg: Remove SmmSpiFlashCommonLib Michael Kubacki
2021-08-03  2:38 ` [edk2-platforms][PATCH v5 29/46] KabylakeSiliconPkg: " Michael Kubacki
2021-08-03  2:38 ` [edk2-platforms][PATCH v5 30/46] SimicsIch10Pkg: " Michael Kubacki
2021-08-03  2:38 ` [edk2-platforms][PATCH v5 31/46] TigerlakeOpenBoardPkg: " Michael Kubacki
2021-08-23  2:56   ` Chaganty, Rangasai V
2021-08-03  2:39 ` [edk2-platforms][PATCH v5 33/46] PurleyOpenBoardPkg: Add SpiFlashCommonLib.h Michael Kubacki
2021-08-03  2:39 ` [edk2-platforms][PATCH v5 34/46] KabylakeOpenBoardPkg/PeiSerialPortLibSpiFlash: Add IntelSiliconPkg.dec Michael Kubacki
2021-08-03  2:39 ` [edk2-platforms][PATCH v5 35/46] CoffeelakeSiliconPkg: Remove PCH SPI PPI and Protocol from package Michael Kubacki
2021-08-03  2:39 ` [edk2-platforms][PATCH v5 36/46] KabylakeSiliconPkg: " Michael Kubacki
2021-08-03  2:39 ` Michael Kubacki [this message]
2021-08-03  2:39 ` [edk2-platforms][PATCH v5 38/46] TigerlakeSiliconPkg: " Michael Kubacki
2021-08-03  2:39 ` [edk2-platforms][PATCH v5 39/46] IntelSiliconPkg: Add flash region GUIDs Michael Kubacki
2021-08-03  2:39 ` [edk2-platforms][PATCH v5 40/46] IntelSiliconPkg: Identify flash regions by GUID Michael Kubacki
2021-08-03  2:39 ` [edk2-platforms][PATCH v5 41/46] CoffeelakeSiliconPkg/BasePchSpiCommonLib: " Michael Kubacki
2021-08-03  2:39 ` [edk2-platforms][PATCH v5 42/46] KabylakeSiliconPkg: " Michael Kubacki
2021-08-03  2:39 ` [edk2-platforms][PATCH v5 44/46] KabylakeOpenBoardPkg/KabylakeRvp3: Add PeiSerialPortlibSpiFlash to build Michael Kubacki
2021-08-06  2:44   ` Chiu, Chasel
2021-08-03  2:39 ` [edk2-platforms][PATCH v5 45/46] SimicsIch10Pkg/BasePchSpiCommonLib: Identify flash regions by GUID Michael Kubacki
2021-08-03  2:39 ` [edk2-platforms][PATCH v5 46/46] TigerlakeSiliconPkg/BasePchSpiCommonLib: " Michael Kubacki
     [not found] ` <20210803023914.1569-44-mikuback@linux.microsoft.com>
2021-08-06  2:44   ` [edk2-platforms][PATCH v5 43/46] KabylakeOpenBoardPkg/PeiSerialPortLibSpiFlash: Update for new SPI PPI API Chiu, Chasel
     [not found] ` <20210803023914.1569-24-mikuback@linux.microsoft.com>
2021-08-23  2:57   ` [edk2-platforms][PATCH v5 23/46] TigerlakeOpenBoardPkg: Update SpiFvbService & SpiFlashCommonLib Chaganty, Rangasai V
2021-10-22  0:21 ` [edk2-platforms][PATCH v5 00/46] Consolidate SpiFlashCommonLib instances Nate DeSimone
2021-10-28 22:13   ` Michael Kubacki

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210803023914.1569-38-mikuback@linux.microsoft.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox