hc
2024-03-22 a0752693d998599af469473b8dc239ef973a012f
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
/** @file
 
 Copyright (c) 2019, Linaro Ltd. All rights reserved
 
 SPDX-License-Identifier: BSD-2-Clause-Patent
 
 **/
 
#include <Base.h>
#include <PiDxe.h>
#include <Library/NorFlashPlatformLib.h>
 
#define QEMU_NOR_BLOCK_SIZE    SIZE_256KB
 
EFI_STATUS
NorFlashPlatformInitialization (
  VOID
  )
{
  return EFI_SUCCESS;
}
 
NOR_FLASH_DESCRIPTION mNorFlashDevice =
{
 FixedPcdGet64(PcdFdBaseAddress),
 FixedPcdGet64(PcdFlashNvStorageVariableBase),
 FixedPcdGet32(PcdFdSize),
 QEMU_NOR_BLOCK_SIZE
};
 
EFI_STATUS
NorFlashPlatformGetDevices (
  OUT NOR_FLASH_DESCRIPTION   **NorFlashDescriptions,
  OUT UINT32                  *Count
  )
{
  *NorFlashDescriptions = &mNorFlashDevice;
  *Count = 1;
  return EFI_SUCCESS;
}