--- /dev/null
+#\r
+# Copyright (c) 2018, Linaro Limited. All rights reserved.\r
+#\r
+# This program and the accompanying materials\r
+# are licensed and made available under the terms and conditions of the BSD License\r
+# which accompanies this distribution. The full text of the license may be found at\r
+# http://opensource.org/licenses/bsd-license.php\r
+#\r
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+#\r
+\r
+################################################################################\r
+#\r
+# FD Section\r
+# The [FD] Section is made up of the definition statements and a\r
+# description of what goes into the Flash Device Image. Each FD section\r
+# defines one flash "device" image. A flash device image may be one of\r
+# the following: Removable media bootable image (like a boot floppy\r
+# image,) an Option ROM image (that would be "flashed" into an add-in\r
+# card,) a System "Flash" image (that would be burned into a system's\r
+# flash) or an Update ("Capsule") image that will be used to update and\r
+# existing system flash.\r
+#\r
+################################################################################\r
+\r
+[FD.sdm845Pkg_UEFI]\r
+BaseAddress = 0xd0000000|gArmTokenSpaceGuid.PcdFdBaseAddress # The base address of the Firmware in NOR Flash.\r
+Size = 0x00200000|gArmTokenSpaceGuid.PcdFdSize # The size in bytes of the FLASH Device\r
+ErasePolarity = 1\r
+\r
+# This one is tricky, it must be: BlockSize * NumBlocks = Size\r
+BlockSize = 0x00001000\r
+NumBlocks = 0x200\r
+\r
+################################################################################\r
+#\r
+# Following are lists of FD Region layout which correspond to the locations of different\r
+# images within the flash device.\r
+#\r
+# Regions must be defined in ascending order and may not overlap.\r
+#\r
+# A Layout Region start with a eight digit hex offset (leading "0x" required) followed by\r
+# the pipe "|" character, followed by the size of the region, also in hex with the leading\r
+# "0x" characters. Like:\r
+# Offset|Size\r
+# PcdOffsetCName|PcdSizeCName\r
+# RegionType <FV, DATA, or FILE>\r
+#\r
+################################################################################\r
+\r
+# from ArmVirtPkg/ArmVirtQemuKernel.fdf\r
+#\r
+# Implement the Linux kernel header layout so that the loader will identify\r
+# it as something bootable, and execute it with a FDT pointer in x0 or r2.\r
+#\r
+0x00000000|0x00008000\r
+DATA = {\r
+ 0x01, 0x00, 0x00, 0x10, # code0: adr x1, .\r
+ 0xff, 0x1f, 0x00, 0x14, # code1: b 0x8000\r
+ 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, # text_offset: 512 KB\r
+ 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, # image_size: 2 MB\r
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, # flags\r
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, # res2\r
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, # res3\r
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, # res4\r
+ 0x41, 0x52, 0x4d, 0x64, # magic: "ARM\x64"\r
+ 0x00, 0x00, 0x00, 0x00 # res5\r
+}\r
+\r
+0x00008000|0x001f8000\r
+gArmTokenSpaceGuid.PcdFvBaseAddress|gArmTokenSpaceGuid.PcdFvSize\r
+FV = FVMAIN_COMPACT\r
+\r
+\r
+################################################################################\r
+#\r
+# FV Section\r
+#\r
+# [FV] section is used to define what components or modules are placed within a flash\r
+# device file. This section also defines order the components and modules are positioned\r
+# within the image. The [FV] section consists of define statements, set statements and\r
+# module statements.\r
+#\r
+################################################################################\r
+\r
+[FV.FvMain]\r
+BlockSize = 0x40\r
+NumBlocks = 0 # This FV gets compressed so make it just big enough\r
+FvAlignment = 8 # FV alignment and FV attributes setting.\r
+ERASE_POLARITY = 1\r
+MEMORY_MAPPED = TRUE\r
+STICKY_WRITE = TRUE\r
+LOCK_CAP = TRUE\r
+LOCK_STATUS = TRUE\r
+WRITE_DISABLED_CAP = TRUE\r
+WRITE_ENABLED_CAP = TRUE\r
+WRITE_STATUS = TRUE\r
+WRITE_LOCK_CAP = TRUE\r
+WRITE_LOCK_STATUS = TRUE\r
+READ_DISABLED_CAP = TRUE\r
+READ_ENABLED_CAP = TRUE\r
+READ_STATUS = TRUE\r
+READ_LOCK_CAP = TRUE\r
+READ_LOCK_STATUS = TRUE\r
+\r
+ APRIORI DXE {\r
+ INF MdeModulePkg/Universal/PCD/Dxe/Pcd.inf\r
+ }\r
+\r
+ INF MdeModulePkg/Core/Dxe/DxeMain.inf\r
+\r
+ #\r
+ # PI DXE Drivers producing Architectural Protocols (EFI Services)\r
+ #\r
+ INF ArmPkg/Drivers/CpuDxe/CpuDxe.inf\r
+ INF MdeModulePkg/Core/RuntimeDxe/RuntimeDxe.inf\r
+ INF MdeModulePkg/Universal/SecurityStubDxe/SecurityStubDxe.inf\r
+ INF MdeModulePkg/Universal/CapsuleRuntimeDxe/CapsuleRuntimeDxe.inf\r
+ INF EmbeddedPkg/EmbeddedMonotonicCounter/EmbeddedMonotonicCounter.inf\r
+ INF MdeModulePkg/Universal/ResetSystemRuntimeDxe/ResetSystemRuntimeDxe.inf\r
+ INF EmbeddedPkg/RealTimeClockRuntimeDxe/RealTimeClockRuntimeDxe.inf\r
+ INF EmbeddedPkg/MetronomeDxe/MetronomeDxe.inf\r
+\r
+ FILE DRIVER = af9763a2-033b-4109-8e17-56a98d380c92 {\r
+ SECTION DXE_DEPEX = sdm845Pkg/Binary/enchilada/HWIODxeDriver/HWIODxeDriver.depex\r
+ SECTION PE32 = sdm845Pkg/Binary/enchilada/HWIODxeDriver/HWIODxeDriver.efi\r
+ SECTION UI = "HWIODxeDriver"\r
+ }\r
+\r
+ FILE DRIVER = 5776232e-082d-4b75-9a0e-fe1d13f7a5d9 {\r
+ SECTION DXE_DEPEX = sdm845Pkg/Binary/enchilada/PmicDxe/PmicDxe.depex\r
+ SECTION PE32 = sdm845Pkg/Binary/enchilada/PmicDxe/PmicDxe.efi\r
+ SECTION UI = "PmicDxe"\r
+ }\r
+\r
+ FILE DRIVER = 5bd181db-0487-4f1a-ae73-820e165611b3 {\r
+ SECTION DXE_DEPEX = sdm845Pkg/Binary/enchilada/ButtonsDxe/ButtonsDxe.depex\r
+ SECTION PE32 = sdm845Pkg/Binary/enchilada/ButtonsDxe/ButtonsDxe.efi\r
+ SECTION UI = "ButtonsDxe"\r
+ }\r
+\r
+ #\r
+ # Multiple Console IO support\r
+ #\r
+ INF MdeModulePkg/Universal/Console/ConPlatformDxe/ConPlatformDxe.inf\r
+ INF MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitterDxe.inf\r
+ INF MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsoleDxe.inf\r
+ INF MdeModulePkg/Universal/Console/TerminalDxe/TerminalDxe.inf\r
+ INF MdeModulePkg/Universal/SerialDxe/SerialDxe.inf\r
+\r
+ INF ArmPkg/Drivers/ArmGic/ArmGicDxe.inf\r
+ INF ArmPkg/Drivers/TimerDxe/TimerDxe.inf\r
+\r
+ INF MdeModulePkg/Universal/WatchdogTimerDxe/WatchdogTimer.inf\r
+\r
+ INF MdeModulePkg/Universal/PCD/Dxe/Pcd.inf\r
+\r
+ FILE DRIVER = 3299a266-15f0-4346-8318-716336736d3e {\r
+ SECTION DXE_DEPEX = sdm845Pkg/Binary/enchilada/UsbDeviceDxe/UsbDeviceDxe.depex\r
+ SECTION PE32 = sdm845Pkg/Binary/enchilada/UsbDeviceDxe/UsbDeviceDxe.efi\r
+ SECTION UI = "UsbDeviceDxe"\r
+ }\r
+\r
+ FILE DRIVER = 11faed4c-b21f-4d88-8e48-c4c28a1e50df {\r
+ SECTION DXE_DEPEX = sdm845Pkg/Binary/enchilada/UsbPwrCtrlDxe/UsbPwrCtrlDxe.depex\r
+ SECTION PE32 = sdm845Pkg/Binary/enchilada/UsbPwrCtrlDxe/UsbPwrCtrlDxe.efi\r
+ SECTION UI = "UsbPwrCtrlDxe"\r
+ }\r
+\r
+ FILE DRIVER = 5af77f10-90df-4e7e-8325-a17ec09d5443 {\r
+ SECTION DXE_DEPEX = sdm845Pkg/Binary/enchilada/UsbMsdDxe/UsbMsdDxe.depex\r
+ SECTION PE32 = sdm845Pkg/Binary/enchilada/UsbMsdDxe/UsbMsdDxe.efi\r
+ SECTION UI = "UsbMsdDxe"\r
+ }\r
+\r
+ FILE DRIVER = 94f8a6a7-dc34-4101-88c1-99179cceae83 {\r
+ SECTION DXE_DEPEX = sdm845Pkg/Binary/enchilada/UsbfnDwc3Dxe/UsbfnDwc3Dxe.depex\r
+ SECTION PE32 = sdm845Pkg/Binary/enchilada/UsbfnDwc3Dxe/UsbfnDwc3Dxe.efi\r
+ SECTION UI = "UsbfnDwc3Dxe"\r
+ }\r
+\r
+ FILE DRIVER = cd823a4d-7dec-4531-ae5d-4134fa4127b8 {\r
+ SECTION DXE_DEPEX = sdm845Pkg/Binary/enchilada/UsbConfigDxe/UsbConfigDxe.depex\r
+ SECTION PE32 = sdm845Pkg/Binary/enchilada/UsbConfigDxe/UsbConfigDxe.efi\r
+ SECTION UI = "UsbConfigDxe"\r
+ }\r
+\r
+ #\r
+ # GPIO\r
+ #\r
+\r
+ #\r
+ # Virtual Keyboard\r
+ #\r
+ INF EmbeddedPkg/Drivers/VirtualKeyboardDxe/VirtualKeyboardDxe.inf\r
+\r
+ INF sdm845Pkg/sdm845Dxe/sdm845Dxe.inf\r
+ INF sdm845Pkg/SimpleFbDxe/SimpleFbDxe.inf\r
+\r
+ FILE DRIVER = 0d35cd8e-97ea-4f9a-96af-0f0d89f76567 {\r
+ SECTION DXE_DEPEX = sdm845Pkg/Binary/enchilada/UFSDxe/UFSDxe.depex\r
+ SECTION PE32 = sdm845Pkg/Binary/enchilada/UFSDxe/UFSDxe.efi\r
+ SECTION UI = "UFSDxe"\r
+ }\r
+ FILE DRIVER = 2a7b4bef-80cd-49e1-b473-374ba4d673fc {\r
+ SECTION DXE_DEPEX = sdm845Pkg/Binary/enchilada/SPMI/SPMI.depex\r
+ SECTION PE32 = sdm845Pkg/Binary/enchilada/SPMI/SPMI.efi\r
+ SECTION UI = "SPMI"\r
+ }\r
+\r
+ FILE DRIVER = f541d663-4a48-40aa-aabf-ff158ccae34c {\r
+ SECTION DXE_DEPEX = sdm845Pkg/Binary/enchilada/SmemDxe/SmemDxe.depex\r
+ SECTION PE32 = sdm845Pkg/Binary/enchilada/SmemDxe/SmemDxe.efi\r
+ SECTION UI = "SmemDxe"\r
+ }\r
+ \r
+ FILE DRIVER = 10e193df-9966-44e7-b17c-59dd831e20fc {\r
+ SECTION DXE_DEPEX = sdm845Pkg/Binary/enchilada/ChipInfo/ChipInfo.depex\r
+ SECTION PE32 = sdm845Pkg/Binary/enchilada/ChipInfo/ChipInfo.efi\r
+ SECTION UI = "ChipInfo"\r
+ }\r
+\r
+ #FILE DRIVER = 7a32bd23-f735-4f57-aa1a-447d2fe3be0d {\r
+ # SECTION DXE_DEPEX = sdm845Pkg/Binary/enchilada/SPI/SPI.depex\r
+ # SECTION PE32 = sdm845Pkg/Binary/enchilada/SPI/SPI.efi\r
+ # SECTION UI = "SPI"\r
+ #}\r
+\r
+\r
+ #\r
+ # USB Host Support\r
+ #\r
+ INF MdeModulePkg/Bus/Usb/UsbBusDxe/UsbBusDxe.inf\r
+\r
+ #\r
+ # USB Mass Storage Support\r
+ #\r
+ INF MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassStorageDxe.inf\r
+\r
+ #\r
+ # USB Peripheral Support\r
+ #\r
+ INF EmbeddedPkg/Drivers/AndroidFastbootTransportUsbDxe/FastbootTransportUsbDxe.inf\r
+\r
+ #\r
+ # Fastboot\r
+ #\r
+ INF EmbeddedPkg/Application/AndroidFastboot/AndroidFastbootApp.inf\r
+\r
+ #\r
+ # FAT filesystem + GPT/MBR partitioning\r
+ #\r
+ INF MdeModulePkg/Universal/Disk/DiskIoDxe/DiskIoDxe.inf\r
+ INF MdeModulePkg/Universal/Disk/PartitionDxe/PartitionDxe.inf\r
+ INF FatPkg/EnhancedFatDxe/Fat.inf\r
+ INF MdeModulePkg/Universal/Disk/UnicodeCollation/EnglishDxe/EnglishDxe.inf\r
+\r
+ INF MdeModulePkg/Universal/Variable/RuntimeDxe/VariableRuntimeDxe.inf\r
+\r
+ INF MdeModulePkg/Universal/HiiDatabaseDxe/HiiDatabaseDxe.inf\r
+\r
+ #\r
+ # ACPI Support\r
+ #\r
+ INF MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableDxe.inf\r
+ INF MdeModulePkg/Universal/Acpi/AcpiPlatformDxe/AcpiPlatformDxe.inf\r
+ INF MdeModulePkg/Universal/Acpi/BootGraphicsResourceTableDxe/BootGraphicsResourceTableDxe.inf\r
+ # INF RuleOverride = ACPITABLE sdm845Pkg/AcpiTables/AcpiTables.inf\r
+\r
+ FILE FREEFORM = 7E374E25-8E01-4FEE-87F2-390C23C606CD {\r
+ # SECTION RAW = sdm845Pkg/AcpiTables/minimal/DBG2.aml\r
+ # SECTION RAW = sdm845Pkg/AcpiTables/minimal/DSDT.aml\r
+ # SECTION RAW = sdm845Pkg/AcpiTables/minimal/FACP.aml\r
+ # SECTION RAW = sdm845Pkg/AcpiTables/minimal/GTDT.aml\r
+ # SECTION RAW = sdm845Pkg/AcpiTables/minimal/APIC.aml\r
+ SECTION RAW = sdm845Pkg/AcpiTables/testing/DBG2.aml\r
+ SECTION RAW = sdm845Pkg/AcpiTables/testing/DSDT.aml\r
+ SECTION RAW = sdm845Pkg/AcpiTables/testing/CSRT.aml\r
+ SECTION RAW = sdm845Pkg/AcpiTables/testing/FADT.aml\r
+ SECTION RAW = sdm845Pkg/AcpiTables/testing/FACS.aml\r
+ SECTION RAW = sdm845Pkg/AcpiTables/testing/GTDT.aml\r
+ SECTION RAW = sdm845Pkg/AcpiTables/testing/IORT.aml\r
+ SECTION RAW = sdm845Pkg/AcpiTables/testing/MCFG.aml\r
+ SECTION RAW = sdm845Pkg/AcpiTables/testing/MADT.aml\r
+ SECTION RAW = sdm845Pkg/AcpiTables/testing/PPTT.aml\r
+ SECTION RAW = sdm845Pkg/AcpiTables/testing/TPM2.aml\r
+ SECTION UI = "AcpiTables"\r
+ }\r
+\r
+ #\r
+ # SMBIOS Support\r
+ #\r
+ INF sdm845Pkg/Drivers/SmbiosPlatformDxe/SmbiosPlatformDxe.inf\r
+ INF MdeModulePkg/Universal/SmbiosDxe/SmbiosDxe.inf\r
+\r
+ #\r
+ # UEFI applications\r
+ #\r
+ INF ShellPkg/Application/Shell/Shell.inf\r
+!ifdef $(INCLUDE_TFTP_COMMAND)\r
+ INF ShellPkg/DynamicCommand/TftpDynamicCommand/TftpDynamicCommand.inf\r
+!endif #$(INCLUDE_TFTP_COMMAND)\r
+\r
+ #\r
+ # Bds\r
+ #\r
+ INF MdeModulePkg/Universal/PrintDxe/PrintDxe.inf\r
+ INF MdeModulePkg/Universal/DevicePathDxe/DevicePathDxe.inf\r
+ INF MdeModulePkg/Universal/DisplayEngineDxe/DisplayEngineDxe.inf\r
+ INF MdeModulePkg/Universal/SetupBrowserDxe/SetupBrowserDxe.inf\r
+ INF MdeModulePkg/Universal/DriverHealthManagerDxe/DriverHealthManagerDxe.inf\r
+ INF MdeModulePkg/Universal/BdsDxe/BdsDxe.inf\r
+ INF MdeModulePkg/Application/UiApp/UiApp.inf\r
+ INF sdm845Pkg/Drivers/LogoDxe/LogoDxe.inf\r
+\r
+[FV.FVMAIN_COMPACT]\r
+FvAlignment = 8\r
+ERASE_POLARITY = 1\r
+MEMORY_MAPPED = TRUE\r
+STICKY_WRITE = TRUE\r
+LOCK_CAP = TRUE\r
+LOCK_STATUS = TRUE\r
+WRITE_DISABLED_CAP = TRUE\r
+WRITE_ENABLED_CAP = TRUE\r
+WRITE_STATUS = TRUE\r
+WRITE_LOCK_CAP = TRUE\r
+WRITE_LOCK_STATUS = TRUE\r
+READ_DISABLED_CAP = TRUE\r
+READ_ENABLED_CAP = TRUE\r
+READ_STATUS = TRUE\r
+READ_LOCK_CAP = TRUE\r
+READ_LOCK_STATUS = TRUE\r
+\r
+ INF ArmPlatformPkg/PrePi/PeiUniCore.inf\r
+\r
+ FILE FV_IMAGE = 9E21FD93-9C72-4c15-8C4B-E77F1DB2D792 {\r
+ SECTION GUIDED EE4E5898-3914-4259-9D6E-DC7BD79403CF PROCESSING_REQUIRED = TRUE {\r
+ SECTION FV_IMAGE = FVMAIN\r
+ }\r
+ }\r
+\r
+!include sdm845Pkg/CommonFdf.fdf.inc\r
+\r
+\r