Vishal Bhoj | 82c8071 | 2015-12-15 21:13:33 +0530 | [diff] [blame^] | 1 | #
|
| 2 | # Copyright (c) 2011 - 2014, ARM Limited. All rights reserved.
|
| 3 | #
|
| 4 | # This program and the accompanying materials
|
| 5 | # are licensed and made available under the terms and conditions of the BSD License
|
| 6 | # which accompanies this distribution. The full text of the license may be found at
|
| 7 | # http://opensource.org/licenses/bsd-license.php
|
| 8 | #
|
| 9 | # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
| 10 | # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
| 11 | #
|
| 12 |
|
| 13 | ################################################################################
|
| 14 | #
|
| 15 | # FD Section
|
| 16 | # The [FD] Section is made up of the definition statements and a
|
| 17 | # description of what goes into the Flash Device Image. Each FD section
|
| 18 | # defines one flash "device" image. A flash device image may be one of
|
| 19 | # the following: Removable media bootable image (like a boot floppy
|
| 20 | # image,) an Option ROM image (that would be "flashed" into an add-in
|
| 21 | # card,) a System "Flash" image (that would be burned into a system's
|
| 22 | # flash) or an Update ("Capsule") image that will be used to update and
|
| 23 | # existing system flash.
|
| 24 | #
|
| 25 | ################################################################################
|
| 26 |
|
| 27 | [FD.FVP_AARCH64_EFI_SEC]
|
| 28 | BaseAddress = 0x00000000|gArmTokenSpaceGuid.PcdFdBaseAddress # The base address of the Firmware in SecureROM.
|
| 29 | Size = 0x04000000|gArmTokenSpaceGuid.PcdFdSize # The size in bytes of the device (64MiB).
|
| 30 | ErasePolarity = 1
|
| 31 |
|
| 32 | # This one is tricky, it must be: BlockSize * NumBlocks = Size
|
| 33 | BlockSize = 0x00001000
|
| 34 | NumBlocks = 0x4000
|
| 35 |
|
| 36 | ################################################################################
|
| 37 | #
|
| 38 | # Following are lists of FD Region layout which correspond to the locations of different
|
| 39 | # images within the flash device.
|
| 40 | #
|
| 41 | # Regions must be defined in ascending order and may not overlap.
|
| 42 | #
|
| 43 | # A Layout Region start with a eight digit hex offset (leading "0x" required) followed by
|
| 44 | # the pipe "|" character, followed by the size of the region, also in hex with the leading
|
| 45 | # "0x" characters. Like:
|
| 46 | # Offset|Size
|
| 47 | # PcdOffsetCName|PcdSizeCName
|
| 48 | # RegionType <FV, DATA, or FILE>
|
| 49 | #
|
| 50 | ################################################################################
|
| 51 |
|
| 52 | 0x00000000|0x00080000
|
| 53 | gArmTokenSpaceGuid.PcdSecureFvBaseAddress|gArmTokenSpaceGuid.PcdSecureFvSize
|
| 54 | FV = FVMAIN_SEC
|
| 55 |
|
| 56 | [FD.FVP_AARCH64_EFI]
|
| 57 | !ifdef ARM_FVP_RUN_NORFLASH
|
| 58 | BaseAddress = 0x08000000|gArmTokenSpaceGuid.PcdFdBaseAddress # The base address of the Firmware in Flash0.
|
| 59 | !else
|
| 60 | BaseAddress = 0x88000000|gArmTokenSpaceGuid.PcdFdBaseAddress # UEFI in DRAM + 128MB.
|
| 61 | !endif
|
| 62 | Size = 0x04000000|gArmTokenSpaceGuid.PcdFdSize # The size in bytes of the device (64MiB).
|
| 63 | ErasePolarity = 1
|
| 64 |
|
| 65 | # This one is tricky, it must be: BlockSize * NumBlocks = Size
|
| 66 | BlockSize = 0x00001000
|
| 67 | NumBlocks = 0x4000
|
| 68 |
|
| 69 | 0x00000000|0x00280000
|
| 70 | gArmTokenSpaceGuid.PcdFvBaseAddress|gArmTokenSpaceGuid.PcdFvSize
|
| 71 | FV = FVMAIN_COMPACT
|
| 72 |
|
| 73 | ################################################################################
|
| 74 | #
|
| 75 | # FV Section
|
| 76 | #
|
| 77 | # [FV] section is used to define what components or modules are placed within a flash
|
| 78 | # device file. This section also defines order the components and modules are positioned
|
| 79 | # within the image. The [FV] section consists of define statements, set statements and
|
| 80 | # module statements.
|
| 81 | #
|
| 82 | ################################################################################
|
| 83 |
|
| 84 | [FV.FVMAIN_SEC]
|
| 85 | FvBaseAddress = 0x0 # Secure ROM
|
| 86 | FvForceRebase = TRUE
|
| 87 | FvAlignment = 16
|
| 88 | ERASE_POLARITY = 1
|
| 89 | MEMORY_MAPPED = TRUE
|
| 90 | STICKY_WRITE = TRUE
|
| 91 | LOCK_CAP = TRUE
|
| 92 | LOCK_STATUS = TRUE
|
| 93 | WRITE_DISABLED_CAP = TRUE
|
| 94 | WRITE_ENABLED_CAP = TRUE
|
| 95 | WRITE_STATUS = TRUE
|
| 96 | WRITE_LOCK_CAP = TRUE
|
| 97 | WRITE_LOCK_STATUS = TRUE
|
| 98 | READ_DISABLED_CAP = TRUE
|
| 99 | READ_ENABLED_CAP = TRUE
|
| 100 | READ_STATUS = TRUE
|
| 101 | READ_LOCK_CAP = TRUE
|
| 102 | READ_LOCK_STATUS = TRUE
|
| 103 |
|
| 104 | INF ArmPlatformPkg/Sec/Sec.inf
|
| 105 |
|
| 106 |
|
| 107 | [FV.FvMain]
|
| 108 | BlockSize = 0x40
|
| 109 | NumBlocks = 0 # This FV gets compressed so make it just big enough
|
| 110 | FvAlignment = 16 # FV alignment and FV attributes setting.
|
| 111 | ERASE_POLARITY = 1
|
| 112 | MEMORY_MAPPED = TRUE
|
| 113 | STICKY_WRITE = TRUE
|
| 114 | LOCK_CAP = TRUE
|
| 115 | LOCK_STATUS = TRUE
|
| 116 | WRITE_DISABLED_CAP = TRUE
|
| 117 | WRITE_ENABLED_CAP = TRUE
|
| 118 | WRITE_STATUS = TRUE
|
| 119 | WRITE_LOCK_CAP = TRUE
|
| 120 | WRITE_LOCK_STATUS = TRUE
|
| 121 | READ_DISABLED_CAP = TRUE
|
| 122 | READ_ENABLED_CAP = TRUE
|
| 123 | READ_STATUS = TRUE
|
| 124 | READ_LOCK_CAP = TRUE
|
| 125 | READ_LOCK_STATUS = TRUE
|
| 126 |
|
| 127 | INF MdeModulePkg/Core/Dxe/DxeMain.inf
|
| 128 |
|
| 129 | #
|
| 130 | # PI DXE Drivers producing Architectural Protocols (EFI Services)
|
| 131 | #
|
| 132 | INF ArmPkg/Drivers/CpuDxe/CpuDxe.inf
|
| 133 | INF MdeModulePkg/Core/RuntimeDxe/RuntimeDxe.inf
|
| 134 | INF MdeModulePkg/Universal/SecurityStubDxe/SecurityStubDxe.inf
|
| 135 | INF MdeModulePkg/Universal/CapsuleRuntimeDxe/CapsuleRuntimeDxe.inf
|
| 136 | INF MdeModulePkg/Universal/Variable/RuntimeDxe/VariableRuntimeDxe.inf
|
| 137 | INF MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteDxe.inf
|
| 138 | INF MdeModulePkg/Universal/MonotonicCounterRuntimeDxe/MonotonicCounterRuntimeDxe.inf
|
| 139 | INF EmbeddedPkg/ResetRuntimeDxe/ResetRuntimeDxe.inf
|
| 140 | INF EmbeddedPkg/RealTimeClockRuntimeDxe/RealTimeClockRuntimeDxe.inf
|
| 141 | INF EmbeddedPkg/MetronomeDxe/MetronomeDxe.inf
|
| 142 |
|
| 143 | INF MdeModulePkg/Universal/HiiDatabaseDxe/HiiDatabaseDxe.inf
|
| 144 |
|
| 145 | #
|
| 146 | # Multiple Console IO support
|
| 147 | #
|
| 148 | INF MdeModulePkg/Universal/Console/ConPlatformDxe/ConPlatformDxe.inf
|
| 149 | INF MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitterDxe.inf
|
| 150 | INF MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsoleDxe.inf
|
| 151 | INF MdeModulePkg/Universal/Console/TerminalDxe/TerminalDxe.inf
|
| 152 | INF EmbeddedPkg/SerialDxe/SerialDxe.inf
|
| 153 |
|
| 154 | INF ArmPkg/Drivers/ArmGic/ArmGicDxe.inf
|
| 155 | INF ArmPkg/Drivers/TimerDxe/TimerDxe.inf
|
| 156 | INF ArmPlatformPkg/Drivers/NorFlashDxe/NorFlashDxe.inf
|
| 157 | !ifndef ARM_FOUNDATION_FVP
|
| 158 | INF ArmPlatformPkg/Drivers/LcdGraphicsOutputDxe/PL111LcdGraphicsOutputDxe.inf
|
| 159 | !endif
|
| 160 | INF ArmPlatformPkg/Drivers/SP805WatchdogDxe/SP805WatchdogDxe.inf
|
| 161 |
|
| 162 | #
|
| 163 | # Semi-hosting filesystem
|
| 164 | #
|
| 165 | INF ArmPkg/Filesystem/SemihostFs/SemihostFs.inf
|
| 166 |
|
| 167 | #
|
| 168 | # FAT filesystem + GPT/MBR partitioning
|
| 169 | #
|
| 170 | INF MdeModulePkg/Universal/Disk/DiskIoDxe/DiskIoDxe.inf
|
| 171 | INF MdeModulePkg/Universal/Disk/PartitionDxe/PartitionDxe.inf
|
| 172 | INF FatBinPkg/EnhancedFatDxe/Fat.inf
|
| 173 | INF MdeModulePkg/Universal/Disk/UnicodeCollation/EnglishDxe/EnglishDxe.inf
|
| 174 |
|
| 175 | !ifndef ARM_FOUNDATION_FVP
|
| 176 | #
|
| 177 | # Multimedia Card Interface
|
| 178 | #
|
| 179 | INF EmbeddedPkg/Universal/MmcDxe/MmcDxe.inf
|
| 180 | INF ArmPlatformPkg/Drivers/PL180MciDxe/PL180MciDxe.inf
|
| 181 | !endif
|
| 182 |
|
| 183 | #
|
| 184 | # Platform Driver
|
| 185 | #
|
| 186 | INF ArmPlatformPkg/ArmVExpressPkg/ArmVExpressDxe/ArmFvpDxe.inf
|
| 187 | INF OvmfPkg/VirtioBlkDxe/VirtioBlk.inf
|
| 188 |
|
| 189 | #
|
| 190 | # UEFI application (Shell Embedded Boot Loader)
|
| 191 | #
|
| 192 | INF ShellBinPkg/UefiShell/UefiShell.inf
|
| 193 |
|
| 194 | #
|
| 195 | # Bds
|
| 196 | #
|
| 197 | INF MdeModulePkg/Universal/DevicePathDxe/DevicePathDxe.inf
|
| 198 | INF ArmPlatformPkg/Bds/Bds.inf
|
| 199 |
|
| 200 | # FV Filesystem
|
| 201 | INF MdeModulePkg/Universal/FvSimpleFileSystemDxe/FvSimpleFileSystemDxe.inf
|
| 202 |
|
| 203 | [FV.FVMAIN_COMPACT]
|
| 204 | FvAlignment = 16
|
| 205 | ERASE_POLARITY = 1
|
| 206 | MEMORY_MAPPED = TRUE
|
| 207 | STICKY_WRITE = TRUE
|
| 208 | LOCK_CAP = TRUE
|
| 209 | LOCK_STATUS = TRUE
|
| 210 | WRITE_DISABLED_CAP = TRUE
|
| 211 | WRITE_ENABLED_CAP = TRUE
|
| 212 | WRITE_STATUS = TRUE
|
| 213 | WRITE_LOCK_CAP = TRUE
|
| 214 | WRITE_LOCK_STATUS = TRUE
|
| 215 | READ_DISABLED_CAP = TRUE
|
| 216 | READ_ENABLED_CAP = TRUE
|
| 217 | READ_STATUS = TRUE
|
| 218 | READ_LOCK_CAP = TRUE
|
| 219 | READ_LOCK_STATUS = TRUE
|
| 220 |
|
| 221 | !if $(EDK2_SKIP_PEICORE) == 1
|
| 222 | INF ArmPlatformPkg/PrePi/PeiMPCore.inf
|
| 223 | !else
|
| 224 | INF ArmPlatformPkg/PrePeiCore/PrePeiCoreMPCore.inf
|
| 225 | INF MdeModulePkg/Core/Pei/PeiMain.inf
|
| 226 | INF ArmPlatformPkg/PlatformPei/PlatformPeim.inf
|
| 227 | INF ArmPlatformPkg/MemoryInitPei/MemoryInitPeim.inf
|
| 228 | INF ArmPkg/Drivers/CpuPei/CpuPei.inf
|
| 229 | INF MdeModulePkg/Universal/PCD/Pei/Pcd.inf
|
| 230 | INF IntelFrameworkModulePkg/Universal/StatusCode/Pei/StatusCodePei.inf
|
| 231 | INF MdeModulePkg/Universal/Variable/Pei/VariablePei.inf
|
| 232 | INF MdeModulePkg/Core/DxeIplPeim/DxeIpl.inf
|
| 233 | !endif
|
| 234 |
|
| 235 | FILE FV_IMAGE = 9E21FD93-9C72-4c15-8C4B-E77F1DB2D792 {
|
| 236 | SECTION GUIDED EE4E5898-3914-4259-9D6E-DC7BD79403CF PROCESSING_REQUIRED = TRUE {
|
| 237 | SECTION FV_IMAGE = FVMAIN
|
| 238 | }
|
| 239 | }
|
| 240 |
|
| 241 |
|
| 242 | ################################################################################
|
| 243 | #
|
| 244 | # Rules are use with the [FV] section's module INF type to define
|
| 245 | # how an FFS file is created for a given INF file. The following Rule are the default
|
| 246 | # rules for the different module type. User can add the customized rules to define the
|
| 247 | # content of the FFS file.
|
| 248 | #
|
| 249 | ################################################################################
|
| 250 |
|
| 251 |
|
| 252 | ############################################################################
|
| 253 | # Example of a DXE_DRIVER FFS file with a Checksum encapsulation section #
|
| 254 | ############################################################################
|
| 255 | #
|
| 256 | #[Rule.Common.DXE_DRIVER]
|
| 257 | # FILE DRIVER = $(NAMED_GUID) {
|
| 258 | # DXE_DEPEX DXE_DEPEX Optional $(INF_OUTPUT)/$(MODULE_NAME).depex
|
| 259 | # COMPRESS PI_STD {
|
| 260 | # GUIDED {
|
| 261 | # PE32 PE32 $(INF_OUTPUT)/$(MODULE_NAME).efi
|
| 262 | # UI STRING="$(MODULE_NAME)" Optional
|
| 263 | # VERSION STRING="$(INF_VERSION)" Optional BUILD_NUM=$(BUILD_NUMBER)
|
| 264 | # }
|
| 265 | # }
|
| 266 | # }
|
| 267 | #
|
| 268 | ############################################################################
|
| 269 |
|
| 270 | [Rule.Common.SEC]
|
| 271 | FILE SEC = $(NAMED_GUID) RELOCS_STRIPPED {
|
| 272 | TE TE Align = 4K $(INF_OUTPUT)/$(MODULE_NAME).efi
|
| 273 | }
|
| 274 |
|
| 275 | [Rule.Common.PEI_CORE]
|
| 276 | FILE PEI_CORE = $(NAMED_GUID) {
|
| 277 | TE TE Align = 8 $(INF_OUTPUT)/$(MODULE_NAME).efi
|
| 278 | UI STRING ="$(MODULE_NAME)" Optional
|
| 279 | }
|
| 280 |
|
| 281 | [Rule.Common.PEIM]
|
| 282 | FILE PEIM = $(NAMED_GUID) {
|
| 283 | PEI_DEPEX PEI_DEPEX Optional $(INF_OUTPUT)/$(MODULE_NAME).depex
|
| 284 | TE TE Align = 8 $(INF_OUTPUT)/$(MODULE_NAME).efi
|
| 285 | UI STRING="$(MODULE_NAME)" Optional
|
| 286 | }
|
| 287 |
|
| 288 | [Rule.Common.PEIM.TIANOCOMPRESSED]
|
| 289 | FILE PEIM = $(NAMED_GUID) DEBUG_MYTOOLS_IA32 {
|
| 290 | PEI_DEPEX PEI_DEPEX Optional $(INF_OUTPUT)/$(MODULE_NAME).depex
|
| 291 | GUIDED A31280AD-481E-41B6-95E8-127F4C984779 PROCESSING_REQUIRED = TRUE {
|
| 292 | PE32 PE32 $(INF_OUTPUT)/$(MODULE_NAME).efi
|
| 293 | UI STRING="$(MODULE_NAME)" Optional
|
| 294 | }
|
| 295 | }
|
| 296 |
|
| 297 | [Rule.Common.DXE_CORE]
|
| 298 | FILE DXE_CORE = $(NAMED_GUID) {
|
| 299 | PE32 PE32 $(INF_OUTPUT)/$(MODULE_NAME).efi
|
| 300 | UI STRING="$(MODULE_NAME)" Optional
|
| 301 | }
|
| 302 |
|
| 303 | [Rule.Common.UEFI_DRIVER]
|
| 304 | FILE DRIVER = $(NAMED_GUID) {
|
| 305 | DXE_DEPEX DXE_DEPEX Optional $(INF_OUTPUT)/$(MODULE_NAME).depex
|
| 306 | PE32 PE32 $(INF_OUTPUT)/$(MODULE_NAME).efi
|
| 307 | UI STRING="$(MODULE_NAME)" Optional
|
| 308 | }
|
| 309 |
|
| 310 | [Rule.Common.DXE_DRIVER]
|
| 311 | FILE DRIVER = $(NAMED_GUID) {
|
| 312 | DXE_DEPEX DXE_DEPEX Optional $(INF_OUTPUT)/$(MODULE_NAME).depex
|
| 313 | PE32 PE32 $(INF_OUTPUT)/$(MODULE_NAME).efi
|
| 314 | UI STRING="$(MODULE_NAME)" Optional
|
| 315 | }
|
| 316 |
|
| 317 | [Rule.Common.DXE_RUNTIME_DRIVER]
|
| 318 | FILE DRIVER = $(NAMED_GUID) {
|
| 319 | DXE_DEPEX DXE_DEPEX Optional $(INF_OUTPUT)/$(MODULE_NAME).depex
|
| 320 | PE32 PE32 $(INF_OUTPUT)/$(MODULE_NAME).efi
|
| 321 | UI STRING="$(MODULE_NAME)" Optional
|
| 322 | }
|
| 323 |
|
| 324 | [Rule.Common.UEFI_APPLICATION]
|
| 325 | FILE APPLICATION = $(NAMED_GUID) {
|
| 326 | UI STRING ="$(MODULE_NAME)" Optional
|
| 327 | PE32 PE32 $(INF_OUTPUT)/$(MODULE_NAME).efi
|
| 328 | }
|
| 329 |
|
| 330 | [Rule.Common.UEFI_DRIVER.BINARY]
|
| 331 | FILE DRIVER = $(NAMED_GUID) {
|
| 332 | DXE_DEPEX DXE_DEPEX Optional |.depex
|
| 333 | PE32 PE32 |.efi
|
| 334 | UI STRING="$(MODULE_NAME)" Optional
|
| 335 | VERSION STRING="$(INF_VERSION)" Optional BUILD_NUM=$(BUILD_NUMBER)
|
| 336 | }
|
| 337 |
|
| 338 | [Rule.Common.UEFI_APPLICATION.BINARY]
|
| 339 | FILE APPLICATION = $(NAMED_GUID) {
|
| 340 | PE32 PE32 |.efi
|
| 341 | UI STRING="$(MODULE_NAME)" Optional
|
| 342 | VERSION STRING="$(INF_VERSION)" Optional BUILD_NUM=$(BUILD_NUMBER)
|
| 343 | }
|