]> git.proxmox.com Git - mirror_edk2.git/blob - ArmVirtPkg/Library/NorFlashQemuLib/NorFlashQemuLib.c
BaseTools: Fix a bug for --pcd used in ConditionalStatement calculate
[mirror_edk2.git] / ArmVirtPkg / Library / NorFlashQemuLib / NorFlashQemuLib.c
1 /** @file
2
3 Copyright (c) 2014, Linaro Ltd. All rights reserved.<BR>
4
5 This program and the accompanying materials
6 are licensed and made available under the terms and conditions of the BSD License
7 which accompanies this distribution. The full text of the license may be found at
8 http://opensource.org/licenses/bsd-license.php
9
10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
12
13 **/
14
15 #include <Library/NorFlashPlatformLib.h>
16
17 #define QEMU_NOR_BLOCK_SIZE SIZE_256KB
18 #define QEMU_NOR0_BASE 0x0
19 #define QEMU_NOR0_SIZE SIZE_64MB
20 #define QEMU_NOR1_BASE 0x04000000
21 #define QEMU_NOR1_SIZE SIZE_64MB
22
23 EFI_STATUS
24 NorFlashPlatformInitialization (
25 VOID
26 )
27 {
28 return EFI_SUCCESS;
29 }
30
31 NOR_FLASH_DESCRIPTION mNorFlashDevices[] = {
32 {
33 QEMU_NOR0_BASE,
34 QEMU_NOR0_BASE,
35 QEMU_NOR0_SIZE,
36 QEMU_NOR_BLOCK_SIZE,
37 {0xF9B94AE2, 0x8BA6, 0x409B, {0x9D, 0x56, 0xB9, 0xB4, 0x17, 0xF5, 0x3C, 0xB3}}
38 }, {
39 QEMU_NOR1_BASE,
40 QEMU_NOR1_BASE,
41 QEMU_NOR1_SIZE,
42 QEMU_NOR_BLOCK_SIZE,
43 {0x8047DB4B, 0x7E9C, 0x4C0C, {0x8E, 0xBC, 0xDF, 0xBB, 0xAA, 0xCA, 0xCE, 0x8F}}
44 }
45 };
46
47 EFI_STATUS
48 NorFlashPlatformGetDevices (
49 OUT NOR_FLASH_DESCRIPTION **NorFlashDescriptions,
50 OUT UINT32 *Count
51 )
52 {
53 *NorFlashDescriptions = mNorFlashDevices;
54 *Count = ARRAY_SIZE (mNorFlashDevices);
55 return EFI_SUCCESS;
56 }