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

Go to the source code of this file.

Functions

EFI_STATUS CreateSpiNorFlashSfdpInstance (IN EFI_HANDLE SpiIoHandle)
 
VOID EFIAPI SpiIoProtocolInstalledCallback (IN EFI_EVENT Event, OUT VOID *Context)
 
EFI_STATUS RegisterSpioProtocolNotification (VOID)
 
EFI_STATUS EFIAPI SpiNorFlashJedecSfdpDxeEntry (IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable)
 

Detailed Description

SPI NOR Flash JEDEC Serial Flash Discoverable Parameters (SFDP) DXE 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 SpiNorFlashJedecSfdpDxe.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 39 of file SpiNorFlashJedecSfdpDxe.c.

◆ RegisterSpioProtocolNotification()

EFI_STATUS RegisterSpioProtocolNotification ( VOID  )

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

Return values
EFI_SUCCESSSucceed.
otherwiseFail to register SPI I/O protocol installed notification.

Definition at line 134 of file SpiNorFlashJedecSfdpDxe.c.

◆ SpiIoProtocolInstalledCallback()

VOID EFIAPI SpiIoProtocolInstalledCallback ( IN EFI_EVENT  Event,
OUT VOID *  Context 
)

Callback function executed when the EFI_SPI_IO_PROTOCOL protocol interface is installed.

Parameters
[in]EventEvent whose notification function is being invoked.
[out]ContextPointer to SPI I/O protocol GUID.

Definition at line 97 of file SpiNorFlashJedecSfdpDxe.c.

◆ SpiNorFlashJedecSfdpDxeEntry()

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

Entry point of the Macronix SPI NOR Flash 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 183 of file SpiNorFlashJedecSfdpDxe.c.