9#ifndef SPI_COMMON_LIB_H_
10#define SPI_COMMON_LIB_H_
31#define WAIT_TIME 6000000
42 FlashCycleReadJedecId,
43 FlashCycleWriteStatus,
60#define SC_SPI_PRIVATE_DATA_SIGNATURE SIGNATURE_32 ('P', 'S', 'P', 'I')
67 UINT16 RegionPermission;
68 UINT32 SfdpVscc0Value;
69 UINT32 SfdpVscc1Value;
70 UINT32 StrapBaseAddress;
71 UINT8 NumberOfComponents;
73 UINT32 Component1StartAddr;
161 IN UINT8 BiosCtlValue
199 IN UINT32 PchSpiBar0,
200 IN BOOLEAN ErrorCheck
BOOLEAN WaitForSpiCycleComplete(IN UINT32 PchSpiBar0, IN BOOLEAN ErrorCheck)
UINT8 SaveAndDisableSpiPrefetchCache(IN UINTN PchSpiBase)
VOID EFIAPI EnableBiosWriteProtect(IN UINTN PchSpiBase, IN UINT8 CpuSmmBwp)
EFI_STATUS EFIAPI DisableBiosWriteProtect(IN UINTN PchSpiBase, IN UINT8 CpuSmmBwp)
VOID SetSpiBiosControlRegister(IN UINTN PchSpiBase, IN UINT8 BiosCtlValue)
EFI_STATUS SendSpiCmd(IN FLASH_REGION_TYPE FlashRegionType, IN FLASH_CYCLE_TYPE FlashCycleType, IN UINT32 Address, IN UINT32 ByteCount, IN OUT UINT8 *Buffer)
UINT32 AcquireSpiBar0(IN UINTN PchSpiBase)
VOID ReleaseSpiBar0(IN UINTN PchSpiBase)