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 #
     16 # Defines Section - statements that will be processed to create a Makefile.
     17 #
     18 ################################################################################
     19 [Defines]
     20   PLATFORM_NAME                  = ArmVExpress-FVP-AArch64
     21   PLATFORM_GUID                  = 0de70077-9b3b-43bf-ba38-0ea37d77141b
     22   PLATFORM_VERSION               = 0.1
     23   DSC_SPECIFICATION              = 0x00010005
     24 !ifdef $(EDK2_OUT_DIR)
     25   OUTPUT_DIRECTORY               = $(EDK2_OUT_DIR)
     26 !else
     27   OUTPUT_DIRECTORY               = Build/ArmVExpress-FVP-AArch64
     28 !endif
     29   SUPPORTED_ARCHITECTURES        = AARCH64
     30   BUILD_TARGETS                  = DEBUG|RELEASE
     31   SKUID_IDENTIFIER               = DEFAULT
     32   FLASH_DEFINITION               = OpenPlatformPkg/Platforms/ARM/VExpress/ArmVExpress-FVP-AArch64.fdf
     33 
     34 !ifndef ARM_FVP_RUN_NORFLASH
     35   DEFINE EDK2_SKIP_PEICORE=1
     36 !endif
     37 
     38 
     39 !include OpenPlatformPkg/Platforms/ARM/VExpress/ArmVExpress.dsc.inc
     40 
     41 [LibraryClasses.common]
     42   ArmLib|ArmPkg/Library/ArmLib/AArch64/AArch64Lib.inf
     43   ArmCpuLib|ArmPkg/Drivers/ArmCpuLib/ArmCortexAEMv8Lib/ArmCortexAEMv8Lib.inf
     44   ArmPlatformLib|ArmPlatformPkg/ArmVExpressPkg/Library/ArmVExpressLibRTSM/ArmVExpressLib.inf
     45 
     46   ArmPlatformSysConfigLib|ArmPlatformPkg/ArmVExpressPkg/Library/ArmVExpressSysConfigLib/ArmVExpressSysConfigLib.inf
     47   NorFlashPlatformLib|ArmPlatformPkg/ArmVExpressPkg/Library/NorFlashArmVExpressLib/NorFlashArmVExpressLib.inf
     48 !ifndef ARM_FOUNDATION_FVP
     49   LcdPlatformLib|ArmPlatformPkg/ArmVExpressPkg/Library/PL111LcdArmVExpressLib/PL111LcdArmVExpressLib.inf
     50 !endif
     51 
     52   TimerLib|ArmPkg/Library/ArmArchTimerLib/ArmArchTimerLib.inf
     53 
     54   # Virtio Support
     55   VirtioLib|OvmfPkg/Library/VirtioLib/VirtioLib.inf
     56   VirtioMmioDeviceLib|OvmfPkg/Library/VirtioMmioDeviceLib/VirtioMmioDeviceLib.inf
     57 
     58 [LibraryClasses.common.SEC]
     59   ArmLib|ArmPkg/Library/ArmLib/AArch64/AArch64LibSec.inf
     60   ArmPlatformSecLib|ArmPlatformPkg/ArmVExpressPkg/Library/ArmVExpressSecLibRTSM/ArmVExpressSecLib.inf
     61   ArmPlatformLib|ArmPlatformPkg/ArmVExpressPkg/Library/ArmVExpressLibRTSM/ArmVExpressLibSec.inf
     62 
     63 [LibraryClasses.common.UEFI_DRIVER, LibraryClasses.common.UEFI_APPLICATION, LibraryClasses.common.DXE_RUNTIME_DRIVER, LibraryClasses.common.DXE_DRIVER]
     64   PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf
     65 
     66 [BuildOptions]
     67   GCC:*_*_AARCH64_PLATFORM_FLAGS == -I$(WORKSPACE)/ArmPlatformPkg/ArmVExpressPkg/Include -I$(WORKSPACE)/ArmPlatformPkg/ArmVExpressPkg/Include/Platform/RTSM
     68 
     69 
     70 ################################################################################
     71 #
     72 # Pcd Section - list of all EDK II PCD Entries defined by this Platform
     73 #
     74 ################################################################################
     75 
     76 [PcdsFeatureFlag.common]
     77 
     78   ## If TRUE, Graphics Output Protocol will be installed on virtual handle created by ConsplitterDxe.
     79   #  It could be set FALSE to save size.
     80   gEfiMdeModulePkgTokenSpaceGuid.PcdConOutGopSupport|TRUE
     81 
     82   # Force the UEFI GIC driver to use GICv2 legacy mode. To use
     83   # GICv3 without GICv2 legacy in UEFI, the ARM Trusted Firmware needs
     84   # to configure the Non-Secure interrupts in the GIC Redistributors
     85   # which is not supported at the moment.
     86   gArmTokenSpaceGuid.PcdArmGicV3WithV2Legacy|TRUE
     87 
     88 [PcdsFixedAtBuild.common]
     89   gArmPlatformTokenSpaceGuid.PcdFirmwareVendor|"ARM Fixed Virtual Platform"
     90   gEmbeddedTokenSpaceGuid.PcdEmbeddedPrompt|"ARM-FVP"
     91 
     92 !ifndef ARM_FOUNDATION_FVP
     93   # Up to 8 cores on Base models. This works fine if model happens to have less.
     94   gArmPlatformTokenSpaceGuid.PcdCoreCount|8
     95   gArmPlatformTokenSpaceGuid.PcdClusterCount|2
     96 !else
     97   # Up to 4 cores on Foundation models. This works fine if model happens to have less.
     98   gArmPlatformTokenSpaceGuid.PcdCoreCount|4
     99 !endif
    100 
    101   #
    102   # NV Storage PCDs. Use base of 0x0C000000 for NOR1
    103   #
    104   gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableBase|0x0FFC0000
    105   gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableSize|0x00010000
    106   gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingBase|0x0FFD0000
    107   gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingSize|0x00010000
    108   gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareBase|0x0FFE0000
    109   gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareSize|0x00010000
    110 
    111   gArmTokenSpaceGuid.PcdVFPEnabled|1
    112 
    113   # FVP models can have 2 clusters with 4 cpus each
    114   # Stacks for MPCores in Secure World
    115   # Trusted SRAM (DRAM on Foundation model)
    116   gArmPlatformTokenSpaceGuid.PcdCPUCoresSecStackBase|0x04000000
    117   gArmPlatformTokenSpaceGuid.PcdCPUCoreSecPrimaryStackSize|0x1000
    118   gArmPlatformTokenSpaceGuid.PcdCPUCoreSecSecondaryStackSize|0x800
    119 
    120   # Stacks for MPCores in Normal World
    121   # Non-Trusted SRAM
    122   gArmPlatformTokenSpaceGuid.PcdCPUCoresStackBase|0x2E000000
    123   gArmPlatformTokenSpaceGuid.PcdCPUCorePrimaryStackSize|0x4000
    124   gArmPlatformTokenSpaceGuid.PcdCPUCoreSecondaryStackSize|0x1000
    125 
    126   # System Memory (2GB - 16MB of Trusted DRAM at the top of the 32bit address space)
    127   gArmTokenSpaceGuid.PcdSystemMemoryBase|0x80000000
    128   gArmTokenSpaceGuid.PcdSystemMemorySize|0x7F000000
    129 
    130   # Size of the region used by UEFI in permanent memory (Reserved 64MB)
    131   gArmPlatformTokenSpaceGuid.PcdSystemMemoryUefiRegionSize|0x04000000
    132 
    133   #
    134   # ARM Pcds
    135   #
    136   gArmTokenSpaceGuid.PcdArmUncachedMemoryMask|0x0000000040000000
    137 
    138   ## Trustzone enable (to make the transition from EL3 to NS EL2 in ArmPlatformPkg/Sec)
    139   gArmTokenSpaceGuid.PcdTrustzoneSupport|TRUE
    140 
    141   #
    142   # ARM PrimeCell
    143   #
    144 
    145   ## SP805 Watchdog - Motherboard Watchdog at 24MHz
    146   gArmPlatformTokenSpaceGuid.PcdSP805WatchdogBase|0x1C0F0000
    147   gArmPlatformTokenSpaceGuid.PcdSP805WatchdogClockFrequencyInHz|24000000
    148 
    149   ## PL011 - Serial Terminal
    150   gEfiMdeModulePkgTokenSpaceGuid.PcdSerialRegisterBase|0x1c090000
    151   gEfiMdePkgTokenSpaceGuid.PcdUartDefaultBaudRate|38400
    152 
    153   ## PL031 RealTimeClock
    154   gArmPlatformTokenSpaceGuid.PcdPL031RtcBase|0x1C170000
    155 
    156 !ifndef ARM_FOUNDATION_FVP
    157   ## PL111 Versatile Express Motherboard controller
    158   gArmPlatformTokenSpaceGuid.PcdPL111LcdBase|0x1C1F0000
    159 
    160   ## PL180 MMC/SD card controller
    161   gArmPlatformTokenSpaceGuid.PcdPL180SysMciRegAddress|0x1C010048
    162   gArmPlatformTokenSpaceGuid.PcdPL180MciBaseAddress|0x1C050000
    163 !endif
    164 
    165   #
    166   # ARM General Interrupt Controller
    167   #
    168 !ifdef ARM_FVP_LEGACY_GICV2_LOCATION
    169   gArmTokenSpaceGuid.PcdGicDistributorBase|0x2C001000
    170   gArmTokenSpaceGuid.PcdGicInterruptInterfaceBase|0x2C002000
    171 !else
    172   gArmTokenSpaceGuid.PcdGicDistributorBase|0x2f000000
    173   gArmTokenSpaceGuid.PcdGicRedistributorsBase|0x2f100000
    174   gArmTokenSpaceGuid.PcdGicInterruptInterfaceBase|0x2C000000
    175 !endif
    176 
    177   #
    178   # ARM OS Loader
    179   #
    180   gArmPlatformTokenSpaceGuid.PcdDefaultBootDescription|L"Linux from SemiHosting"
    181   gArmPlatformTokenSpaceGuid.PcdDefaultBootDevicePath|L"VenHw(C5B9C74A-6D72-4719-99AB-C59F199091EB)/Image"
    182   gArmPlatformTokenSpaceGuid.PcdDefaultBootArgument|L"console=ttyAMA0 earlycon=pl011,0x1c090000 debug user_debug=31 loglevel=9"
    183 
    184   # Use the serial console (ConIn & ConOut) and the Graphic driver (ConOut)
    185   gArmPlatformTokenSpaceGuid.PcdDefaultConOutPaths|L"VenHw(D3987D4B-971A-435F-8CAF-4967EB627241)/Uart(38400,8,N,1)/VenPcAnsi();VenHw(407B4008-BF5B-11DF-9547-CF16E0D72085)"
    186   gArmPlatformTokenSpaceGuid.PcdDefaultConInPaths|L"VenHw(D3987D4B-971A-435F-8CAF-4967EB627241)/Uart(38400,8,N,1)/VenPcAnsi()"
    187 
    188   #
    189   # ARM Architectural Timer Frequency
    190   #
    191   # Set tick frequency value to 100Mhz
    192   gArmTokenSpaceGuid.PcdArmArchTimerFreqInHz|100000000
    193 
    194 [PcdsDynamicDefault.common]
    195   #
    196   # The size of a dynamic PCD of the (VOID*) type can not be increased at run
    197   # time from its size at build time. Set the "PcdFdtDevicePaths" PCD to a 128
    198   # character "empty" string, to allow to be able to set FDT text device paths
    199   # up to 128 characters long.
    200   #
    201   gEmbeddedTokenSpaceGuid.PcdFdtDevicePaths|L"                                                                                                                                "
    202 
    203 ################################################################################
    204 #
    205 # Components Section - list of all EDK II Modules needed by this Platform
    206 #
    207 ################################################################################
    208 [Components.common]
    209 
    210   #
    211   # SEC
    212   #
    213   ArmPlatformPkg/Sec/Sec.inf {
    214     <LibraryClasses>
    215       # Use the implementation which set the Secure bits
    216       ArmGicLib|ArmPkg/Drivers/ArmGic/ArmGicSecLib.inf
    217   }
    218 
    219   #
    220   # PEI Phase modules
    221   #
    222 !ifdef EDK2_SKIP_PEICORE
    223   # UEFI is placed in RAM by bootloader
    224   ArmPlatformPkg/PrePi/PeiMPCore.inf {
    225     <LibraryClasses>
    226       ArmLib|ArmPkg/Library/ArmLib/AArch64/AArch64Lib.inf
    227       ArmPlatformLib|ArmPlatformPkg/ArmVExpressPkg/Library/ArmVExpressLibRTSM/ArmVExpressLib.inf
    228   }
    229 !else
    230   # UEFI lives in FLASH and copies itself to RAM
    231   ArmPlatformPkg/PrePeiCore/PrePeiCoreMPCore.inf
    232   MdeModulePkg/Core/Pei/PeiMain.inf
    233   MdeModulePkg/Universal/PCD/Pei/Pcd.inf  {
    234     <LibraryClasses>
    235       PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf
    236   }
    237   ArmPlatformPkg/PlatformPei/PlatformPeim.inf
    238   ArmPlatformPkg/MemoryInitPei/MemoryInitPeim.inf
    239   ArmPkg/Drivers/CpuPei/CpuPei.inf
    240   IntelFrameworkModulePkg/Universal/StatusCode/Pei/StatusCodePei.inf
    241   Nt32Pkg/BootModePei/BootModePei.inf
    242   MdeModulePkg/Universal/Variable/Pei/VariablePei.inf
    243   MdeModulePkg/Core/DxeIplPeim/DxeIpl.inf {
    244     <LibraryClasses>
    245       NULL|MdeModulePkg/Library/LzmaCustomDecompressLib/LzmaCustomDecompressLib.inf
    246   }
    247 !endif
    248 
    249   #
    250   # DXE
    251   #
    252   MdeModulePkg/Core/Dxe/DxeMain.inf {
    253     <LibraryClasses>
    254       PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf
    255       NULL|MdeModulePkg/Library/DxeCrc32GuidedSectionExtractLib/DxeCrc32GuidedSectionExtractLib.inf
    256   }
    257 
    258   #
    259   # Architectural Protocols
    260   #
    261   ArmPkg/Drivers/CpuDxe/CpuDxe.inf
    262   MdeModulePkg/Core/RuntimeDxe/RuntimeDxe.inf
    263 !if $(SECURE_BOOT_ENABLE) == TRUE
    264   MdeModulePkg/Universal/SecurityStubDxe/SecurityStubDxe.inf {
    265     <LibraryClasses>
    266       NULL|SecurityPkg/Library/DxeImageVerificationLib/DxeImageVerificationLib.inf
    267   }
    268   SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootConfigDxe.inf
    269 !else
    270   MdeModulePkg/Universal/SecurityStubDxe/SecurityStubDxe.inf
    271 !endif
    272   MdeModulePkg/Universal/CapsuleRuntimeDxe/CapsuleRuntimeDxe.inf
    273   MdeModulePkg/Universal/Variable/RuntimeDxe/VariableRuntimeDxe.inf
    274   MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteDxe.inf
    275   MdeModulePkg/Universal/MonotonicCounterRuntimeDxe/MonotonicCounterRuntimeDxe.inf
    276   EmbeddedPkg/ResetRuntimeDxe/ResetRuntimeDxe.inf
    277   EmbeddedPkg/RealTimeClockRuntimeDxe/RealTimeClockRuntimeDxe.inf
    278   EmbeddedPkg/MetronomeDxe/MetronomeDxe.inf
    279 
    280   MdeModulePkg/Universal/Console/ConPlatformDxe/ConPlatformDxe.inf
    281   MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitterDxe.inf
    282   MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsoleDxe.inf
    283   MdeModulePkg/Universal/Console/TerminalDxe/TerminalDxe.inf
    284   MdeModulePkg/Universal/SerialDxe/SerialDxe.inf
    285 
    286   MdeModulePkg/Universal/HiiDatabaseDxe/HiiDatabaseDxe.inf
    287 
    288   #
    289   # ACPI Support
    290   #
    291   MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableDxe.inf
    292   MdeModulePkg/Universal/Acpi/AcpiPlatformDxe/AcpiPlatformDxe.inf
    293   OpenPlatformPkg/Platforms/ARM/VExpress/AcpiTables/rtsm_ve-aemv8a/AcpiTables.inf
    294 
    295   ArmPkg/Drivers/ArmGic/ArmGicDxe.inf
    296 !if $(SECURE_BOOT_ENABLE) == TRUE
    297   ArmPlatformPkg/Drivers/NorFlashDxe/NorFlashAuthenticatedDxe.inf
    298 !else
    299   ArmPlatformPkg/Drivers/NorFlashDxe/NorFlashDxe.inf
    300 !endif
    301   ArmPkg/Drivers/TimerDxe/TimerDxe.inf
    302 !ifndef ARM_FOUNDATION_FVP
    303   ArmPlatformPkg/Drivers/LcdGraphicsOutputDxe/PL111LcdGraphicsOutputDxe.inf
    304 !endif
    305   ArmPlatformPkg/Drivers/SP805WatchdogDxe/SP805WatchdogDxe.inf
    306 
    307   # SMBIOS Support
    308 
    309   MdeModulePkg/Universal/SmbiosDxe/SmbiosDxe.inf
    310 
    311   #
    312   # Semi-hosting filesystem
    313   #
    314   ArmPkg/Filesystem/SemihostFs/SemihostFs.inf
    315 
    316 !ifndef ARM_FOUNDATION_FVP
    317   #
    318   # Multimedia Card Interface
    319   #
    320   EmbeddedPkg/Universal/MmcDxe/MmcDxe.inf
    321   ArmPlatformPkg/Drivers/PL180MciDxe/PL180MciDxe.inf
    322 !endif
    323 
    324   #
    325   # Platform Driver
    326   #
    327   ArmPlatformPkg/ArmVExpressPkg/ArmVExpressDxe/ArmFvpDxe.inf
    328   OvmfPkg/VirtioBlkDxe/VirtioBlk.inf
    329 
    330   #
    331   # FAT filesystem + GPT/MBR partitioning
    332   #
    333   MdeModulePkg/Universal/Disk/DiskIoDxe/DiskIoDxe.inf
    334   MdeModulePkg/Universal/Disk/PartitionDxe/PartitionDxe.inf
    335   MdeModulePkg/Universal/Disk/UnicodeCollation/EnglishDxe/EnglishDxe.inf
    336 
    337   #
    338   # Bds
    339   #
    340   MdeModulePkg/Universal/DevicePathDxe/DevicePathDxe.inf
    341 !if $(USE_ARM_BDS) == TRUE
    342   ArmPlatformPkg/Bds/Bds.inf
    343 !else
    344   MdeModulePkg/Universal/DisplayEngineDxe/DisplayEngineDxe.inf
    345   MdeModulePkg/Universal/SetupBrowserDxe/SetupBrowserDxe.inf
    346   IntelFrameworkModulePkg/Universal/BdsDxe/BdsDxe.inf
    347 !endif
    348