1 # 2 # Copyright (c) 2011, 2012, ARM Limited. All rights reserved. 3 # Copyright (c) 2015, Hisilicon Limited. All rights reserved. 4 # Copyright (c) 2015, Linaro Limited. All rights reserved. 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 [DEFINES] 16 17 ################################################################################ 18 # 19 # FD Section 20 # The [FD] Section is made up of the definition statements and a 21 # description of what goes into the Flash Device Image. Each FD section 22 # defines one flash "device" image. A flash device image may be one of 23 # the following: Removable media bootable image (like a boot floppy 24 # image,) an Option ROM image (that would be "flashed" into an add-in 25 # card,) a System "Flash" image (that would be burned into a system's 26 # flash) or an Update ("Capsule") image that will be used to update and 27 # existing system flash. 28 # 29 ################################################################################ 30 31 [FD.PV660D02] 32 BaseAddress = 0xA4800000|gArmTokenSpaceGuid.PcdFdBaseAddress # The base address of the Firmware in NOR Flash. 33 34 Size = 0x00300000|gArmTokenSpaceGuid.PcdFdSize # The size in bytes of the FLASH Device 35 ErasePolarity = 1 36 37 # This one is tricky, it must be: BlockSize * NumBlocks = Size 38 BlockSize = 0x00010000 39 NumBlocks = 0x30 40 41 ################################################################################ 42 # 43 # Following are lists of FD Region layout which correspond to the locations of different 44 # images within the flash device. 45 # 46 # Regions must be defined in ascending order and may not overlap. 47 # 48 # A Layout Region start with a eight digit hex offset (leading "0x" required) followed by 49 # the pipe "|" character, followed by the size of the region, also in hex with the leading 50 # "0x" characters. Like: 51 # Offset|Size 52 # PcdOffsetCName|PcdSizeCName 53 # RegionType <FV, DATA, or FILE> 54 # 55 ################################################################################ 56 57 0x00000000|0x00040000 58 gArmTokenSpaceGuid.PcdSecureFvBaseAddress|gArmTokenSpaceGuid.PcdSecureFvSize 59 FILE = OpenPlatformPkg/Platforms/Hisilicon/Binary/D02/Sec/FVMAIN_SEC.Fv 60 61 0x00040000|0x00240000 62 gArmTokenSpaceGuid.PcdFvBaseAddress|gArmTokenSpaceGuid.PcdFvSize 63 FV = FVMAIN_COMPACT 64 65 ## Place for Trusted Firmware 66 0x00280000|0x00020000 67 gHisiTokenSpaceGuid.PcdTrustedFirmwareBL1Base 68 FILE = OpenPlatformPkg/Platforms/Hisilicon/Binary/D02/bl1.bin 69 0x002a0000|0x00020000 70 FILE = OpenPlatformPkg/Platforms/Hisilicon/Binary/D02/fip.bin 71 72 0x002e0000|0x0000e000 73 gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableBase|gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableSize 74 DATA = { 75 ## This is the EFI_FIRMWARE_VOLUME_HEADER 76 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 77 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 78 # FileSystemGuid: gEfiSystemNvDataFvGuid = 79 0x8D, 0x2B, 0xF1, 0xFF, 0x96, 0x76, 0x8B, 0x4C, 80 0xA9, 0x85, 0x27, 0x47, 0x07, 0x5B, 0x4F, 0x50, 81 # FvLength: 0x20000 82 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 83 #Signature "_FVH" #Attributes 84 0x5f, 0x46, 0x56, 0x48, 0xff, 0xfe, 0x04, 0x00, 85 #HeaderLength #CheckSum #ExtHeaderOffset #Reserved #Revision 86 0x48, 0x00, 0x36, 0x09, 0x00, 0x00, 0x00, 0x02, 87 #Blockmap[0]: 2 Blocks * 0x10000 Bytes / Block 88 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 89 #Blockmap[1]: End 90 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 91 ## This is the VARIABLE_STORE_HEADER gEfiVariableGuid 92 0x16, 0x36, 0xcf, 0xdd, 0x75, 0x32, 0x64, 0x41, 93 0x98, 0xb6, 0xfe, 0x85, 0x70, 0x7f, 0xfe, 0x7d, 94 #Size: 0xe000 (gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableSize) - 0x48 (size of EFI_FIRMWARE_VOLUME_HEADER) = 0xdFB8 95 0xB8, 0xdF, 0x00, 0x00, 96 #FORMATTED: 0x5A #HEALTHY: 0xFE #Reserved: UINT16 #Reserved1: UINT32 97 0x5A, 0xFE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 98 } 99 100 0x002ee000|0x00002000 101 gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingBase|gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingSize 102 #NV_FTW_WORKING 103 DATA = { 104 # EFI_FAULT_TOLERANT_WORKING_BLOCK_HEADER->Signature = gEdkiiWorkingBlockSignatureGuid = 105 0x2B, 0x29, 0x58, 0x9E, 0x68, 0x7C, 0x7D, 0x49, 106 0xA0, 0xCE, 0x65, 0x0 , 0xFD, 0x9F, 0x1B, 0x95, 107 # Crc:UINT32 #WorkingBlockValid:1, WorkingBlockInvalid:1, Reserved 108 0xE2, 0x33, 0xF2, 0x03, 0xFE, 0xFF, 0xFF, 0xFF, 109 # WriteQueueSize: UINT64 #Size: 0x2000 - 0x20 (FTW_WORKING_HEADER) = 0x1FE0 110 0xE0, 0x1F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 111 } 112 113 0x002f0000|0x00010000 114 gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareBase|gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareSize 115 116 ################################################################################ 117 # 118 # FV Section 119 # 120 # [FV] section is used to define what components or modules are placed within a flash 121 # device file. This section also defines order the components and modules are positioned 122 # within the image. The [FV] section consists of define statements, set statements and 123 # module statements. 124 # 125 ################################################################################ 126 127 [FV.FvMain] 128 BlockSize = 0x40 129 NumBlocks = 0 # This FV gets compressed so make it just big enough 130 FvAlignment = 16 # FV alignment and FV attributes setting. 131 ERASE_POLARITY = 1 132 MEMORY_MAPPED = TRUE 133 STICKY_WRITE = TRUE 134 LOCK_CAP = TRUE 135 LOCK_STATUS = TRUE 136 WRITE_DISABLED_CAP = TRUE 137 WRITE_ENABLED_CAP = TRUE 138 WRITE_STATUS = TRUE 139 WRITE_LOCK_CAP = TRUE 140 WRITE_LOCK_STATUS = TRUE 141 READ_DISABLED_CAP = TRUE 142 READ_ENABLED_CAP = TRUE 143 READ_STATUS = TRUE 144 READ_LOCK_CAP = TRUE 145 READ_LOCK_STATUS = TRUE 146 147 INF MdeModulePkg/Core/Dxe/DxeMain.inf 148 INF MdeModulePkg/Universal/PCD/Dxe/Pcd.inf 149 150 INF OpenPlatformPkg/Chips/Hisilicon/Pv660/Drivers/IoInitDxe/IoInitDxe.inf 151 152 # 153 # PI DXE Drivers producing Architectural Protocols (EFI Services) 154 # 155 INF ArmPkg/Drivers/CpuDxe/CpuDxe.inf 156 INF MdeModulePkg/Core/RuntimeDxe/RuntimeDxe.inf 157 158 INF MdeModulePkg/Universal/SecurityStubDxe/SecurityStubDxe.inf 159 INF OpenPlatformPkg/Chips/Hisilicon/Drivers/NorFlashDxe/NorFlashDxe.inf 160 INF OpenPlatformPkg/Platforms/Hisilicon/Binary/D02/Drivers/SFC/SfcDxeDriver.inf 161 162 INF OpenPlatformPkg/Platforms/Hisilicon/D02/OemNicConfigD02/OemNicConfigD02.inf 163 164 # PCI Express 165 INF OpenPlatformPkg/Chips/Hisilicon/Pv660/Drivers/PcieInitDxe/PcieInitDxe.inf 166 INF OpenPlatformPkg/Chips/Hisilicon/Drivers/PciHostBridgeDxe/PciHostBridgeDxe.inf 167 INF MdeModulePkg/Bus/Pci/PciBusDxe/PciBusDxe.inf 168 169 INF OpenPlatformPkg/Chips/Hisilicon/Drivers/FlashFvbDxe/FlashFvbDxe.inf 170 INF MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteDxe.inf 171 INF MdeModulePkg/Universal/Variable/RuntimeDxe/VariableRuntimeDxe.inf 172 ## Sometimes we need to switch to emulated variable store for debug reason 173 #INF MdeModulePkg/Universal/Variable/EmuRuntimeDxe/EmuVariableRuntimeDxe.inf 174 175 INF MdeModulePkg/Universal/CapsuleRuntimeDxe/CapsuleRuntimeDxe.inf 176 INF EmbeddedPkg/EmbeddedMonotonicCounter/EmbeddedMonotonicCounter.inf 177 178 INF EmbeddedPkg/ResetRuntimeDxe/ResetRuntimeDxe.inf 179 INF EmbeddedPkg/RealTimeClockRuntimeDxe/RealTimeClockRuntimeDxe.inf 180 INF EmbeddedPkg/MetronomeDxe/MetronomeDxe.inf 181 182 INF MdeModulePkg/Universal/HiiDatabaseDxe/HiiDatabaseDxe.inf 183 184 # 185 # Multiple Console IO support 186 # 187 INF MdeModulePkg/Universal/Console/ConPlatformDxe/ConPlatformDxe.inf 188 INF MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitterDxe.inf 189 INF MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsoleDxe.inf 190 INF MdeModulePkg/Universal/Console/TerminalDxe/TerminalDxe.inf 191 INF MdeModulePkg/Universal/SerialDxe/SerialDxe.inf 192 193 # Simple TextIn/TextOut for UEFI Terminal 194 # This is simpler than generic serial console and may be used for debug 195 #INF EmbeddedPkg/SimpleTextInOutSerial/SimpleTextInOutSerial.inf 196 197 INF ArmPkg/Drivers/ArmGic/ArmGicDxe.inf 198 INF ArmPkg/Drivers/TimerDxe/TimerDxe.inf 199 INF ArmPlatformPkg/Drivers/SP805WatchdogDxe/SP805WatchdogDxe.inf 200 201 # 202 # FAT filesystem + GPT/MBR partitioning 203 # 204 INF OpenPlatformPkg/Drivers/Block/ramdisk/ramdisk.inf 205 INF MdeModulePkg/Universal/Disk/DiskIoDxe/DiskIoDxe.inf 206 INF MdeModulePkg/Universal/Disk/PartitionDxe/PartitionDxe.inf 207 INF FatBinPkg/EnhancedFatDxe/Fat.inf 208 INF MdeModulePkg/Universal/Disk/UnicodeCollation/EnglishDxe/EnglishDxe.inf 209 INF IntelFrameworkModulePkg/Universal/StatusCode/RuntimeDxe/StatusCodeRuntimeDxe.inf 210 211 INF OpenPlatformPkg/Chips/Hisilicon/Drivers/SasV1Dxe/SasV1Dxe.inf 212 INF MdeModulePkg/Bus/Scsi/ScsiBusDxe/ScsiBusDxe.inf 213 INF MdeModulePkg/Bus/Scsi/ScsiDiskDxe/ScsiDiskDxe.inf 214 INF OpenPlatformPkg/Chips/Hisilicon/Pv660/Drivers/SasInitDxe/SasV1Init.inf 215 216 INF MdeModulePkg/Universal/SmbiosDxe/SmbiosDxe.inf 217 INF OpenPlatformPkg/Chips/Hisilicon/Drivers/Smbios/SmbiosMiscDxe/SmbiosMiscDxe.inf 218 INF OpenPlatformPkg/Chips/Hisilicon/Drivers/Smbios/MemorySubClassDxe/MemorySubClassDxe.inf 219 INF OpenPlatformPkg/Chips/Hisilicon/Drivers/Smbios/ProcessorSubClassDxe/ProcessorSubClassDxe.inf 220 221 # 222 #ACPI 223 # 224 INF MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableDxe.inf 225 INF MdeModulePkg/Universal/Acpi/AcpiPlatformDxe/AcpiPlatformDxe.inf 226 227 INF RuleOverride=ACPITABLE OpenPlatformPkg/Chips/Hisilicon/Pv660/Pv660AcpiTables/AcpiTables.inf 228 INF OpenPlatformPkg/Chips/Hisilicon/Drivers/AcpiPlatformDxe/AcpiPlatformDxe.inf 229 230 # 231 #Network 232 # 233 INF OpenPlatformPkg/Platforms/Hisilicon/Binary/D02/Drivers/SnpPV600Dxe_PLAT/SnpPV600DxeMac4PhyInitOnly.inf 234 INF OpenPlatformPkg/Platforms/Hisilicon/Binary/D02/Drivers/SnpPV600Dxe_PLAT/SnpPV600DxeMac5.inf 235 236 INF MdeModulePkg/Universal/Network/ArpDxe/ArpDxe.inf 237 INF MdeModulePkg/Universal/Network/Dhcp4Dxe/Dhcp4Dxe.inf 238 INF MdeModulePkg/Universal/Network/DpcDxe/DpcDxe.inf 239 INF MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Dxe.inf 240 INF MdeModulePkg/Universal/Network/MnpDxe/MnpDxe.inf 241 INF MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Dxe.inf 242 INF MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Dxe.inf 243 INF MdeModulePkg/Universal/Network/Udp4Dxe/Udp4Dxe.inf 244 INF MdeModulePkg/Universal/Network/UefiPxeBcDxe/UefiPxeBcDxe.inf 245 246 !ifdef $(FDT_ENABLE) 247 INF OpenPlatformPkg/Chips/Hisilicon/Drivers/UpdateFdtDxe/UpdateFdtDxe.inf 248 !endif #$(FDT_ENABLE) 249 250 INF OpenPlatformPkg/Chips/Hisilicon/Pv660/Drivers/UnInstallAcpiTableDxe/UnInstallAcpiTable.inf 251 252 # 253 #Sata 254 # 255 INF OpenPlatformPkg/Platforms/Hisilicon/Binary/D02/Drivers/AtaAtapiPassThru/AtaAtapiPassThru.inf 256 INF MdeModulePkg/Bus/Ata/AtaBusDxe/AtaBusDxe.inf 257 258 # 259 # USB Support 260 # 261 INF OpenPlatformPkg/Chips/Hisilicon/Drivers/VirtualEhciPciIo/VirtualEhciPciIo.inf 262 INF MdeModulePkg/Bus/Pci/EhciDxe/EhciDxe.inf 263 INF MdeModulePkg/Bus/Usb/UsbBusDxe/UsbBusDxe.inf 264 INF MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassStorageDxe.inf 265 266 # 267 # UEFI application (Shell Embedded Boot Loader) 268 # 269 INF OpenPlatformPkg/Platforms/Hisilicon/Binary/D02/Ebl/Ebl.inf 270 271 # 272 # Build Shell from latest source code instead of prebuilt binary 273 # 274 INF ShellPkg/Application/Shell/Shell.inf 275 276 # 277 # Bds 278 # 279 INF MdeModulePkg/Universal/DevicePathDxe/DevicePathDxe.inf 280 281 INF MdeModulePkg/Universal/MemoryTest/GenericMemoryTestDxe/GenericMemoryTestDxe.inf 282 INF MdeModulePkg/Universal/DisplayEngineDxe/DisplayEngineDxe.inf 283 INF MdeModulePkg/Universal/SetupBrowserDxe/SetupBrowserDxe.inf 284 INF IntelFrameworkModulePkg/Universal/BdsDxe/BdsDxe.inf 285 286 [FV.FVMAIN_COMPACT] 287 FvAlignment = 16 288 ERASE_POLARITY = 1 289 MEMORY_MAPPED = TRUE 290 STICKY_WRITE = TRUE 291 LOCK_CAP = TRUE 292 LOCK_STATUS = TRUE 293 WRITE_DISABLED_CAP = TRUE 294 WRITE_ENABLED_CAP = TRUE 295 WRITE_STATUS = TRUE 296 WRITE_LOCK_CAP = TRUE 297 WRITE_LOCK_STATUS = TRUE 298 READ_DISABLED_CAP = TRUE 299 READ_ENABLED_CAP = TRUE 300 READ_STATUS = TRUE 301 READ_LOCK_CAP = TRUE 302 READ_LOCK_STATUS = TRUE 303 304 INF ArmPlatformPkg/PrePeiCore/PrePeiCoreMPCore.inf 305 INF MdeModulePkg/Core/Pei/PeiMain.inf 306 INF ArmPlatformPkg/PlatformPei/PlatformPeim.inf 307 INF OpenPlatformPkg/Chips/Hisilicon/Drivers/VersionInfoPeim/VersionInfoPeim.inf 308 INF OpenPlatformPkg/Platforms/Hisilicon/Binary/D02/MemoryInitPei/MemoryInitPeim.inf 309 INF ArmPkg/Drivers/CpuPei/CpuPei.inf 310 INF MdeModulePkg/Universal/PCD/Pei/Pcd.inf 311 INF IntelFrameworkModulePkg/Universal/StatusCode/Pei/StatusCodePei.inf 312 313 INF OpenPlatformPkg/Platforms/Hisilicon/D02/EarlyConfigPeim/EarlyConfigPeim.inf 314 INF MdeModulePkg/Core/DxeIplPeim/DxeIpl.inf 315 316 FILE FV_IMAGE = 9E21FD93-9C72-4c15-8C4B-E77F1DB2D792 { 317 SECTION GUIDED EE4E5898-3914-4259-9D6E-DC7BD79403CF PROCESSING_REQUIRED = TRUE { 318 SECTION FV_IMAGE = FVMAIN 319 } 320 } 321 322 323 !include OpenPlatformPkg/Chips/Hisilicon/Hisilicon.fdf.inc 324 325