Home | History | Annotate | Download | only in CelloBoard
      1 #
      2 #  Copyright (c) 2015 - 2016, AMD Incorporated. 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.STYX_ROM]
     28 BaseAddress   = 0x8000C80000|gArmTokenSpaceGuid.PcdFdBaseAddress  # The base address of the Firmware in NOR Flash.
     29 Size          = 0x00500000|gArmTokenSpaceGuid.PcdFdSize         # The size in bytes of the FLASH Device
     30 ErasePolarity = 1
     31 
     32 # This one is tricky, it must be: BlockSize * NumBlocks = Size
     33 BlockSize     = 0x00001000
     34 NumBlocks     = 0x500
     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|0x00200000
     53 FILE = OpenPlatformPkg/Platforms/AMD/Styx/CelloBoard/Binary/PreUefiFirmware.bin
     54 
     55 0x00200000|0x00260000
     56 gArmTokenSpaceGuid.PcdFvBaseAddress|gArmTokenSpaceGuid.PcdFvSize
     57 FV = STYX_EFI
     58 
     59 !include OpenPlatformPkg/Platforms/AMD/Styx/Common/Varstore.fdf.inc
     60 
     61 ################################################################################
     62 #
     63 # FV Section
     64 #
     65 # [FV] section is used to define what components or modules are placed within a flash
     66 # device file.  This section also defines order the components and modules are positioned
     67 # within the image.  The [FV] section consists of define statements, set statements and
     68 # module statements.
     69 #
     70 ################################################################################
     71 
     72 [FV.FvMain]
     73 FvNameGuid         = 72b41709-8499-4841-a383-f432de6fce2a
     74 BlockSize          = 0x40
     75 NumBlocks          = 0         # This FV gets compressed so make it just big enough
     76 FvAlignment        = 16        # FV alignment and FV attributes setting.
     77 ERASE_POLARITY     = 1
     78 MEMORY_MAPPED      = TRUE
     79 STICKY_WRITE       = TRUE
     80 LOCK_CAP           = TRUE
     81 LOCK_STATUS        = TRUE
     82 WRITE_DISABLED_CAP = TRUE
     83 WRITE_ENABLED_CAP  = TRUE
     84 WRITE_STATUS       = TRUE
     85 WRITE_LOCK_CAP     = TRUE
     86 WRITE_LOCK_STATUS  = TRUE
     87 READ_DISABLED_CAP  = TRUE
     88 READ_ENABLED_CAP   = TRUE
     89 READ_STATUS        = TRUE
     90 READ_LOCK_CAP      = TRUE
     91 READ_LOCK_STATUS   = TRUE
     92 
     93   INF MdeModulePkg/Core/Dxe/DxeMain.inf
     94   INF MdeModulePkg/Universal/PCD/Dxe/Pcd.inf
     95 
     96   #
     97   # PI DXE Drivers producing Architectural Protocols (EFI Services)
     98   #
     99   INF ArmPkg/Drivers/CpuDxe/CpuDxe.inf
    100   INF MdeModulePkg/Core/RuntimeDxe/RuntimeDxe.inf
    101   INF MdeModulePkg/Universal/SecurityStubDxe/SecurityStubDxe.inf
    102   INF MdeModulePkg/Universal/CapsuleRuntimeDxe/CapsuleRuntimeDxe.inf
    103   INF MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteDxe.inf
    104   INF MdeModulePkg/Universal/MonotonicCounterRuntimeDxe/MonotonicCounterRuntimeDxe.inf
    105   INF EmbeddedPkg/ResetRuntimeDxe/ResetRuntimeDxe.inf
    106   INF EmbeddedPkg/RealTimeClockRuntimeDxe/RealTimeClockRuntimeDxe.inf
    107   INF EmbeddedPkg/MetronomeDxe/MetronomeDxe.inf
    108   INF MdeModulePkg/Universal/EbcDxe/EbcDxe.inf
    109 
    110   INF MdeModulePkg/Universal/HiiDatabaseDxe/HiiDatabaseDxe.inf
    111   INF MdeModulePkg/Universal/WatchdogTimerDxe/WatchdogTimer.inf
    112 
    113   #
    114   # Console IO support
    115   #
    116   INF MdeModulePkg/Universal/Console/TerminalDxe/TerminalDxe.inf
    117   INF MdeModulePkg/Universal/SerialDxe/SerialDxe.inf
    118 
    119   INF ArmPkg/Drivers/ArmGic/ArmGicDxe.inf
    120   INF ArmPkg/Drivers/TimerDxe/TimerDxe.inf
    121 
    122   #
    123   # FAT filesystem + GPT/MBR partitioning
    124   #
    125   INF MdeModulePkg/Universal/Disk/DiskIoDxe/DiskIoDxe.inf
    126   INF MdeModulePkg/Universal/Disk/PartitionDxe/PartitionDxe.inf
    127   INF FatPkg/EnhancedFatDxe/Fat.inf
    128   INF MdeModulePkg/Universal/Disk/UnicodeCollation/EnglishDxe/EnglishDxe.inf
    129 
    130   #
    131   # Environment Variables Protocol
    132   #
    133   INF MdeModulePkg/Universal/Variable/RuntimeDxe/VariableRuntimeDxe.inf
    134   INF OpenPlatformPkg/Platforms/AMD/Styx/Drivers/StyxSpiFvDxe/StyxSpiFvDxe.inf
    135 
    136   #
    137   # Iscp support
    138   #
    139   INF AmdModulePkg/Iscp/IscpDxe.inf
    140 
    141   #
    142   # PCI support
    143   #
    144   INF AmdModulePkg/Gionb/Gionb.inf
    145   INF ArmPkg/Drivers/ArmPciCpuIo2Dxe/ArmPciCpuIo2Dxe.inf
    146   INF MdeModulePkg/Bus/Pci/PciHostBridgeDxe/PciHostBridgeDxe.inf
    147   INF MdeModulePkg/Bus/Pci/PciBusDxe/PciBusDxe.inf
    148 
    149   #
    150   # AHCI Support
    151   #
    152   INF MdeModulePkg/Bus/Ata/AtaAtapiPassThru/AtaAtapiPassThru.inf
    153   INF MdeModulePkg/Bus/Ata/AtaBusDxe/AtaBusDxe.inf
    154   INF MdeModulePkg/Bus/Scsi/ScsiBusDxe/ScsiBusDxe.inf
    155   INF MdeModulePkg/Bus/Scsi/ScsiDiskDxe/ScsiDiskDxe.inf
    156   INF MdeModulePkg/Bus/Pci/SataControllerDxe/SataControllerDxe.inf
    157   INF MdeModulePkg/Bus/Pci/NonDiscoverablePciDeviceDxe/NonDiscoverablePciDeviceDxe.inf
    158   INF OpenPlatformPkg/Platforms/AMD/Styx/Drivers/StyxSataPlatformDxe/StyxSataPlatformDxe.inf
    159 
    160   #
    161   # USB Support
    162   #
    163   INF MdeModulePkg/Bus/Pci/UhciDxe/UhciDxe.inf
    164   INF MdeModulePkg/Bus/Pci/EhciDxe/EhciDxe.inf
    165   INF MdeModulePkg/Bus/Pci/XhciDxe/XhciDxe.inf
    166   INF MdeModulePkg/Bus/Usb/UsbBusDxe/UsbBusDxe.inf
    167   INF MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassStorageDxe.inf
    168 
    169   #
    170   # Networking stack
    171   #
    172   INF MdeModulePkg/Universal/Network/SnpDxe/SnpDxe.inf
    173   INF MdeModulePkg/Universal/Network/DpcDxe/DpcDxe.inf
    174   INF MdeModulePkg/Universal/Network/ArpDxe/ArpDxe.inf
    175   INF MdeModulePkg/Universal/Network/Dhcp4Dxe/Dhcp4Dxe.inf
    176 # INF MdeModulePkg/Universal/Network/Ip4ConfigDxe/Ip4ConfigDxe.inf
    177   INF MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Dxe.inf
    178   INF MdeModulePkg/Universal/Network/MnpDxe/MnpDxe.inf
    179   INF MdeModulePkg/Universal/Network/VlanConfigDxe/VlanConfigDxe.inf
    180   INF MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Dxe.inf
    181   INF MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Dxe.inf
    182   INF MdeModulePkg/Universal/Network/Udp4Dxe/Udp4Dxe.inf
    183   INF MdeModulePkg/Universal/Network/UefiPxeBcDxe/UefiPxeBcDxe.inf
    184   INF MdeModulePkg/Universal/Network/IScsiDxe/IScsiDxe.inf
    185 
    186   #
    187   # Core Info
    188   #
    189   INF OpenPlatformPkg/Platforms/AMD/Styx/Drivers/PlatInitDxe/PlatInitDxe.inf
    190 
    191   #
    192   # ACPI Support
    193   #
    194   INF MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableDxe.inf
    195   INF RuleOverride=ACPITABLE OpenPlatformPkg/Platforms/AMD/Styx/AcpiTables/AcpiAml.inf
    196   INF OpenPlatformPkg/Platforms/AMD/Styx/Drivers/AcpiPlatformDxe/AcpiPlatformDxe.inf
    197 
    198   #
    199   # SMBIOS Support
    200   #
    201   INF MdeModulePkg/Universal/SmbiosDxe/SmbiosDxe.inf
    202   INF OpenPlatformPkg/Platforms/AMD/Styx/Drivers/PlatformSmbiosDxe/PlatformSmbiosDxe.inf
    203 
    204   #
    205   # UEFI application (Shell Embedded Boot Loader)
    206   #
    207   INF ShellPkg/Application/Shell/Shell.inf
    208 
    209   #
    210   # Bds
    211   #
    212   INF MdeModulePkg/Universal/DevicePathDxe/DevicePathDxe.inf
    213   INF MdeModulePkg/Universal/DisplayEngineDxe/DisplayEngineDxe.inf
    214   INF MdeModulePkg/Universal/SetupBrowserDxe/SetupBrowserDxe.inf
    215   INF MdeModulePkg/Universal/BdsDxe/BdsDxe.inf
    216   INF MdeModulePkg/Application/UiApp/UiApp.inf
    217 
    218   #
    219   # Crypto Accelerator support (RNG only)
    220   #
    221   INF OpenPlatformPkg/Platforms/AMD/Styx/Drivers/StyxRngDxe/StyxRngDxe.inf
    222 
    223   #
    224   # Renesas PD720202 XHCI firmware uploader, requires firmware image
    225   # in directory $(RENESAS_XHCI_FW_DIR)
    226   #
    227 !ifdef $(RENESAS_XHCI_FW_DIR)
    228   INF OpenPlatformPkg/Drivers/Xhci/RenesasFirmwarePD720202/RenesasFirmwarePD720202.inf
    229   FILE FREEFORM = A059EBC4-D73D-4279-81BF-E4A89308B923 {
    230     SECTION RAW = $(RENESAS_XHCI_FW_DIR)/K2013080.mem
    231   }
    232 !endif
    233 
    234 [FV.STYX_EFI]
    235 FvAlignment        = 16
    236 ERASE_POLARITY     = 1
    237 MEMORY_MAPPED      = TRUE
    238 STICKY_WRITE       = TRUE
    239 LOCK_CAP           = TRUE
    240 LOCK_STATUS        = TRUE
    241 WRITE_DISABLED_CAP = TRUE
    242 WRITE_ENABLED_CAP  = TRUE
    243 WRITE_STATUS       = TRUE
    244 WRITE_LOCK_CAP     = TRUE
    245 WRITE_LOCK_STATUS  = TRUE
    246 READ_DISABLED_CAP  = TRUE
    247 READ_ENABLED_CAP   = TRUE
    248 READ_STATUS        = TRUE
    249 READ_LOCK_CAP      = TRUE
    250 READ_LOCK_STATUS   = TRUE
    251 
    252   INF ArmPlatformPkg/PrePeiCore/PrePeiCoreUniCore.inf
    253   INF MdeModulePkg/Core/Pei/PeiMain.inf
    254   INF ArmPlatformPkg/PlatformPei/PlatformPeim.inf
    255   INF AmdModulePkg/Iscp/IscpPei.inf
    256   INF OpenPlatformPkg/Platforms/AMD/Styx/Drivers/PlatInitPei/PlatInitPei.inf
    257   INF ArmPlatformPkg/MemoryInitPei/MemoryInitPeim.inf
    258   INF ArmPkg/Drivers/CpuPei/CpuPei.inf
    259   INF MdeModulePkg/Universal/PCD/Pei/Pcd.inf
    260   INF MdeModulePkg/Universal/Variable/Pei/VariablePei.inf
    261   INF MdeModulePkg/Core/DxeIplPeim/DxeIpl.inf
    262 
    263   FILE FV_IMAGE = 9E21FD93-9C72-4c15-8C4B-E77F1DB2D792 {
    264     SECTION GUIDED EE4E5898-3914-4259-9D6E-DC7BD79403CF PROCESSING_REQUIRED = TRUE {
    265       SECTION FV_IMAGE = FVMAIN
    266     }
    267   }
    268 
    269 
    270 ################################################################################
    271 #
    272 # Rules are use with the [FV] section's module INF type to define
    273 # how an FFS file is created for a given INF file. The following Rule are the default
    274 # rules for the different module type. User can add the customized rules to define the
    275 # content of the FFS file.
    276 #
    277 ################################################################################
    278 
    279 
    280 ############################################################################
    281 # Example of a DXE_DRIVER FFS file with a Checksum encapsulation section   #
    282 ############################################################################
    283 #
    284 #[Rule.Common.DXE_DRIVER]
    285 #  FILE DRIVER = $(NAMED_GUID) {
    286 #    DXE_DEPEX    DXE_DEPEX               Optional $(INF_OUTPUT)/$(MODULE_NAME).depex
    287 #    COMPRESS PI_STD {
    288 #      GUIDED {
    289 #        PE32     PE32                    $(INF_OUTPUT)/$(MODULE_NAME).efi
    290 #        UI       STRING="$(MODULE_NAME)" Optional
    291 #        VERSION  STRING="$(INF_VERSION)" Optional BUILD_NUM=$(BUILD_NUMBER)
    292 #      }
    293 #    }
    294 #  }
    295 #
    296 ############################################################################
    297 
    298 [Rule.Common.SEC]
    299   FILE SEC = $(NAMED_GUID) RELOCS_STRIPPED {
    300     TE  TE Align = 4K                   $(INF_OUTPUT)/$(MODULE_NAME).efi
    301   }
    302 
    303 [Rule.Common.PEI_CORE]
    304   FILE PEI_CORE = $(NAMED_GUID) {
    305     TE     TE Align = Auto              $(INF_OUTPUT)/$(MODULE_NAME).efi
    306     UI     STRING ="$(MODULE_NAME)" Optional
    307   }
    308 
    309 [Rule.Common.PEIM]
    310   FILE PEIM = $(NAMED_GUID) {
    311      PEI_DEPEX PEI_DEPEX Optional       $(INF_OUTPUT)/$(MODULE_NAME).depex
    312      TE       TE Align = Auto           $(INF_OUTPUT)/$(MODULE_NAME).efi
    313      UI       STRING="$(MODULE_NAME)" Optional
    314   }
    315 
    316 [Rule.Common.PEIM.Binary]
    317   FILE PEIM = $(NAMED_GUID) {
    318      PEI_DEPEX PEI_DEPEX Optional       |.depex
    319      TE       TE Align = Auto           |.efi
    320      UI       STRING="$(MODULE_NAME)" Optional
    321   }
    322 
    323 [Rule.Common.PEIM.TIANOCOMPRESSED]
    324   FILE PEIM = $(NAMED_GUID) DEBUG_MYTOOLS_IA32 {
    325     PEI_DEPEX PEI_DEPEX Optional        $(INF_OUTPUT)/$(MODULE_NAME).depex
    326     GUIDED A31280AD-481E-41B6-95E8-127F4C984779 PROCESSING_REQUIRED = TRUE {
    327       PE32      PE32                    $(INF_OUTPUT)/$(MODULE_NAME).efi
    328       UI        STRING="$(MODULE_NAME)" Optional
    329     }
    330   }
    331 
    332 [Rule.Common.DXE_CORE]
    333   FILE DXE_CORE = $(NAMED_GUID) {
    334     PE32     PE32                       $(INF_OUTPUT)/$(MODULE_NAME).efi
    335     UI       STRING="$(MODULE_NAME)" Optional
    336   }
    337 
    338 [Rule.Common.UEFI_DRIVER]
    339   FILE DRIVER = $(NAMED_GUID) {
    340     DXE_DEPEX    DXE_DEPEX              Optional $(INF_OUTPUT)/$(MODULE_NAME).depex
    341     PE32         PE32                   $(INF_OUTPUT)/$(MODULE_NAME).efi
    342     UI           STRING="$(MODULE_NAME)" Optional
    343   }
    344 
    345 [Rule.Common.UEFI_DRIVER.Binary]
    346   FILE DRIVER = $(NAMED_GUID) {
    347     PE32         PE32                   |.efi
    348     UI           STRING="$(MODULE_NAME)" Optional
    349   }
    350 
    351 [Rule.Common.DXE_DRIVER]
    352   FILE DRIVER = $(NAMED_GUID) {
    353     DXE_DEPEX    DXE_DEPEX              Optional $(INF_OUTPUT)/$(MODULE_NAME).depex
    354     PE32         PE32                   $(INF_OUTPUT)/$(MODULE_NAME).efi
    355     UI           STRING="$(MODULE_NAME)" Optional
    356   }
    357 
    358 [Rule.Common.DXE_RUNTIME_DRIVER]
    359   FILE DRIVER = $(NAMED_GUID) {
    360     DXE_DEPEX    DXE_DEPEX              Optional $(INF_OUTPUT)/$(MODULE_NAME).depex
    361     PE32         PE32                   $(INF_OUTPUT)/$(MODULE_NAME).efi
    362     UI           STRING="$(MODULE_NAME)" Optional
    363   }
    364 
    365 [Rule.Common.DXE_RUNTIME_DRIVER.Binary]
    366   FILE DRIVER = $(NAMED_GUID) {
    367     DXE_DEPEX    DXE_DEPEX              Optional |.depex
    368     PE32         PE32                   |.efi
    369     UI           STRING="$(MODULE_NAME)" Optional
    370   }
    371 
    372 [Rule.Common.UEFI_APPLICATION]
    373   FILE APPLICATION = $(NAMED_GUID) {
    374     UI     STRING ="$(MODULE_NAME)"     Optional
    375     PE32   PE32                         $(INF_OUTPUT)/$(MODULE_NAME).efi
    376   }
    377 
    378 [Rule.Common.UEFI_DRIVER.BINARY]
    379   FILE DRIVER = $(NAMED_GUID) {
    380     DXE_DEPEX DXE_DEPEX Optional      |.depex
    381     PE32      PE32                    |.efi
    382     UI        STRING="$(MODULE_NAME)" Optional
    383     VERSION   STRING="$(INF_VERSION)" Optional BUILD_NUM=$(BUILD_NUMBER)
    384   }
    385 
    386 [Rule.Common.UEFI_APPLICATION.BINARY]
    387   FILE APPLICATION = $(NAMED_GUID) {
    388     PE32      PE32                    |.efi
    389     UI        STRING="$(MODULE_NAME)" Optional
    390     VERSION   STRING="$(INF_VERSION)" Optional BUILD_NUM=$(BUILD_NUMBER)
    391   }
    392 
    393 [Rule.Common.USER_DEFINED.ACPITABLE]
    394   FILE FREEFORM = $(NAMED_GUID) {
    395     RAW ASL                |.aml
    396   }
    397 
    398