TianoCore EDK2 master
|
#include <Library/BaseLib.h>
#include <Library/DebugLib.h>
#include <Library/UefiBootServicesTableLib.h>
#include <Library/VirtNorFlashPlatformLib.h>
#include <Protocol/FdtClient.h>
Go to the source code of this file.
Macros | |
#define | KVMTOOL_NOR_BLOCK_SIZE SIZE_64KB |
#define | MAX_FLASH_DEVICES 4 |
#define | LABEL_UEFI_VAR_STORE "System-firmware" |
Functions | |
EFI_STATUS | VirtNorFlashPlatformInitialization (VOID) |
STATIC EFI_STATUS | SetupVariableStore (IN VIRT_NOR_FLASH_DESCRIPTION *FlashDevice) |
EFI_STATUS | VirtNorFlashPlatformGetDevices (OUT VIRT_NOR_FLASH_DESCRIPTION **NorFlashDescriptions, OUT UINT32 *Count) |
EFI_STATUS EFIAPI | NorFlashPlatformLibConstructor (IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable) |
Variables | |
STATIC VIRT_NOR_FLASH_DESCRIPTION | mNorFlashDevices [MAX_FLASH_DEVICES] |
STATIC UINTN | mNorFlashDeviceCount = 0 |
STATIC INT32 | mUefiVarStoreNode = MAX_INT32 |
STATIC FDT_CLIENT_PROTOCOL * | mFdtClient |
An instance of the NorFlashPlatformLib for Kvmtool platform.
Copyright (c) 2020 - 2023, Arm Ltd. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent
Definition in file NorFlashKvmtool.c.
#define KVMTOOL_NOR_BLOCK_SIZE SIZE_64KB |
Macro defining the NOR block size configured in Kvmtool.
Definition at line 18 of file NorFlashKvmtool.c.
#define LABEL_UEFI_VAR_STORE "System-firmware" |
Macro defining the cfi-flash label describing the UEFI variable store.
Definition at line 26 of file NorFlashKvmtool.c.
#define MAX_FLASH_DEVICES 4 |
Macro defining the maximum number of Flash devices.
Definition at line 22 of file NorFlashKvmtool.c.
EFI_STATUS EFIAPI NorFlashPlatformLibConstructor | ( | IN EFI_HANDLE | ImageHandle, |
IN EFI_SYSTEM_TABLE * | SystemTable | ||
) |
Entrypoint for NorFlashPlatformLib.
[in] | ImageHandle | The handle to the image. |
[in] | SystemTable | Pointer to the System Table. |
EFI_SUCCESS | Success. |
EFI_INVALID_PARAMETER | A parameter is invalid. |
EFI_NOT_FOUND | Flash device not found. |
Definition at line 215 of file NorFlashKvmtool.c.
STATIC EFI_STATUS SetupVariableStore | ( | IN VIRT_NOR_FLASH_DESCRIPTION * | FlashDevice | ) |
Initialise Non volatile Flash storage variables.
[in] | FlashDevice | Pointer to the NOR Flash device. |
EFI_SUCCESS | Success. |
EFI_INVALID_PARAMETER | A parameter is invalid. |
EFI_OUT_OF_RESOURCES | Insufficient flash storage space. |
Definition at line 91 of file NorFlashKvmtool.c.
EFI_STATUS VirtNorFlashPlatformGetDevices | ( | OUT VIRT_NOR_FLASH_DESCRIPTION ** | NorFlashDescriptions, |
OUT UINT32 * | Count | ||
) |
Return the Flash devices on the platform.
[out] | NorFlashDescriptions | Pointer to the Flash device description. |
[out] | Count | Number of Flash devices. |
EFI_SUCCESS | Success. |
EFI_NOT_FOUND | Flash device not found. |
Definition at line 190 of file NorFlashKvmtool.c.
EFI_STATUS VirtNorFlashPlatformInitialization | ( | VOID | ) |
This function performs platform specific actions to initialise the NOR flash, if required.
EFI_SUCCESS | Success. |
Definition at line 39 of file NorFlashKvmtool.c.
STATIC FDT_CLIENT_PROTOCOL* mFdtClient |
Definition at line 31 of file NorFlashKvmtool.c.
Definition at line 29 of file NorFlashKvmtool.c.
STATIC VIRT_NOR_FLASH_DESCRIPTION mNorFlashDevices[MAX_FLASH_DEVICES] |
Definition at line 28 of file NorFlashKvmtool.c.
STATIC INT32 mUefiVarStoreNode = MAX_INT32 |
Definition at line 30 of file NorFlashKvmtool.c.