--- /dev/null
+#\r
+# Copyright (c) 2021, ARM Limited. All rights reserved.\r
+#\r
+# SPDX-License-Identifier: BSD-2-Clause-Patent\r
+#\r
+#\r
+\r
+################################################################################\r
+#\r
+# Defines Section - statements that will be processed to create a Makefile.\r
+#\r
+################################################################################\r
+[Defines]\r
+ PLATFORM_NAME = ArmVirtCloudHv\r
+ PLATFORM_GUID = DFFED32B-DFFE-D32B-DFFE-D32BDFFED32B\r
+ PLATFORM_VERSION = 0.1\r
+ DSC_SPECIFICATION = 0x00010005\r
+ OUTPUT_DIRECTORY = Build/ArmVirtCloudHv-$(ARCH)\r
+ SUPPORTED_ARCHITECTURES = AARCH64|ARM\r
+ BUILD_TARGETS = DEBUG|RELEASE|NOOPT\r
+ SKUID_IDENTIFIER = DEFAULT\r
+ FLASH_DEFINITION = ArmVirtPkg/ArmVirtCloudHv.fdf\r
+\r
+ #\r
+ # Defines for default states. These can be changed on the command line.\r
+ # -D FLAG=VALUE\r
+ #\r
+ DEFINE TTY_TERMINAL = FALSE\r
+ DEFINE SECURE_BOOT_ENABLE = FALSE\r
+\r
+!include ArmVirtPkg/ArmVirt.dsc.inc\r
+\r
+[LibraryClasses.common]\r
+ ArmLib|ArmPkg/Library/ArmLib/ArmBaseLib.inf\r
+ ArmMmuLib|ArmPkg/Library/ArmMmuLib/ArmMmuBaseLib.inf\r
+\r
+ # Virtio Support\r
+ VirtioLib|OvmfPkg/Library/VirtioLib/VirtioLib.inf\r
+ VirtioMmioDeviceLib|OvmfPkg/Library/VirtioMmioDeviceLib/VirtioMmioDeviceLib.inf\r
+\r
+ ArmPlatformLib|ArmPlatformPkg/Library/ArmPlatformLibNull/ArmPlatformLibNull.inf\r
+\r
+ TimerLib|ArmPkg/Library/ArmArchTimerLib/ArmArchTimerLib.inf\r
+ CapsuleLib|MdeModulePkg/Library/DxeCapsuleLibNull/DxeCapsuleLibNull.inf\r
+ BootLogoLib|MdeModulePkg/Library/BootLogoLib/BootLogoLib.inf\r
+ PlatformBootManagerLib|ArmPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf\r
+ PlatformBmPrintScLib|OvmfPkg/Library/PlatformBmPrintScLib/PlatformBmPrintScLib.inf\r
+ CustomizedDisplayLib|MdeModulePkg/Library/CustomizedDisplayLib/CustomizedDisplayLib.inf\r
+ FrameBufferBltLib|MdeModulePkg/Library/FrameBufferBltLib/FrameBufferBltLib.inf\r
+ QemuBootOrderLib|OvmfPkg/Library/QemuBootOrderLib/QemuBootOrderLib.inf\r
+ FileExplorerLib|MdeModulePkg/Library/FileExplorerLib/FileExplorerLib.inf\r
+ PciPcdProducerLib|ArmVirtPkg/Library/FdtPciPcdProducerLib/FdtPciPcdProducerLib.inf\r
+ PciSegmentLib|MdePkg/Library/BasePciSegmentLibPci/BasePciSegmentLibPci.inf\r
+ PciHostBridgeLib|ArmVirtPkg/Library/FdtPciHostBridgeLib/FdtPciHostBridgeLib.inf\r
+ PciHostBridgeUtilityLib|ArmVirtPkg/Library/ArmVirtPciHostBridgeUtilityLib/ArmVirtPciHostBridgeUtilityLib.inf\r
+\r
+ TpmMeasurementLib|MdeModulePkg/Library/TpmMeasurementLibNull/TpmMeasurementLibNull.inf\r
+\r
+!include MdePkg/MdeLibs.dsc.inc\r
+\r
+[LibraryClasses.common.PEIM]\r
+ ArmVirtMemInfoLib|ArmVirtPkg/Library/QemuVirtMemInfoLib/QemuVirtMemInfoPeiLib.inf\r
+\r
+[LibraryClasses.common.DXE_DRIVER]\r
+ ReportStatusCodeLib|MdeModulePkg/Library/DxeReportStatusCodeLib/DxeReportStatusCodeLib.inf\r
+\r
+[LibraryClasses.common.UEFI_DRIVER]\r
+ UefiScsiLib|MdePkg/Library/UefiScsiLib/UefiScsiLib.inf\r
+\r
+[BuildOptions]\r
+!include NetworkPkg/NetworkBuildOptions.dsc.inc\r
+\r
+################################################################################\r
+#\r
+# Pcd Section - list of all EDK II PCD Entries defined by this Platform\r
+#\r
+################################################################################\r
+\r
+[PcdsFeatureFlag.common]\r
+ ## If TRUE, Graphics Output Protocol will be installed on virtual handle created by ConsplitterDxe.\r
+ # It could be set FALSE to save size.\r
+ gEfiMdeModulePkgTokenSpaceGuid.PcdConOutGopSupport|TRUE\r
+ gEfiMdeModulePkgTokenSpaceGuid.PcdConOutUgaSupport|FALSE\r
+\r
+ gEfiMdeModulePkgTokenSpaceGuid.PcdTurnOffUsbLegacySupport|TRUE\r
+\r
+[PcdsFixedAtBuild.common]\r
+!if $(ARCH) == AARCH64\r
+ gArmTokenSpaceGuid.PcdVFPEnabled|1\r
+!endif\r
+\r
+ gArmPlatformTokenSpaceGuid.PcdCPUCoresStackBase|0x4007c000\r
+ gEfiMdeModulePkgTokenSpaceGuid.PcdEmuVariableNvStoreReserved|0\r
+ gArmPlatformTokenSpaceGuid.PcdCPUCorePrimaryStackSize|0x4000\r
+ gEfiMdeModulePkgTokenSpaceGuid.PcdMaxVariableSize|0x2000\r
+ gEfiMdeModulePkgTokenSpaceGuid.PcdMaxAuthVariableSize|0x2800\r
+\r
+ # Rsdp base address in Cloud Hypervisor\r
+ gArmVirtTokenSpaceGuid.PcdCloudHvAcpiRsdpBaseAddress|0x40200000\r
+\r
+ gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableBase|0x4000000\r
+ gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableSize|0x40000\r
+ gEfiMdeModulePkgTokenSpaceGuid.PcdEmuVariableNvModeEnable|TRUE\r
+!if $(NETWORK_TLS_ENABLE) == TRUE\r
+ #\r
+ # The cumulative and individual VOLATILE variable size limits should be set\r
+ # high enough for accommodating several and/or large CA certificates.\r
+ #\r
+ gEfiMdeModulePkgTokenSpaceGuid.PcdVariableStoreSize|0x80000\r
+ gEfiMdeModulePkgTokenSpaceGuid.PcdMaxVolatileVariableSize|0x40000\r
+!endif\r
+\r
+ # Size of the region used by UEFI in permanent memory (Reserved 64MB)\r
+ gArmPlatformTokenSpaceGuid.PcdSystemMemoryUefiRegionSize|0x04000000\r
+\r
+ #\r
+ # ARM PrimeCell\r
+ #\r
+\r
+ ## PL011 - Serial Terminal\r
+ gEfiMdePkgTokenSpaceGuid.PcdUartDefaultBaudRate|38400\r
+\r
+ ## Default Terminal Type\r
+ ## 0-PCANSI, 1-VT100, 2-VT00+, 3-UTF8, 4-TTYTERM\r
+ gEfiMdePkgTokenSpaceGuid.PcdDefaultTerminalType|4\r
+\r
+ # System Memory Base -- fixed at 0x4000_0000\r
+ gArmTokenSpaceGuid.PcdSystemMemoryBase|0x40000000\r
+\r
+ # initial location of the device tree blob passed by Cloud Hypervisor -- base of DRAM\r
+ gArmVirtTokenSpaceGuid.PcdDeviceTreeInitialBaseAddress|0x40000000\r
+\r
+ gEfiMdeModulePkgTokenSpaceGuid.PcdResetOnMemoryTypeInformationChange|FALSE\r
+ gEfiMdeModulePkgTokenSpaceGuid.PcdBootManagerMenuFile|{ 0x21, 0xaa, 0x2c, 0x46, 0x14, 0x76, 0x03, 0x45, 0x83, 0x6e, 0x8a, 0xb6, 0xf4, 0x66, 0x23, 0x31 }\r
+\r
+ #\r
+ # The maximum physical I/O addressability of the processor, set with\r
+ # BuildCpuHob().\r
+ #\r
+ gEmbeddedTokenSpaceGuid.PcdPrePiCpuIoSize|16\r
+\r
+ #\r
+ # Enable the non-executable DXE stack. (This gets set up by DxeIpl)\r
+ #\r
+ gEfiMdeModulePkgTokenSpaceGuid.PcdSetNxForStack|TRUE\r
+\r
+!if $(SECURE_BOOT_ENABLE) == TRUE\r
+ # override the default values from SecurityPkg to ensure images from all sources are verified in secure boot\r
+ gEfiSecurityPkgTokenSpaceGuid.PcdOptionRomImageVerificationPolicy|0x04\r
+ gEfiSecurityPkgTokenSpaceGuid.PcdFixedMediaImageVerificationPolicy|0x04\r
+ gEfiSecurityPkgTokenSpaceGuid.PcdRemovableMediaImageVerificationPolicy|0x04\r
+!endif\r
+\r
+ gEfiMdePkgTokenSpaceGuid.PcdReportStatusCodePropertyMask|3\r
+ gEfiShellPkgTokenSpaceGuid.PcdShellFileOperationSize|0x20000\r
+\r
+[PcdsFixedAtBuild.AARCH64]\r
+ # Clearing BIT0 in this PCD prevents installing a 32-bit SMBIOS entry point,\r
+ # if the entry point version is >= 3.0. AARCH64 OSes cannot assume the\r
+ # presence of the 32-bit entry point anyway (because many AARCH64 systems\r
+ # don't have 32-bit addressable physical RAM), and the additional allocations\r
+ # below 4 GB needlessly fragment the memory map. So expose the 64-bit entry\r
+ # point only, for entry point versions >= 3.0.\r
+ gEfiMdeModulePkgTokenSpaceGuid.PcdSmbiosEntryPointProvideMethod|0x2\r
+\r
+[PcdsDynamicDefault.common]\r
+ gEfiMdePkgTokenSpaceGuid.PcdPlatformBootTimeOut|3\r
+\r
+ ## If TRUE, OvmfPkg/AcpiPlatformDxe will not wait for PCI\r
+ # enumeration to complete before installing ACPI tables.\r
+ gEfiMdeModulePkgTokenSpaceGuid.PcdPciDisableBusEnumeration|TRUE\r
+\r
+ # System Memory Size -- 1 MB initially, actual size will be fetched from DT\r
+ gArmTokenSpaceGuid.PcdSystemMemorySize|0x00100000\r
+\r
+ gArmTokenSpaceGuid.PcdArmArchTimerSecIntrNum|0x0\r
+ gArmTokenSpaceGuid.PcdArmArchTimerIntrNum|0x0\r
+ gArmTokenSpaceGuid.PcdArmArchTimerVirtIntrNum|0x0\r
+ gArmTokenSpaceGuid.PcdArmArchTimerHypIntrNum|0x0\r
+\r
+ #\r
+ # ARM General Interrupt Controller\r
+ #\r
+ gArmTokenSpaceGuid.PcdGicDistributorBase|0x0\r
+ gArmTokenSpaceGuid.PcdGicRedistributorsBase|0x0\r
+ gArmTokenSpaceGuid.PcdGicInterruptInterfaceBase|0x0\r
+\r
+ ## PL031 RealTimeClock\r
+ gArmPlatformTokenSpaceGuid.PcdPL031RtcBase|0x0\r
+\r
+ # set PcdPciExpressBaseAddress to MAX_UINT64, which signifies that this\r
+ # PCD and PcdPciDisableBusEnumeration above have not been assigned yet\r
+ gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseAddress|0xFFFFFFFFFFFFFFFF\r
+\r
+ gArmTokenSpaceGuid.PcdPciIoTranslation|0\r
+\r
+ gEfiSecurityPkgTokenSpaceGuid.PcdTpmBaseAddress|0x0\r
+\r
+[PcdsDynamicHii]\r
+ gArmVirtTokenSpaceGuid.PcdForceNoAcpi|L"ForceNoAcpi"|gArmVirtVariableGuid|0x0|FALSE|NV,BS\r
+\r
+################################################################################\r
+#\r
+# Components Section - list of all EDK II Modules needed by this Platform\r
+#\r
+################################################################################\r
+[Components.common]\r
+ #\r
+ # PEI Phase modules\r
+ #\r
+ ArmPlatformPkg/PrePeiCore/PrePeiCoreUniCore.inf\r
+ MdeModulePkg/Core/Pei/PeiMain.inf\r
+ MdeModulePkg/Universal/PCD/Pei/Pcd.inf {\r
+ <LibraryClasses>\r
+ PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf\r
+ }\r
+ ArmPlatformPkg/PlatformPei/PlatformPeim.inf\r
+ ArmPlatformPkg/MemoryInitPei/MemoryInitPeim.inf\r
+ ArmPkg/Drivers/CpuPei/CpuPei.inf\r
+\r
+ MdeModulePkg/Universal/Variable/Pei/VariablePei.inf\r
+\r
+ MdeModulePkg/Core/DxeIplPeim/DxeIpl.inf {\r
+ <LibraryClasses>\r
+ NULL|MdeModulePkg/Library/LzmaCustomDecompressLib/LzmaCustomDecompressLib.inf\r
+ }\r
+\r
+ #\r
+ # DXE\r
+ #\r
+ MdeModulePkg/Core/Dxe/DxeMain.inf {\r
+ <LibraryClasses>\r
+ NULL|MdeModulePkg/Library/DxeCrc32GuidedSectionExtractLib/DxeCrc32GuidedSectionExtractLib.inf\r
+ DevicePathLib|MdePkg/Library/UefiDevicePathLib/UefiDevicePathLib.inf\r
+ }\r
+ MdeModulePkg/Universal/PCD/Dxe/Pcd.inf {\r
+ <LibraryClasses>\r
+ PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf\r
+ }\r
+\r
+ #\r
+ # Architectural Protocols\r
+ #\r
+ ArmPkg/Drivers/CpuDxe/CpuDxe.inf\r
+ MdeModulePkg/Core/RuntimeDxe/RuntimeDxe.inf\r
+ MdeModulePkg/Universal/Variable/RuntimeDxe/VariableRuntimeDxe.inf {\r
+ <LibraryClasses>\r
+ NULL|MdeModulePkg/Library/VarCheckUefiLib/VarCheckUefiLib.inf\r
+ # don't use unaligned CopyMem () on the UEFI varstore NOR flash region\r
+ BaseMemoryLib|MdePkg/Library/BaseMemoryLib/BaseMemoryLib.inf\r
+ }\r
+!if $(SECURE_BOOT_ENABLE) == TRUE\r
+ MdeModulePkg/Universal/SecurityStubDxe/SecurityStubDxe.inf {\r
+ <LibraryClasses>\r
+ NULL|SecurityPkg/Library/DxeImageVerificationLib/DxeImageVerificationLib.inf\r
+ }\r
+ SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootConfigDxe.inf\r
+ OvmfPkg/EnrollDefaultKeys/EnrollDefaultKeys.inf\r
+!else\r
+ MdeModulePkg/Universal/SecurityStubDxe/SecurityStubDxe.inf\r
+!endif\r
+ MdeModulePkg/Universal/CapsuleRuntimeDxe/CapsuleRuntimeDxe.inf\r
+ MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteDxe.inf\r
+ MdeModulePkg/Universal/MonotonicCounterRuntimeDxe/MonotonicCounterRuntimeDxe.inf\r
+ MdeModulePkg/Universal/ResetSystemRuntimeDxe/ResetSystemRuntimeDxe.inf\r
+ EmbeddedPkg/RealTimeClockRuntimeDxe/RealTimeClockRuntimeDxe.inf {\r
+ <LibraryClasses>\r
+ NULL|ArmVirtPkg/Library/ArmVirtPL031FdtClientLib/ArmVirtPL031FdtClientLib.inf\r
+ }\r
+ EmbeddedPkg/MetronomeDxe/MetronomeDxe.inf\r
+\r
+ MdeModulePkg/Universal/Console/ConPlatformDxe/ConPlatformDxe.inf\r
+ MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitterDxe.inf\r
+ MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsoleDxe.inf\r
+ MdeModulePkg/Universal/Console/TerminalDxe/TerminalDxe.inf\r
+ MdeModulePkg/Universal/SerialDxe/SerialDxe.inf\r
+\r
+ MdeModulePkg/Universal/HiiDatabaseDxe/HiiDatabaseDxe.inf\r
+\r
+ ArmPkg/Drivers/ArmGic/ArmGicDxe.inf\r
+ ArmPkg/Drivers/TimerDxe/TimerDxe.inf {\r
+ <LibraryClasses>\r
+ NULL|ArmVirtPkg/Library/ArmVirtTimerFdtClientLib/ArmVirtTimerFdtClientLib.inf\r
+ }\r
+ MdeModulePkg/Universal/WatchdogTimerDxe/WatchdogTimer.inf\r
+\r
+ #\r
+ # Status Code Routing\r
+ #\r
+ MdeModulePkg/Universal/ReportStatusCodeRouter/RuntimeDxe/ReportStatusCodeRouterRuntimeDxe.inf\r
+\r
+ #\r
+ # Platform Driver\r
+ #\r
+ ArmVirtPkg/VirtioFdtDxe/VirtioFdtDxe.inf\r
+ ArmVirtPkg/FdtClientDxe/FdtClientDxe.inf\r
+ ArmVirtPkg/HighMemDxe/HighMemDxe.inf\r
+ OvmfPkg/VirtioBlkDxe/VirtioBlk.inf\r
+ OvmfPkg/VirtioScsiDxe/VirtioScsi.inf\r
+ OvmfPkg/VirtioNetDxe/VirtioNet.inf\r
+ OvmfPkg/VirtioRngDxe/VirtioRng.inf\r
+\r
+ #\r
+ # FAT filesystem + GPT/MBR partitioning + UDF filesystem + virtio-fs\r
+ #\r
+ MdeModulePkg/Universal/Disk/DiskIoDxe/DiskIoDxe.inf\r
+ MdeModulePkg/Universal/Disk/PartitionDxe/PartitionDxe.inf\r
+ MdeModulePkg/Universal/Disk/UnicodeCollation/EnglishDxe/EnglishDxe.inf\r
+ FatPkg/EnhancedFatDxe/Fat.inf\r
+ MdeModulePkg/Universal/Disk/UdfDxe/UdfDxe.inf\r
+ OvmfPkg/VirtioFsDxe/VirtioFsDxe.inf\r
+\r
+ #\r
+ # Bds\r
+ #\r
+ MdeModulePkg/Universal/DevicePathDxe/DevicePathDxe.inf {\r
+ <LibraryClasses>\r
+ DevicePathLib|MdePkg/Library/UefiDevicePathLib/UefiDevicePathLib.inf\r
+ PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf\r
+ }\r
+ MdeModulePkg/Universal/DisplayEngineDxe/DisplayEngineDxe.inf\r
+ MdeModulePkg/Universal/SetupBrowserDxe/SetupBrowserDxe.inf\r
+ MdeModulePkg/Universal/DriverHealthManagerDxe/DriverHealthManagerDxe.inf\r
+ MdeModulePkg/Universal/BdsDxe/BdsDxe.inf\r
+ MdeModulePkg/Logo/LogoDxe.inf\r
+ MdeModulePkg/Application/UiApp/UiApp.inf {\r
+ <LibraryClasses>\r
+ NULL|MdeModulePkg/Library/DeviceManagerUiLib/DeviceManagerUiLib.inf\r
+ NULL|MdeModulePkg/Library/BootManagerUiLib/BootManagerUiLib.inf\r
+ NULL|MdeModulePkg/Library/BootMaintenanceManagerUiLib/BootMaintenanceManagerUiLib.inf\r
+ }\r
+\r
+ #\r
+ # SCSI Bus and Disk Driver\r
+ #\r
+ MdeModulePkg/Bus/Scsi/ScsiBusDxe/ScsiBusDxe.inf\r
+ MdeModulePkg/Bus/Scsi/ScsiDiskDxe/ScsiDiskDxe.inf\r
+\r
+ #\r
+ # PCI support\r
+ #\r
+ ArmPkg/Drivers/ArmPciCpuIo2Dxe/ArmPciCpuIo2Dxe.inf {\r
+ <LibraryClasses>\r
+ NULL|ArmVirtPkg/Library/FdtPciPcdProducerLib/FdtPciPcdProducerLib.inf\r
+ }\r
+ MdeModulePkg/Bus/Pci/PciHostBridgeDxe/PciHostBridgeDxe.inf\r
+ MdeModulePkg/Bus/Pci/PciBusDxe/PciBusDxe.inf {\r
+ <LibraryClasses>\r
+ NULL|ArmVirtPkg/Library/FdtPciPcdProducerLib/FdtPciPcdProducerLib.inf\r
+ }\r
+ OvmfPkg/PciHotPlugInitDxe/PciHotPlugInit.inf\r
+ OvmfPkg/VirtioPciDeviceDxe/VirtioPciDeviceDxe.inf\r
+ OvmfPkg/Virtio10Dxe/Virtio10.inf\r
+\r
+ #\r
+ # ACPI Support\r
+ #\r
+ ArmVirtPkg/CloudHvPlatformHasAcpiDtDxe/CloudHvHasAcpiDtDxe.inf\r
+[Components.AARCH64]\r
+ MdeModulePkg/Universal/Acpi/BootGraphicsResourceTableDxe/BootGraphicsResourceTableDxe.inf\r
+ ArmVirtPkg/CloudHvAcpiPlatformDxe/CloudHvAcpiPlatformDxe.inf {\r
+ <LibraryClasses>\r
+ NULL|ArmVirtPkg/Library/FdtPciPcdProducerLib/FdtPciPcdProducerLib.inf\r
+ }\r
--- /dev/null
+#\r
+# Copyright (c) 2021, ARM Limited. All rights reserved.\r
+#\r
+# SPDX-License-Identifier: BSD-2-Clause-Patent\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
+[Defines]\r
+!if $(FD_SIZE_IN_MB) == 2\r
+ DEFINE FVMAIN_COMPACT_SIZE = 0x1ff000\r
+!endif\r
+!if $(FD_SIZE_IN_MB) == 3\r
+ DEFINE FVMAIN_COMPACT_SIZE = 0x2ff000\r
+!endif\r
+\r
+[FD.CLOUDHV_EFI]\r
+BaseAddress = 0x00000000|gArmTokenSpaceGuid.PcdFdBaseAddress # cloud-hypervisor assigns 0 - 0x8000000 for a BootROM\r
+Size = $(FD_SIZE)|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 = $(FD_NUM_BLOCKS)\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
+#\r
+# UEFI has trouble dealing with FVs that reside at physical address 0x0.\r
+# So instead, put a hardcoded 'jump to 0x1000' at offset 0x0, and put the\r
+# real FV at offset 0x1000\r
+#\r
+0x00000000|0x00001000\r
+DATA = {\r
+!if $(ARCH) == AARCH64\r
+ 0x00, 0x04, 0x00, 0x14 # 'b 0x1000' in AArch64 ASM\r
+!else\r
+ 0xfe, 0x03, 0x00, 0xea # 'b 0x1000' in AArch32 ASM\r
+!endif\r
+}\r
+\r
+0x00001000|$(FVMAIN_COMPACT_SIZE)\r
+gArmTokenSpaceGuid.PcdFvBaseAddress|gArmTokenSpaceGuid.PcdFvSize\r
+FV = FVMAIN_COMPACT\r
+\r
+!include VarStore.fdf.inc\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
+FvNameGuid = 2A88A00E-E267-C8BF-0E80-AE1BD504ED90\r
+BlockSize = 0x40\r
+NumBlocks = 0 # This FV gets compressed so make it just big enough\r
+FvAlignment = 16 # 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
+ INF MdeModulePkg/Core/Dxe/DxeMain.inf\r
+ INF MdeModulePkg/Universal/PCD/Dxe/Pcd.inf\r
+ INF ArmVirtPkg/VirtioFdtDxe/VirtioFdtDxe.inf\r
+ INF ArmVirtPkg/FdtClientDxe/FdtClientDxe.inf\r
+ INF ArmVirtPkg/HighMemDxe/HighMemDxe.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 MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteDxe.inf\r
+ INF MdeModulePkg/Universal/Variable/RuntimeDxe/VariableRuntimeDxe.inf\r
+!if $(SECURE_BOOT_ENABLE) == TRUE\r
+ INF SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootConfigDxe.inf\r
+!endif\r
+ INF MdeModulePkg/Universal/MonotonicCounterRuntimeDxe/MonotonicCounterRuntimeDxe.inf\r
+ INF MdeModulePkg/Universal/ResetSystemRuntimeDxe/ResetSystemRuntimeDxe.inf\r
+ INF EmbeddedPkg/RealTimeClockRuntimeDxe/RealTimeClockRuntimeDxe.inf\r
+ INF EmbeddedPkg/MetronomeDxe/MetronomeDxe.inf\r
+ INF MdeModulePkg/Universal/HiiDatabaseDxe/HiiDatabaseDxe.inf\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
+ INF MdeModulePkg/Universal/WatchdogTimerDxe/WatchdogTimer.inf\r
+\r
+ #\r
+ # FAT filesystem + GPT/MBR partitioning + UDF filesystem + virtio-fs\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
+ INF MdeModulePkg/Universal/Disk/UdfDxe/UdfDxe.inf\r
+ INF OvmfPkg/VirtioFsDxe/VirtioFsDxe.inf\r
+\r
+ #\r
+ # Status Code Routing\r
+ #\r
+ INF MdeModulePkg/Universal/ReportStatusCodeRouter/RuntimeDxe/ReportStatusCodeRouterRuntimeDxe.inf\r
+\r
+ #\r
+ # Platform Driver\r
+ #\r
+ INF OvmfPkg/VirtioBlkDxe/VirtioBlk.inf\r
+ INF OvmfPkg/VirtioNetDxe/VirtioNet.inf\r
+ INF OvmfPkg/VirtioScsiDxe/VirtioScsi.inf\r
+ INF OvmfPkg/VirtioRngDxe/VirtioRng.inf\r
+\r
+ #\r
+ # UEFI application (Shell Embedded Boot Loader)\r
+ #\r
+ INF ShellPkg/Application/Shell/Shell.inf\r
+ INF ShellPkg/DynamicCommand/TftpDynamicCommand/TftpDynamicCommand.inf\r
+ INF ShellPkg/DynamicCommand/HttpDynamicCommand/HttpDynamicCommand.inf\r
+ INF OvmfPkg/LinuxInitrdDynamicShellCommand/LinuxInitrdDynamicShellCommand.inf\r
+\r
+ #\r
+ # Bds\r
+ #\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
+\r
+ #\r
+ # SCSI Bus and Disk Driver\r
+ #\r
+ INF MdeModulePkg/Bus/Scsi/ScsiBusDxe/ScsiBusDxe.inf\r
+ INF MdeModulePkg/Bus/Scsi/ScsiDiskDxe/ScsiDiskDxe.inf\r
+\r
+ #\r
+ # ACPI Support\r
+ #\r
+ INF ArmVirtPkg/CloudHvPlatformHasAcpiDtDxe/CloudHvHasAcpiDtDxe.inf\r
+!if $(ARCH) == AARCH64\r
+ INF MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableDxe.inf\r
+ INF MdeModulePkg/Universal/Acpi/BootGraphicsResourceTableDxe/BootGraphicsResourceTableDxe.inf\r
+ INF ArmVirtPkg/CloudHvAcpiPlatformDxe/CloudHvAcpiPlatformDxe.inf\r
+\r
+ #\r
+ # EBC support\r
+ #\r
+ INF MdeModulePkg/Universal/EbcDxe/EbcDxe.inf\r
+!endif\r
+\r
+ #\r
+ # PCI support\r
+ #\r
+ INF ArmPkg/Drivers/ArmPciCpuIo2Dxe/ArmPciCpuIo2Dxe.inf\r
+ INF MdeModulePkg/Bus/Pci/PciHostBridgeDxe/PciHostBridgeDxe.inf\r
+ INF MdeModulePkg/Bus/Pci/PciBusDxe/PciBusDxe.inf\r
+ INF OvmfPkg/PciHotPlugInitDxe/PciHotPlugInit.inf\r
+ INF OvmfPkg/VirtioPciDeviceDxe/VirtioPciDeviceDxe.inf\r
+ INF OvmfPkg/Virtio10Dxe/Virtio10.inf\r
+\r
+ #\r
+ # TianoCore logo (splash screen)\r
+ #\r
+ INF MdeModulePkg/Logo/LogoDxe.inf\r
+\r
+ #\r
+ # Ramdisk support\r
+ #\r
+ INF MdeModulePkg/Universal/Disk/RamDiskDxe/RamDiskDxe.inf\r
+\r
+[FV.FVMAIN_COMPACT]\r
+FvAlignment = 16\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/PrePeiCore/PrePeiCoreUniCore.inf\r
+ INF MdeModulePkg/Core/Pei/PeiMain.inf\r
+ INF ArmPlatformPkg/PlatformPei/PlatformPeim.inf\r
+ INF ArmPlatformPkg/MemoryInitPei/MemoryInitPeim.inf\r
+ INF ArmPkg/Drivers/CpuPei/CpuPei.inf\r
+ INF MdeModulePkg/Universal/PCD/Pei/Pcd.inf\r
+ INF MdeModulePkg/Universal/Variable/Pei/VariablePei.inf\r
+ INF MdeModulePkg/Core/DxeIplPeim/DxeIpl.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 ArmVirtRules.fdf.inc\r