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.<BR> 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.XEN_EFI] 30BaseAddress = 0x00000000|gArmTokenSpaceGuid.PcdFdBaseAddress 31Size = 0x00200000|gArmTokenSpaceGuid.PcdFdSize 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# Implement the Linux kernel header layout so that the Xen loader will identify 56# it as something bootable, and execute it with a FDT pointer in x0 or r2. 57# This area will be reused to store a copy of the FDT so round it up to 8 KB. 58# 590x00000000|0x00002000 60DATA = { 61!if $(ARCH) == AARCH64 62 0x01, 0x00, 0x00, 0x10, # code0: adr x1, . 63 0xff, 0x07, 0x00, 0x14, # code1: b 0x2000 64 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, # text_offset: 512 KB 65 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, # image_size: 2 MB 66 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, # flags 67 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, # res2 68 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, # res3 69 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, # res4 70 0x41, 0x52, 0x4d, 0x64, # magic: "ARM\x64" 71 0x00, 0x00, 0x00, 0x00 # res5 72!else 73 0x08, 0x10, 0x4f, 0xe2, # adr r1, . 74 0x02, 0x00, 0xa0, 0xe1, # mov r0, r2 (DTB) 75 0x00, 0x00, 0xa0, 0xe1, # nop 76 0x00, 0x00, 0xa0, 0xe1, # nop 77 0x00, 0x00, 0xa0, 0xe1, # nop 78 0x00, 0x00, 0xa0, 0xe1, # nop 79 0x00, 0x00, 0xa0, 0xe1, # nop 80 0x00, 0x00, 0xa0, 0xe1, # nop 81 82 0xf6, 0x07, 0x00, 0xea, # b 0x2000 83 0x18, 0x28, 0x6f, 0x01, # magic 84 0x00, 0x00, 0x00, 0x00, # start 85 0x00, 0x00, 0x20, 0x00, # image size: 2 MB 86 0x01, 0x02, 0x03, 0x04 # endiannness flag 87!endif 88} 89 900x00002000|0x001fe000 91gArmTokenSpaceGuid.PcdFvBaseAddress|gArmTokenSpaceGuid.PcdFvSize 92FV = FVMAIN_COMPACT 93 94 95################################################################################ 96# 97# FV Section 98# 99# [FV] section is used to define what components or modules are placed within a flash 100# device file. This section also defines order the components and modules are positioned 101# within the image. The [FV] section consists of define statements, set statements and 102# module statements. 103# 104################################################################################ 105 106[FV.FvMain] 107FvNameGuid = 4d2d8743-6337-4c3f-a1d9-7cc7efd283db 108BlockSize = 0x40 109NumBlocks = 0 # This FV gets compressed so make it just big enough 110FvAlignment = 16 # FV alignment and FV attributes setting. 111ERASE_POLARITY = 1 112MEMORY_MAPPED = TRUE 113STICKY_WRITE = TRUE 114LOCK_CAP = TRUE 115LOCK_STATUS = TRUE 116WRITE_DISABLED_CAP = TRUE 117WRITE_ENABLED_CAP = TRUE 118WRITE_STATUS = TRUE 119WRITE_LOCK_CAP = TRUE 120WRITE_LOCK_STATUS = TRUE 121READ_DISABLED_CAP = TRUE 122READ_ENABLED_CAP = TRUE 123READ_STATUS = TRUE 124READ_LOCK_CAP = TRUE 125READ_LOCK_STATUS = TRUE 126 127 INF MdeModulePkg/Core/Dxe/DxeMain.inf 128 INF MdeModulePkg/Universal/PCD/Dxe/Pcd.inf 129 INF ArmVirtPkg/XenioFdtDxe/XenioFdtDxe.inf 130 INF ArmVirtPkg/FdtClientDxe/FdtClientDxe.inf 131 132 # 133 # PI DXE Drivers producing Architectural Protocols (EFI Services) 134 # 135 INF ArmPkg/Drivers/CpuDxe/CpuDxe.inf 136 INF MdeModulePkg/Core/RuntimeDxe/RuntimeDxe.inf 137 INF MdeModulePkg/Universal/SecurityStubDxe/SecurityStubDxe.inf 138 INF MdeModulePkg/Universal/CapsuleRuntimeDxe/CapsuleRuntimeDxe.inf 139 140 INF MdeModulePkg/Universal/Variable/EmuRuntimeDxe/EmuVariableRuntimeDxe.inf 141 142 INF MdeModulePkg/Universal/MonotonicCounterRuntimeDxe/MonotonicCounterRuntimeDxe.inf 143 INF EmbeddedPkg/ResetRuntimeDxe/ResetRuntimeDxe.inf 144 INF EmbeddedPkg/RealTimeClockRuntimeDxe/RealTimeClockRuntimeDxe.inf 145 INF EmbeddedPkg/MetronomeDxe/MetronomeDxe.inf 146 INF MdeModulePkg/Universal/HiiDatabaseDxe/HiiDatabaseDxe.inf 147 148 # 149 # Multiple Console IO support 150 # 151 INF MdeModulePkg/Universal/Console/ConPlatformDxe/ConPlatformDxe.inf 152 INF MdeModulePkg/Universal/Console/TerminalDxe/TerminalDxe.inf 153 INF MdeModulePkg/Universal/SerialDxe/SerialDxe.inf 154 155 INF ArmPkg/Drivers/ArmGic/ArmGicDxe.inf 156 INF ArmPkg/Drivers/TimerDxe/TimerDxe.inf 157 INF MdeModulePkg/Universal/WatchdogTimerDxe/WatchdogTimer.inf 158 159 # 160 # FAT filesystem + GPT/MBR partitioning 161 # 162 INF MdeModulePkg/Universal/Disk/DiskIoDxe/DiskIoDxe.inf 163 INF MdeModulePkg/Universal/Disk/PartitionDxe/PartitionDxe.inf 164 INF FatPkg/EnhancedFatDxe/Fat.inf 165 INF MdeModulePkg/Universal/Disk/UnicodeCollation/EnglishDxe/EnglishDxe.inf 166 167 # 168 # UEFI application (Shell Embedded Boot Loader) 169 # 170 INF ShellPkg/Application/Shell/Shell.inf 171 172 # 173 # Bds 174 # 175 INF MdeModulePkg/Universal/DevicePathDxe/DevicePathDxe.inf 176 INF MdeModulePkg/Universal/DisplayEngineDxe/DisplayEngineDxe.inf 177 INF MdeModulePkg/Universal/SetupBrowserDxe/SetupBrowserDxe.inf 178 INF IntelFrameworkModulePkg/Universal/BdsDxe/BdsDxe.inf 179 180 INF OvmfPkg/XenBusDxe/XenBusDxe.inf 181 INF OvmfPkg/XenPvBlkDxe/XenPvBlkDxe.inf 182 183 # 184 # ACPI support 185 # 186!if $(ARCH) == AARCH64 187 INF MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableDxe.inf 188 INF ArmVirtPkg/XenAcpiPlatformDxe/XenAcpiPlatformDxe.inf 189 190 # 191 # EBC support 192 # 193 INF MdeModulePkg/Universal/EbcDxe/EbcDxe.inf 194!endif 195 196 # 197 # Ramdisk support 198 # 199 INF MdeModulePkg/Universal/Disk/RamDiskDxe/RamDiskDxe.inf 200 201[FV.FVMAIN_COMPACT] 202FvAlignment = 16 203ERASE_POLARITY = 1 204MEMORY_MAPPED = TRUE 205STICKY_WRITE = TRUE 206LOCK_CAP = TRUE 207LOCK_STATUS = TRUE 208WRITE_DISABLED_CAP = TRUE 209WRITE_ENABLED_CAP = TRUE 210WRITE_STATUS = TRUE 211WRITE_LOCK_CAP = TRUE 212WRITE_LOCK_STATUS = TRUE 213READ_DISABLED_CAP = TRUE 214READ_ENABLED_CAP = TRUE 215READ_STATUS = TRUE 216READ_LOCK_CAP = TRUE 217READ_LOCK_STATUS = TRUE 218 219 INF ArmVirtPkg/PrePi/ArmVirtPrePiUniCoreRelocatable.inf 220 221 FILE FV_IMAGE = 9E21FD93-9C72-4c15-8C4B-E77F1DB2D792 { 222 SECTION GUIDED EE4E5898-3914-4259-9D6E-DC7BD79403CF PROCESSING_REQUIRED = TRUE { 223 SECTION FV_IMAGE = FVMAIN 224 } 225 } 226 227!include ArmVirtRules.fdf.inc 228