• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#
2#  Copyright (c) 2011-2015, ARM Limited. All rights reserved.
3#  Copyright (c) 2014, Linaro Limited. All rights reserved.
4#  Copyright (c) 2015 - 2016, Intel Corporation. All rights reserved.
5#
6#  This program and the accompanying materials
7#  are licensed and made available under the terms and conditions of the BSD License
8#  which accompanies this distribution.  The full text of the license may be found at
9#  http://opensource.org/licenses/bsd-license.php
10#
11#  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
12#  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
13#
14
15################################################################################
16#
17# FD Section
18# The [FD] Section is made up of the definition statements and a
19# description of what goes into  the Flash Device Image.  Each FD section
20# defines one flash "device" image.  A flash device image may be one of
21# the following: Removable media bootable image (like a boot floppy
22# image,) an Option ROM image (that would be "flashed" into an add-in
23# card,) a System "Flash"  image (that would be burned into a system's
24# flash) or an Update ("Capsule") image that will be used to update and
25# existing system flash.
26#
27################################################################################
28
29[FD.QEMU_EFI]
30BaseAddress   = 0x00000000|gArmTokenSpaceGuid.PcdFdBaseAddress  # QEMU assigns 0 - 0x8000000 for a BootROM
31Size          = 0x00200000|gArmTokenSpaceGuid.PcdFdSize         # The size in bytes of the FLASH Device
32ErasePolarity = 1
33
34# This one is tricky, it must be: BlockSize * NumBlocks = Size
35BlockSize     = 0x00001000
36NumBlocks     = 0x200
37
38################################################################################
39#
40# Following are lists of FD Region layout which correspond to the locations of different
41# images within the flash device.
42#
43# Regions must be defined in ascending order and may not overlap.
44#
45# A Layout Region start with a eight digit hex offset (leading "0x" required) followed by
46# the pipe "|" character, followed by the size of the region, also in hex with the leading
47# "0x" characters. Like:
48# Offset|Size
49# PcdOffsetCName|PcdSizeCName
50# RegionType <FV, DATA, or FILE>
51#
52################################################################################
53
54#
55# UEFI has trouble dealing with FVs that reside at physical address 0x0.
56# So instead, put a hardcoded 'jump to 0x1000' at offset 0x0, and put the
57# real FV at offset 0x1000
58#
590x00000000|0x00001000
60DATA = {
61!if $(ARCH) == AARCH64
62  0x00, 0x04, 0x00, 0x14   # 'b 0x1000' in AArch64 ASM
63!else
64  0xfe, 0x03, 0x00, 0xea   # 'b 0x1000' in AArch32 ASM
65!endif
66}
67
680x00001000|0x001ff000
69gArmTokenSpaceGuid.PcdFvBaseAddress|gArmTokenSpaceGuid.PcdFvSize
70FV = FVMAIN_COMPACT
71
72!include VarStore.fdf.inc
73
74################################################################################
75#
76# FV Section
77#
78# [FV] section is used to define what components or modules are placed within a flash
79# device file.  This section also defines order the components and modules are positioned
80# within the image.  The [FV] section consists of define statements, set statements and
81# module statements.
82#
83################################################################################
84
85!include ArmVirtQemuFvMain.fdf.inc
86
87[FV.FVMAIN_COMPACT]
88FvAlignment        = 16
89ERASE_POLARITY     = 1
90MEMORY_MAPPED      = TRUE
91STICKY_WRITE       = TRUE
92LOCK_CAP           = TRUE
93LOCK_STATUS        = TRUE
94WRITE_DISABLED_CAP = TRUE
95WRITE_ENABLED_CAP  = TRUE
96WRITE_STATUS       = TRUE
97WRITE_LOCK_CAP     = TRUE
98WRITE_LOCK_STATUS  = TRUE
99READ_DISABLED_CAP  = TRUE
100READ_ENABLED_CAP   = TRUE
101READ_STATUS        = TRUE
102READ_LOCK_CAP      = TRUE
103READ_LOCK_STATUS   = TRUE
104
105  INF ArmPlatformPkg/PrePeiCore/PrePeiCoreUniCore.inf
106  INF MdeModulePkg/Core/Pei/PeiMain.inf
107  INF ArmPlatformPkg/PlatformPei/PlatformPeim.inf
108  INF ArmPlatformPkg/MemoryInitPei/MemoryInitPeim.inf
109  INF ArmPkg/Drivers/CpuPei/CpuPei.inf
110  INF MdeModulePkg/Universal/PCD/Pei/Pcd.inf
111  INF MdeModulePkg/Universal/Variable/Pei/VariablePei.inf
112  INF MdeModulePkg/Core/DxeIplPeim/DxeIpl.inf
113
114  FILE FV_IMAGE = 9E21FD93-9C72-4c15-8C4B-E77F1DB2D792 {
115    SECTION GUIDED EE4E5898-3914-4259-9D6E-DC7BD79403CF PROCESSING_REQUIRED = TRUE {
116      SECTION FV_IMAGE = FVMAIN
117    }
118  }
119
120!include ArmVirtRules.fdf.inc
121