TianoCore EDK2 master
Loading...
Searching...
No Matches
SpiNorFlashJedecSfdpSmm.c File Reference

Go to the source code of this file.

Functions

EFI_STATUS CreateSpiNorFlashSfdpInstance (IN EFI_HANDLE SpiIoHandle)
 
EFI_STATUS EFIAPI SpiIoProtocolInstalledCallback (IN CONST EFI_GUID *Protocol, IN VOID *Interface, IN EFI_HANDLE Handle)
 
EFI_STATUS RegisterSpioProtocolNotification (VOID)
 
EFI_STATUS EFIAPI SpiNorFlashJedecSfdpSmmEntry (IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable)
 

Detailed Description

SPI NOR Flash JEDEC Serial Flash Discoverable Parameters (SFDP) SMM driver.

Copyright (C) 2024 Advanced Micro Devices, Inc. All rights reserved.

SPDX-License-Identifier: BSD-2-Clause-Patent

Revision Reference:
Glossary:
  • SFDP - Serial Flash Discoverable Parameters
  • PTP - Parameter Table Pointer

Definition in file SpiNorFlashJedecSfdpSmm.c.

Function Documentation

◆ CreateSpiNorFlashSfdpInstance()

EFI_STATUS CreateSpiNorFlashSfdpInstance ( IN EFI_HANDLE  SpiIoHandle)

Function to create SPI_NOR_FLASH_INSTANCE for this SPI part.

Parameters
[in]SpiIoHandleThe handle with SPI I/O protocol installed.
Return values
EFI_SUCCESSSucceed.
EFI_OUT_OF_RESOURCESNot enough resource to create SPI_NOR_FLASH_INSTANCE.
otherwiseFail to create SPI NOR Flash SFDP Instance

Definition at line 38 of file SpiNorFlashJedecSfdpSmm.c.

◆ RegisterSpioProtocolNotification()

EFI_STATUS RegisterSpioProtocolNotification ( VOID  )

Register notification for the later installed SPI I/O protocol.

Return values
EFI_SUCCESSSucceed.
otherwiseFail to register the notification of SPI I/O protocol installation.

Definition at line 121 of file SpiNorFlashJedecSfdpSmm.c.

◆ SpiIoProtocolInstalledCallback()

EFI_STATUS EFIAPI SpiIoProtocolInstalledCallback ( IN CONST EFI_GUID Protocol,
IN VOID *  Interface,
IN EFI_HANDLE  Handle 
)

Callback function executed when the EFI_SPI_IO_PROTOCOL protocol interface is installed.

Parameters
[in]ProtocolPoints to the protocol's unique identifier.
[in]InterfacePoints to the interface instance.
[in]HandleThe handle on which the interface was installed.
Returns
Status Code

Definition at line 99 of file SpiNorFlashJedecSfdpSmm.c.

◆ SpiNorFlashJedecSfdpSmmEntry()

EFI_STATUS EFIAPI SpiNorFlashJedecSfdpSmmEntry ( IN EFI_HANDLE  ImageHandle,
IN EFI_SYSTEM_TABLE SystemTable 
)

Entry point of the SPI NOR Flash SFDP SMM driver.

Parameters
ImageHandleImage handle of this driver.
SystemTablePointer to standard EFI system table.
Return values
EFI_SUCCESSSucceed.
EFI_NOT_FOUNDNo gEdk2JedecSfdpSpiSmmDriverGuid installed on system yet.
EFI_OUT_OF_RESOURCESNot enough resource for SPI NOR Flash JEDEC SFDP initialization.
OtherwiseOther errors.

Definition at line 157 of file SpiNorFlashJedecSfdpSmm.c.