TianoCore EDK2 master
|
#include <Protocol/SpiNorFlash.h>
Go to the source code of this file.
Data Structures | |
struct | _EFI_LEGACY_SPI_FLASH_PROTOCOL |
Macros | |
#define | EFI_LEGACY_SPI_FLASH_PROTOCOL_GUID |
Typedefs | |
typedef struct _EFI_LEGACY_SPI_FLASH_PROTOCOL | EFI_LEGACY_SPI_FLASH_PROTOCOL |
typedef EFI_STATUS(EFIAPI * | EFI_LEGACY_SPI_FLASH_PROTOCOL_BIOS_BASE_ADDRESS) (IN CONST EFI_LEGACY_SPI_FLASH_PROTOCOL *This, IN UINT32 BiosBaseAddress) |
typedef EFI_STATUS(EFIAPI * | EFI_LEGACY_SPI_FLASH_PROTOCOL_CLEAR_SPI_PROTECT) (IN CONST EFI_LEGACY_SPI_FLASH_PROTOCOL *This) |
typedef BOOLEAN(EFIAPI * | EFI_LEGACY_SPI_FLASH_PROTOCOL_IS_RANGE_PROTECTED) (IN CONST EFI_LEGACY_SPI_FLASH_PROTOCOL *This, IN UINT32 BiosAddress, IN UINT32 BlocksToProtect) |
typedef EFI_STATUS(EFIAPI * | EFI_LEGACY_SPI_FLASH_PROTOCOL_PROTECT_NEXT_RANGE) (IN CONST EFI_LEGACY_SPI_FLASH_PROTOCOL *This, IN UINT32 BiosAddress, IN UINT32 BlocksToProtect) |
typedef EFI_STATUS(EFIAPI * | EFI_LEGACY_SPI_FLASH_PROTOCOL_LOCK_CONTROLLER) (IN CONST EFI_LEGACY_SPI_FLASH_PROTOCOL *This) |
Variables | |
EFI_GUID | gEfiLegacySpiFlashProtocolGuid |
This file defines the Legacy SPI Flash Protocol.
Copyright (c) 2017, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent
Definition in file LegacySpiFlash.h.
#define EFI_LEGACY_SPI_FLASH_PROTOCOL_GUID |
Global ID for the Legacy SPI Flash Protocol
Definition at line 20 of file LegacySpiFlash.h.
typedef struct _EFI_LEGACY_SPI_FLASH_PROTOCOL EFI_LEGACY_SPI_FLASH_PROTOCOL |
Definition at line 24 of file LegacySpiFlash.h.
typedef EFI_STATUS(EFIAPI * EFI_LEGACY_SPI_FLASH_PROTOCOL_BIOS_BASE_ADDRESS) (IN CONST EFI_LEGACY_SPI_FLASH_PROTOCOL *This, IN UINT32 BiosBaseAddress) |
Set the BIOS base address.
This routine must be called at or below TPL_NOTIFY. The BIOS base address works with the protect range registers to protect portions of the SPI NOR flash from erase and write operat ions. The BIOS calls this API prior to passing control to the OS loader.
[in] | This | Pointer to an EFI_LEGACY_SPI_FLASH_PROTOCOL data structure. |
[in] | BiosBaseAddress | The BIOS base address. |
EFI_SUCCESS | The BIOS base address was properly set |
EFI_ACCESS_ERROR | The SPI controller is locked |
EFI_INVALID_PARAMETER | BiosBaseAddress > This->MaximumOffset |
EFI_UNSUPPORTED | The BIOS base address was already set or not a legacy SPI host controller |
Definition at line 46 of file LegacySpiFlash.h.
typedef EFI_STATUS(EFIAPI * EFI_LEGACY_SPI_FLASH_PROTOCOL_CLEAR_SPI_PROTECT) (IN CONST EFI_LEGACY_SPI_FLASH_PROTOCOL *This) |
Clear the SPI protect range registers.
This routine must be called at or below TPL_NOTIFY. The BIOS uses this routine to set an initial condition on the SPI protect range registers.
[in] | This | Pointer to an EFI_LEGACY_SPI_FLASH_PROTOCOL data structure. |
EFI_SUCCESS | The registers were successfully cleared |
EFI_ACCESS_ERROR | The SPI controller is locked |
EFI_UNSUPPORTED | Not a legacy SPI host controller |
Definition at line 66 of file LegacySpiFlash.h.
typedef BOOLEAN(EFIAPI * EFI_LEGACY_SPI_FLASH_PROTOCOL_IS_RANGE_PROTECTED) (IN CONST EFI_LEGACY_SPI_FLASH_PROTOCOL *This, IN UINT32 BiosAddress, IN UINT32 BlocksToProtect) |
Determine if the SPI range is protected.
This routine must be called at or below TPL_NOTIFY. The BIOS uses this routine to verify a range in the SPI is protected.
[in] | This | Pointer to an EFI_LEGACY_SPI_FLASH_PROTOCOL data structure. |
[in] | BiosAddress | Address within a 4 KiB block to start protecting. |
[in] | BlocksToProtect | The number of 4 KiB blocks to protect. |
TRUE | The range is protected |
FALSE | The range is not protected |
Definition at line 87 of file LegacySpiFlash.h.
typedef EFI_STATUS(EFIAPI * EFI_LEGACY_SPI_FLASH_PROTOCOL_LOCK_CONTROLLER) (IN CONST EFI_LEGACY_SPI_FLASH_PROTOCOL *This) |
Lock the SPI controller configuration.
This routine must be called at or below TPL_NOTIFY. This routine locks the SPI controller's configuration so that the software is no longer able to update: Prefix table Opcode menu Opcode type table BIOS base address Protect range registers
[in] | This | Pointer to an EFI_LEGACY_SPI_FLASH_PROTOCOL data structure. |
EFI_SUCCESS | The SPI controller was successfully locked |
EFI_ALREADY_STARTED | The SPI controller was already locked |
EFI_UNSUPPORTED | Not a legacy SPI host controller |
Definition at line 147 of file LegacySpiFlash.h.
typedef EFI_STATUS(EFIAPI * EFI_LEGACY_SPI_FLASH_PROTOCOL_PROTECT_NEXT_RANGE) (IN CONST EFI_LEGACY_SPI_FLASH_PROTOCOL *This, IN UINT32 BiosAddress, IN UINT32 BlocksToProtect) |
Set the next protect range register.
This routine must be called at or below TPL_NOTIFY. The BIOS sets the protect range register to prevent write and erase operations to a portion of the SPI NOR flash device.
[in] | This | Pointer to an EFI_LEGACY_SPI_FLASH_PROTOCOL data structure. |
[in] | BiosAddress | Address within a 4 KiB block to start protecting. |
[in] | BlocksToProtect | The number of 4 KiB blocks to protect. |
EFI_SUCCESS | The register was successfully updated |
EFI_ACCESS_ERROR | The SPI controller is locked |
EFI_INVALID_PARAMETER | BiosAddress < This->BiosBaseAddress, or |
EFI_INVALID_PARAMETER | BlocksToProtect * 4 KiB > This->MaximumRangeBytes, or BiosAddress - This->BiosBaseAddress
|
EFI_OUT_OF_RESOURCES | No protect range register available |
EFI_UNSUPPORTED | Call This->SetBaseAddress because the BIOS base address is not set Not a legacy SPI host controller |
Definition at line 121 of file LegacySpiFlash.h.