TianoCore EDK2 master
Loading...
Searching...
No Matches
VirtNorFlashStaticLib.c File Reference
#include <Base.h>
#include <PiDxe.h>
#include <Library/VirtNorFlashPlatformLib.h>

Go to the source code of this file.

Macros

#define QEMU_NOR_BLOCK_SIZE   SIZE_256KB
 

Functions

EFI_STATUS VirtNorFlashPlatformInitialization (VOID)
 
EFI_STATUS VirtNorFlashPlatformGetDevices (OUT VIRT_NOR_FLASH_DESCRIPTION **NorFlashDescriptions, OUT UINT32 *Count)
 

Variables

VIRT_NOR_FLASH_DESCRIPTION mNorFlashDevice
 

Detailed Description

Copyright (c) 2019, Linaro Ltd. All rights reserved

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

Definition in file VirtNorFlashStaticLib.c.

Macro Definition Documentation

◆ QEMU_NOR_BLOCK_SIZE

#define QEMU_NOR_BLOCK_SIZE   SIZE_256KB

Definition at line 13 of file VirtNorFlashStaticLib.c.

Function Documentation

◆ VirtNorFlashPlatformGetDevices()

EFI_STATUS VirtNorFlashPlatformGetDevices ( OUT VIRT_NOR_FLASH_DESCRIPTION **  NorFlashDescriptions,
OUT UINT32 *  Count 
)

Return the Flash devices on the platform.

Parameters
[out]NorFlashDescriptionsPointer to the Flash device description.
[out]CountNumber of Flash devices.
Return values
EFI_SUCCESSSuccess.
EFI_NOT_FOUNDFlash device not found.

Definition at line 33 of file VirtNorFlashStaticLib.c.

◆ VirtNorFlashPlatformInitialization()

EFI_STATUS VirtNorFlashPlatformInitialization ( VOID  )

This function performs platform specific actions to initialise the NOR flash, if required.

Return values
EFI_SUCCESSSuccess.

Definition at line 16 of file VirtNorFlashStaticLib.c.

Variable Documentation

◆ mNorFlashDevice

VIRT_NOR_FLASH_DESCRIPTION mNorFlashDevice
Initial value:
=
{
FixedPcdGet32 (PcdOvmfFdBaseAddress),
FixedPcdGet64 (PcdFlashNvStorageVariableBase),
FixedPcdGet32 (PcdOvmfFirmwareFdSize) -
(FixedPcdGet64 (PcdFlashNvStorageVariableBase) - FixedPcdGet32 (PcdOvmfFdBaseAddress)),
QEMU_NOR_BLOCK_SIZE
}
#define FixedPcdGet32(TokenName)
Definition: PcdLib.h:92
#define FixedPcdGet64(TokenName)
Definition: PcdLib.h:106

Definition at line 23 of file VirtNorFlashStaticLib.c.