TianoCore EDK2 master
Loading...
Searching...
No Matches
VirtNorFlashStaticLib.c
Go to the documentation of this file.
1
9#include <Base.h>
10#include <PiDxe.h>
12
13#define QEMU_NOR_BLOCK_SIZE SIZE_256KB
14
17 VOID
18 )
19{
20 return EFI_SUCCESS;
21}
22
23VIRT_NOR_FLASH_DESCRIPTION mNorFlashDevice =
24{
25 FixedPcdGet32 (PcdOvmfFdBaseAddress),
26 FixedPcdGet64 (PcdFlashNvStorageVariableBase),
27 FixedPcdGet32 (PcdOvmfFirmwareFdSize) -
28 (FixedPcdGet64 (PcdFlashNvStorageVariableBase) - FixedPcdGet32 (PcdOvmfFdBaseAddress)),
29 QEMU_NOR_BLOCK_SIZE
30};
31
34 OUT VIRT_NOR_FLASH_DESCRIPTION **NorFlashDescriptions,
35 OUT UINT32 *Count
36 )
37{
38 *NorFlashDescriptions = &mNorFlashDevice;
39 *Count = 1;
40 return EFI_SUCCESS;
41}
#define OUT
Definition: Base.h:284
#define FixedPcdGet32(TokenName)
Definition: PcdLib.h:92
#define FixedPcdGet64(TokenName)
Definition: PcdLib.h:106
RETURN_STATUS EFI_STATUS
Definition: UefiBaseType.h:29
#define EFI_SUCCESS
Definition: UefiBaseType.h:112
EFI_STATUS VirtNorFlashPlatformInitialization(VOID)
EFI_STATUS VirtNorFlashPlatformGetDevices(OUT VIRT_NOR_FLASH_DESCRIPTION **NorFlashDescriptions, OUT UINT32 *Count)