Home | History | Annotate | Download | only in VExpress
      1 #
      2 #  Copyright (c) 2011 - 2015, 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 FvNameGuid         = 87940482-fc81-41c3-87e6-399cf85ac8a0
    127 
    128   APRIORI DXE {
    129     INF MdeModulePkg/Universal/PCD/Dxe/Pcd.inf
    130   }
    131 
    132   INF MdeModulePkg/Core/Dxe/DxeMain.inf
    133   INF MdeModulePkg/Universal/PCD/Dxe/Pcd.inf
    134 
    135   #
    136   # PI DXE Drivers producing Architectural Protocols (EFI Services)
    137   #
    138   INF ArmPkg/Drivers/CpuDxe/CpuDxe.inf
    139   INF MdeModulePkg/Core/RuntimeDxe/RuntimeDxe.inf
    140   INF MdeModulePkg/Universal/SecurityStubDxe/SecurityStubDxe.inf
    141   INF MdeModulePkg/Universal/CapsuleRuntimeDxe/CapsuleRuntimeDxe.inf
    142 !if $(SECURE_BOOT_ENABLE) == TRUE
    143   INF SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootConfigDxe.inf
    144 !endif
    145   INF MdeModulePkg/Universal/Variable/RuntimeDxe/VariableRuntimeDxe.inf
    146   INF MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteDxe.inf
    147   INF MdeModulePkg/Universal/MonotonicCounterRuntimeDxe/MonotonicCounterRuntimeDxe.inf
    148   INF EmbeddedPkg/ResetRuntimeDxe/ResetRuntimeDxe.inf
    149   INF EmbeddedPkg/RealTimeClockRuntimeDxe/RealTimeClockRuntimeDxe.inf
    150   INF EmbeddedPkg/MetronomeDxe/MetronomeDxe.inf
    151 
    152   INF MdeModulePkg/Universal/HiiDatabaseDxe/HiiDatabaseDxe.inf
    153 
    154   # ACPI Support
    155   #
    156   INF MdeModulePkg/Universal/Acpi/AcpiPlatformDxe/AcpiPlatformDxe.inf
    157   INF MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableDxe.inf
    158   INF RuleOverride=ACPITABLE OpenPlatformPkg/Platforms/ARM/VExpress/AcpiTables/rtsm_ve-aemv8a/AcpiTables.inf
    159 
    160   #
    161   # Multiple Console IO support
    162   #
    163   INF MdeModulePkg/Universal/Console/ConPlatformDxe/ConPlatformDxe.inf
    164   INF MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitterDxe.inf
    165   INF MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsoleDxe.inf
    166   INF MdeModulePkg/Universal/Console/TerminalDxe/TerminalDxe.inf
    167   INF MdeModulePkg/Universal/SerialDxe/SerialDxe.inf
    168 
    169   INF ArmPkg/Drivers/ArmGic/ArmGicDxe.inf
    170   INF ArmPkg/Drivers/TimerDxe/TimerDxe.inf
    171 !if $(SECURE_BOOT_ENABLE) == TRUE
    172   INF ArmPlatformPkg/Drivers/NorFlashDxe/NorFlashAuthenticatedDxe.inf
    173 !else
    174   INF ArmPlatformPkg/Drivers/NorFlashDxe/NorFlashDxe.inf
    175 !endif
    176 !ifndef ARM_FOUNDATION_FVP
    177   INF ArmPlatformPkg/Drivers/LcdGraphicsOutputDxe/PL111LcdGraphicsOutputDxe.inf
    178 !endif
    179   INF ArmPlatformPkg/Drivers/SP805WatchdogDxe/SP805WatchdogDxe.inf
    180 
    181   #
    182   # Semi-hosting filesystem
    183   #
    184   INF ArmPkg/Filesystem/SemihostFs/SemihostFs.inf
    185 
    186   #
    187   # FAT filesystem + GPT/MBR partitioning
    188   #
    189   INF MdeModulePkg/Universal/Disk/DiskIoDxe/DiskIoDxe.inf
    190   INF MdeModulePkg/Universal/Disk/PartitionDxe/PartitionDxe.inf
    191   INF FatBinPkg/EnhancedFatDxe/Fat.inf
    192   INF MdeModulePkg/Universal/Disk/UnicodeCollation/EnglishDxe/EnglishDxe.inf
    193 
    194 !ifndef ARM_FOUNDATION_FVP
    195   #
    196   # Multimedia Card Interface
    197   #
    198   INF EmbeddedPkg/Universal/MmcDxe/MmcDxe.inf
    199   INF ArmPlatformPkg/Drivers/PL180MciDxe/PL180MciDxe.inf
    200 !endif
    201 
    202   #
    203   # SMBIOS Support
    204   #
    205   INF MdeModulePkg/Universal/SmbiosDxe/SmbiosDxe.inf
    206 
    207   #
    208   # Platform Driver
    209   #
    210   INF ArmPlatformPkg/ArmVExpressPkg/ArmVExpressDxe/ArmFvpDxe.inf
    211   INF OvmfPkg/VirtioBlkDxe/VirtioBlk.inf
    212 
    213 !ifdef EDK2_ENABLE_SMSC_91X
    214 !include OpenPlatformPkg/Platforms/ARM/VExpress/ArmVExpress-networking.fdf.inc
    215   INF OpenPlatformPkg/Drivers/Net/Lan91xDxe/Lan91xDxe.inf
    216 !endif
    217 
    218   #
    219   # UEFI application (Shell Embedded Boot Loader)
    220   #
    221   INF ShellBinPkg/UefiShell/UefiShell.inf
    222 
    223   #
    224   # Bds
    225   #
    226   INF MdeModulePkg/Universal/DevicePathDxe/DevicePathDxe.inf
    227 !if $(USE_ARM_BDS) == TRUE
    228   INF ArmPlatformPkg/Bds/Bds.inf
    229 !else
    230   INF MdeModulePkg/Universal/DisplayEngineDxe/DisplayEngineDxe.inf
    231   INF MdeModulePkg/Universal/SetupBrowserDxe/SetupBrowserDxe.inf
    232   INF IntelFrameworkModulePkg/Universal/BdsDxe/BdsDxe.inf
    233 
    234   #
    235   # TianoCore logo (splash screen)
    236   #
    237   FILE FREEFORM = PCD(gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdLogoFile) {
    238    SECTION RAW = MdeModulePkg/Logo/Logo.bmp
    239   }
    240 !endif
    241 
    242   # Legacy Linux Loader
    243   INF ArmPkg/Application/LinuxLoader/LinuxLoader.inf
    244 
    245   # FV Filesystem
    246   INF MdeModulePkg/Universal/FvSimpleFileSystemDxe/FvSimpleFileSystemDxe.inf
    247 
    248   #
    249   # FDT installation
    250   #
    251   # The UEFI driver is at the end of the list of the driver to be dispatched
    252   # after the device drivers (eg: Ethernet) to ensure we have support for them.
    253   INF EmbeddedPkg/Drivers/FdtPlatformDxe/FdtPlatformDxe.inf
    254 
    255 !ifdef $(DTB_DIR)
    256   #
    257   # Embed flattened device tree (FDT) images for all known
    258   # variants of this platform
    259   #
    260   FILE RAW = PCD (gArmVExpressTokenSpaceGuid.PcdFdtFvpBaseAEMv8x4GicV2) {
    261     $(DTB_DIR)/fvp-base-gicv2-psci.dtb
    262   }
    263   FILE RAW = PCD (gArmVExpressTokenSpaceGuid.PcdFdtFvpBaseAEMv8x4GicV2Legacy) {
    264     $(DTB_DIR)/fvp-base-gicv2legacy-psci.dtb
    265   }
    266   FILE RAW = PCD (gArmVExpressTokenSpaceGuid.PcdFdtFvpBaseAEMv8x4GicV3) {
    267     $(DTB_DIR)/fvp-base-gicv3-psci.dtb
    268   }
    269   FILE RAW = PCD (gArmVExpressTokenSpaceGuid.PcdFdtFvpFoundationGicV2) {
    270     $(DTB_DIR)/fvp-foundation-gicv2-psci.dtb
    271   }
    272   FILE RAW = PCD (gArmVExpressTokenSpaceGuid.PcdFdtFvpFoundationGicV2Legacy) {
    273     $(DTB_DIR)/fvp-foundation-gicv2legacy-psci.dtb
    274   }
    275   FILE RAW = PCD (gArmVExpressTokenSpaceGuid.PcdFdtFvpFoundationGicV3) {
    276     $(DTB_DIR)/fvp-foundation-gicv3-psci.dtb
    277   }
    278 !endif
    279 
    280 [FV.FVMAIN_COMPACT]
    281 FvAlignment        = 16
    282 ERASE_POLARITY     = 1
    283 MEMORY_MAPPED      = TRUE
    284 STICKY_WRITE       = TRUE
    285 LOCK_CAP           = TRUE
    286 LOCK_STATUS        = TRUE
    287 WRITE_DISABLED_CAP = TRUE
    288 WRITE_ENABLED_CAP  = TRUE
    289 WRITE_STATUS       = TRUE
    290 WRITE_LOCK_CAP     = TRUE
    291 WRITE_LOCK_STATUS  = TRUE
    292 READ_DISABLED_CAP  = TRUE
    293 READ_ENABLED_CAP   = TRUE
    294 READ_STATUS        = TRUE
    295 READ_LOCK_CAP      = TRUE
    296 READ_LOCK_STATUS   = TRUE
    297 
    298 !if $(EDK2_SKIP_PEICORE) == 1
    299   INF ArmPlatformPkg/PrePi/PeiMPCore.inf
    300 !else
    301   INF ArmPlatformPkg/PrePeiCore/PrePeiCoreMPCore.inf
    302   INF MdeModulePkg/Core/Pei/PeiMain.inf
    303   INF ArmPlatformPkg/PlatformPei/PlatformPeim.inf
    304   INF ArmPlatformPkg/MemoryInitPei/MemoryInitPeim.inf
    305   INF ArmPkg/Drivers/CpuPei/CpuPei.inf
    306   INF MdeModulePkg/Universal/PCD/Pei/Pcd.inf
    307   INF IntelFrameworkModulePkg/Universal/StatusCode/Pei/StatusCodePei.inf
    308   INF MdeModulePkg/Universal/Variable/Pei/VariablePei.inf
    309   INF MdeModulePkg/Core/DxeIplPeim/DxeIpl.inf
    310 !endif
    311 
    312   FILE FV_IMAGE = 9E21FD93-9C72-4c15-8C4B-E77F1DB2D792 {
    313     SECTION GUIDED EE4E5898-3914-4259-9D6E-DC7BD79403CF PROCESSING_REQUIRED = TRUE {
    314       SECTION FV_IMAGE = FVMAIN
    315     }
    316   }
    317 
    318 
    319 ################################################################################
    320 #
    321 # Rules are use with the [FV] section's module INF type to define
    322 # how an FFS file is created for a given INF file. The following Rule are the default
    323 # rules for the different module type. User can add the customized rules to define the
    324 # content of the FFS file.
    325 #
    326 ################################################################################
    327 
    328 
    329 ############################################################################
    330 # Example of a DXE_DRIVER FFS file with a Checksum encapsulation section   #
    331 ############################################################################
    332 #
    333 #[Rule.Common.DXE_DRIVER]
    334 #  FILE DRIVER = $(NAMED_GUID) {
    335 #    DXE_DEPEX    DXE_DEPEX               Optional $(INF_OUTPUT)/$(MODULE_NAME).depex
    336 #    COMPRESS PI_STD {
    337 #      GUIDED {
    338 #        PE32     PE32                    $(INF_OUTPUT)/$(MODULE_NAME).efi
    339 #        UI       STRING="$(MODULE_NAME)" Optional
    340 #        VERSION  STRING="$(INF_VERSION)" Optional BUILD_NUM=$(BUILD_NUMBER)
    341 #      }
    342 #    }
    343 #  }
    344 #
    345 ############################################################################
    346 
    347 [Rule.Common.SEC]
    348   FILE SEC = $(NAMED_GUID) RELOCS_STRIPPED {
    349     TE  TE Align = 4K                  $(INF_OUTPUT)/$(MODULE_NAME).efi
    350   }
    351 
    352 [Rule.Common.PEI_CORE]
    353   FILE PEI_CORE = $(NAMED_GUID) {
    354     TE     TE Align = 8                 $(INF_OUTPUT)/$(MODULE_NAME).efi
    355     UI     STRING ="$(MODULE_NAME)" Optional
    356   }
    357 
    358 [Rule.Common.PEIM]
    359   FILE PEIM = $(NAMED_GUID) {
    360      PEI_DEPEX PEI_DEPEX Optional       $(INF_OUTPUT)/$(MODULE_NAME).depex
    361      TE       TE Align = 8              $(INF_OUTPUT)/$(MODULE_NAME).efi
    362      UI       STRING="$(MODULE_NAME)" Optional
    363   }
    364 
    365 [Rule.Common.PEIM.TIANOCOMPRESSED]
    366   FILE PEIM = $(NAMED_GUID) DEBUG_MYTOOLS_IA32 {
    367     PEI_DEPEX PEI_DEPEX Optional        $(INF_OUTPUT)/$(MODULE_NAME).depex
    368     GUIDED A31280AD-481E-41B6-95E8-127F4C984779 PROCESSING_REQUIRED = TRUE {
    369       PE32      PE32                    $(INF_OUTPUT)/$(MODULE_NAME).efi
    370       UI        STRING="$(MODULE_NAME)" Optional
    371     }
    372   }
    373 
    374 [Rule.Common.DXE_CORE]
    375   FILE DXE_CORE = $(NAMED_GUID) {
    376     PE32     PE32                       $(INF_OUTPUT)/$(MODULE_NAME).efi
    377     UI       STRING="$(MODULE_NAME)" Optional
    378   }
    379 
    380 [Rule.Common.UEFI_DRIVER]
    381   FILE DRIVER = $(NAMED_GUID) {
    382     DXE_DEPEX    DXE_DEPEX              Optional $(INF_OUTPUT)/$(MODULE_NAME).depex
    383     PE32         PE32                   $(INF_OUTPUT)/$(MODULE_NAME).efi
    384     UI           STRING="$(MODULE_NAME)" Optional
    385   }
    386 
    387 [Rule.Common.DXE_DRIVER]
    388   FILE DRIVER = $(NAMED_GUID) {
    389     DXE_DEPEX    DXE_DEPEX              Optional $(INF_OUTPUT)/$(MODULE_NAME).depex
    390     PE32         PE32                   $(INF_OUTPUT)/$(MODULE_NAME).efi
    391     UI           STRING="$(MODULE_NAME)" Optional
    392   }
    393 
    394 [Rule.Common.DXE_RUNTIME_DRIVER]
    395   FILE DRIVER = $(NAMED_GUID) {
    396     DXE_DEPEX    DXE_DEPEX              Optional $(INF_OUTPUT)/$(MODULE_NAME).depex
    397     PE32         PE32                   $(INF_OUTPUT)/$(MODULE_NAME).efi
    398     UI           STRING="$(MODULE_NAME)" Optional
    399   }
    400 
    401 [Rule.Common.UEFI_APPLICATION]
    402   FILE APPLICATION = $(NAMED_GUID) {
    403     UI     STRING ="$(MODULE_NAME)"     Optional
    404     PE32   PE32                         $(INF_OUTPUT)/$(MODULE_NAME).efi
    405   }
    406 
    407 [Rule.Common.UEFI_DRIVER.BINARY]
    408   FILE DRIVER = $(NAMED_GUID) {
    409     DXE_DEPEX DXE_DEPEX Optional      |.depex
    410     PE32      PE32                    |.efi
    411     UI        STRING="$(MODULE_NAME)" Optional
    412     VERSION   STRING="$(INF_VERSION)" Optional BUILD_NUM=$(BUILD_NUMBER)
    413   }
    414 
    415 [Rule.Common.UEFI_APPLICATION.BINARY]
    416   FILE APPLICATION = $(NAMED_GUID) {
    417     PE32      PE32                    |.efi
    418     UI        STRING="$(MODULE_NAME)" Optional
    419     VERSION   STRING="$(INF_VERSION)" Optional BUILD_NUM=$(BUILD_NUMBER)
    420   }
    421 
    422 [Rule.Common.USER_DEFINED.ACPITABLE]
    423   FILE FREEFORM = $(NAMED_GUID) {
    424     RAW ASL                |.aml
    425   }
    426