RPi4.dsc 28 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637
  1. # @file
  2. #
  3. # Copyright (c) 2011 - 2019, ARM Limited. All rights reserved.
  4. # Copyright (c) 2017 - 2018, Andrei Warkentin <andrey.warkentin@gmail.com>
  5. # Copyright (c) 2015 - 2016, Intel Corporation. All rights reserved.
  6. # Copyright (c) 2014, Linaro Limited. All rights reserved.
  7. #
  8. # SPDX-License-Identifier: BSD-2-Clause-Patent
  9. #
  10. ##
  11. ################################################################################
  12. #
  13. # Defines Section - statements that will be processed to create a Makefile.
  14. #
  15. ################################################################################
  16. [Defines]
  17. PLATFORM_NAME = RPi4
  18. PLATFORM_GUID = a7eca3b4-21b0-4989-8c18-c08f3ae87837
  19. PLATFORM_VERSION = 1.0
  20. DSC_SPECIFICATION = 0x0001001A
  21. OUTPUT_DIRECTORY = Build/$(PLATFORM_NAME)
  22. SUPPORTED_ARCHITECTURES = AARCH64
  23. BUILD_TARGETS = DEBUG|RELEASE|NOOPT
  24. SKUID_IDENTIFIER = DEFAULT
  25. FLASH_DEFINITION = Platform/RaspberryPi/$(PLATFORM_NAME)/$(PLATFORM_NAME).fdf
  26. #
  27. # Network definition
  28. #
  29. DEFINE NETWORK_TLS_ENABLE = FALSE
  30. DEFINE NETWORK_HTTP_BOOT_ENABLE = FALSE
  31. #
  32. # Defines for default states. These can be changed on the command line.
  33. # -D FLAG=VALUE
  34. #
  35. DEFINE SECURE_BOOT_ENABLE = FALSE
  36. DEFINE INCLUDE_TFTP_COMMAND = FALSE
  37. DEFINE DEBUG_PRINT_ERROR_LEVEL = 0x8000004F
  38. ################################################################################
  39. #
  40. # Library Class section - list of all Library Classes needed by this Platform.
  41. #
  42. ################################################################################
  43. [LibraryClasses.common]
  44. !if $(TARGET) == RELEASE
  45. DebugLib|MdePkg/Library/BaseDebugLibNull/BaseDebugLibNull.inf
  46. !else
  47. DebugLib|MdePkg/Library/BaseDebugLibSerialPort/BaseDebugLibSerialPort.inf
  48. !endif
  49. DebugPrintErrorLevelLib|MdePkg/Library/BaseDebugPrintErrorLevelLib/BaseDebugPrintErrorLevelLib.inf
  50. BaseLib|MdePkg/Library/BaseLib/BaseLib.inf
  51. SafeIntLib|MdePkg/Library/BaseSafeIntLib/BaseSafeIntLib.inf
  52. BmpSupportLib|MdeModulePkg/Library/BaseBmpSupportLib/BaseBmpSupportLib.inf
  53. SynchronizationLib|MdePkg/Library/BaseSynchronizationLib/BaseSynchronizationLib.inf
  54. PerformanceLib|MdePkg/Library/BasePerformanceLibNull/BasePerformanceLibNull.inf
  55. ReportStatusCodeLib|MdePkg/Library/BaseReportStatusCodeLibNull/BaseReportStatusCodeLibNull.inf
  56. PrintLib|MdePkg/Library/BasePrintLib/BasePrintLib.inf
  57. PeCoffGetEntryPointLib|MdePkg/Library/BasePeCoffGetEntryPointLib/BasePeCoffGetEntryPointLib.inf
  58. PeCoffLib|MdePkg/Library/BasePeCoffLib/BasePeCoffLib.inf
  59. IoLib|MdePkg/Library/BaseIoLibIntrinsic/BaseIoLibIntrinsic.inf
  60. UefiDecompressLib|MdePkg/Library/BaseUefiDecompressLib/BaseUefiDecompressLib.inf
  61. CpuLib|MdePkg/Library/BaseCpuLib/BaseCpuLib.inf
  62. UefiLib|MdePkg/Library/UefiLib/UefiLib.inf
  63. HobLib|MdePkg/Library/DxeHobLib/DxeHobLib.inf
  64. UefiRuntimeServicesTableLib|MdePkg/Library/UefiRuntimeServicesTableLib/UefiRuntimeServicesTableLib.inf
  65. DevicePathLib|MdePkg/Library/UefiDevicePathLib/UefiDevicePathLib.inf
  66. UefiBootServicesTableLib|MdePkg/Library/UefiBootServicesTableLib/UefiBootServicesTableLib.inf
  67. DxeServicesTableLib|MdePkg/Library/DxeServicesTableLib/DxeServicesTableLib.inf
  68. DxeServicesLib|MdePkg/Library/DxeServicesLib/DxeServicesLib.inf
  69. UefiDriverEntryPoint|MdePkg/Library/UefiDriverEntryPoint/UefiDriverEntryPoint.inf
  70. UefiApplicationEntryPoint|MdePkg/Library/UefiApplicationEntryPoint/UefiApplicationEntryPoint.inf
  71. HiiLib|MdeModulePkg/Library/UefiHiiLib/UefiHiiLib.inf
  72. UefiHiiServicesLib|MdeModulePkg/Library/UefiHiiServicesLib/UefiHiiServicesLib.inf
  73. SortLib|MdeModulePkg/Library/UefiSortLib/UefiSortLib.inf
  74. UefiRuntimeLib|MdePkg/Library/UefiRuntimeLib/UefiRuntimeLib.inf
  75. OrderedCollectionLib|MdePkg/Library/BaseOrderedCollectionRedBlackTreeLib/BaseOrderedCollectionRedBlackTreeLib.inf
  76. #
  77. # Ramdisk Requirements
  78. #
  79. FileExplorerLib|MdeModulePkg/Library/FileExplorerLib/FileExplorerLib.inf
  80. # Allow dynamic PCDs
  81. #
  82. PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf
  83. # use the accelerated BaseMemoryLibOptDxe by default, overrides for SEC/PEI below
  84. BaseMemoryLib|MdePkg/Library/BaseMemoryLibOptDxe/BaseMemoryLibOptDxe.inf
  85. #
  86. # It is not possible to prevent the ARM compiler from inserting calls to intrinsic functions.
  87. # This library provides the instrinsic functions such a compiler may generate calls to.
  88. #
  89. NULL|ArmPkg/Library/CompilerIntrinsicsLib/CompilerIntrinsicsLib.inf
  90. # Add support for GCC stack protector
  91. NULL|MdePkg/Library/BaseStackCheckLib/BaseStackCheckLib.inf
  92. # ARM Architectural Libraries
  93. CacheMaintenanceLib|ArmPkg/Library/ArmCacheMaintenanceLib/ArmCacheMaintenanceLib.inf
  94. DefaultExceptionHandlerLib|ArmPkg/Library/DefaultExceptionHandlerLib/DefaultExceptionHandlerLib.inf
  95. CpuExceptionHandlerLib|ArmPkg/Library/ArmExceptionLib/ArmExceptionLib.inf
  96. ArmDisassemblerLib|ArmPkg/Library/ArmDisassemblerLib/ArmDisassemblerLib.inf
  97. ArmGicLib|ArmPkg/Drivers/ArmGic/ArmGicLib.inf
  98. ArmGicArchLib|ArmPkg/Library/ArmGicArchLib/ArmGicArchLib.inf
  99. DmaLib|EmbeddedPkg/Library/NonCoherentDmaLib/NonCoherentDmaLib.inf
  100. TimeBaseLib|EmbeddedPkg/Library/TimeBaseLib/TimeBaseLib.inf
  101. ArmPlatformStackLib|ArmPlatformPkg/Library/ArmPlatformStackLib/ArmPlatformStackLib.inf
  102. ArmSmcLib|ArmPkg/Library/ArmSmcLib/ArmSmcLib.inf
  103. ArmHvcLib|ArmPkg/Library/ArmHvcLib/ArmHvcLib.inf
  104. ArmGenericTimerCounterLib|ArmPkg/Library/ArmGenericTimerPhyCounterLib/ArmGenericTimerPhyCounterLib.inf
  105. PciCf8Lib|MdePkg/Library/BasePciCf8Lib/BasePciCf8Lib.inf
  106. PciLib|MdePkg/Library/BasePciLibCf8/BasePciLibCf8.inf
  107. PlatformHookLib|MdeModulePkg/Library/BasePlatformHookLibNull/BasePlatformHookLibNull.inf
  108. SerialPortLib|MdeModulePkg/Library/BaseSerialPortLib16550/BaseSerialPortLib16550.inf
  109. # Cryptographic libraries
  110. IntrinsicLib|CryptoPkg/Library/IntrinsicLib/IntrinsicLib.inf
  111. BaseCryptLib|CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf
  112. OpensslLib|CryptoPkg/Library/OpensslLib/OpensslLib.inf
  113. #
  114. # Uncomment (and comment out the next line) For RealView Debugger. The Standard IO window
  115. # in the debugger will show load and unload commands for symbols. You can cut and paste this
  116. # into the command window to load symbols. We should be able to use a script to do this, but
  117. # the version of RVD I have does not support scripts accessing system memory.
  118. #
  119. #PeCoffExtraActionLib|ArmPkg/Library/RvdPeCoffExtraActionLib/RvdPeCoffExtraActionLib.inf
  120. PeCoffExtraActionLib|ArmPkg/Library/DebugPeCoffExtraActionLib/DebugPeCoffExtraActionLib.inf
  121. #PeCoffExtraActionLib|MdePkg/Library/BasePeCoffExtraActionLibNull/BasePeCoffExtraActionLibNull.inf
  122. DebugAgentLib|MdeModulePkg/Library/DebugAgentLibNull/DebugAgentLibNull.inf
  123. DebugAgentTimerLib|EmbeddedPkg/Library/DebugAgentTimerLibNull/DebugAgentTimerLibNull.inf
  124. # Flattened Device Tree (FDT) access library
  125. FdtLib|EmbeddedPkg/Library/FdtLib/FdtLib.inf
  126. # USB Libraries
  127. UefiUsbLib|MdePkg/Library/UefiUsbLib/UefiUsbLib.inf
  128. #
  129. # Secure Boot dependencies
  130. #
  131. !if $(SECURE_BOOT_ENABLE) == TRUE
  132. TpmMeasurementLib|SecurityPkg/Library/DxeTpmMeasurementLib/DxeTpmMeasurementLib.inf
  133. AuthVariableLib|SecurityPkg/Library/AuthVariableLib/AuthVariableLib.inf
  134. # re-use the UserPhysicalPresent() dummy implementation from the ovmf tree
  135. PlatformSecureLib|OvmfPkg/Library/PlatformSecureLib/PlatformSecureLib.inf
  136. !else
  137. TpmMeasurementLib|MdeModulePkg/Library/TpmMeasurementLibNull/TpmMeasurementLibNull.inf
  138. AuthVariableLib|MdeModulePkg/Library/AuthVariableLibNull/AuthVariableLibNull.inf
  139. !endif
  140. VarCheckLib|MdeModulePkg/Library/VarCheckLib/VarCheckLib.inf
  141. GpioLib|Silicon/Broadcom/Bcm283x/Library/GpioLib/GpioLib.inf
  142. [LibraryClasses.common.SEC]
  143. PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf
  144. BaseMemoryLib|MdePkg/Library/BaseMemoryLib/BaseMemoryLib.inf
  145. MemoryInitPeiLib|Platform/RaspberryPi/Library/MemoryInitPeiLib/MemoryInitPeiLib.inf
  146. PlatformPeiLib|ArmPlatformPkg/PlatformPei/PlatformPeiLib.inf
  147. ExtractGuidedSectionLib|EmbeddedPkg/Library/PrePiExtractGuidedSectionLib/PrePiExtractGuidedSectionLib.inf
  148. LzmaDecompressLib|MdeModulePkg/Library/LzmaCustomDecompressLib/LzmaCustomDecompressLib.inf
  149. PrePiLib|EmbeddedPkg/Library/PrePiLib/PrePiLib.inf
  150. HobLib|EmbeddedPkg/Library/PrePiHobLib/PrePiHobLib.inf
  151. PrePiHobListPointerLib|ArmPlatformPkg/Library/PrePiHobListPointerLib/PrePiHobListPointerLib.inf
  152. MemoryAllocationLib|EmbeddedPkg/Library/PrePiMemoryAllocationLib/PrePiMemoryAllocationLib.inf
  153. [LibraryClasses.common.DXE_CORE]
  154. HobLib|MdePkg/Library/DxeCoreHobLib/DxeCoreHobLib.inf
  155. MemoryAllocationLib|MdeModulePkg/Library/DxeCoreMemoryAllocationLib/DxeCoreMemoryAllocationLib.inf
  156. DxeCoreEntryPoint|MdePkg/Library/DxeCoreEntryPoint/DxeCoreEntryPoint.inf
  157. ExtractGuidedSectionLib|MdePkg/Library/DxeExtractGuidedSectionLib/DxeExtractGuidedSectionLib.inf
  158. PerformanceLib|MdeModulePkg/Library/DxeCorePerformanceLib/DxeCorePerformanceLib.inf
  159. [LibraryClasses.common.DXE_DRIVER]
  160. SecurityManagementLib|MdeModulePkg/Library/DxeSecurityManagementLib/DxeSecurityManagementLib.inf
  161. PerformanceLib|MdeModulePkg/Library/DxePerformanceLib/DxePerformanceLib.inf
  162. MemoryAllocationLib|MdePkg/Library/UefiMemoryAllocationLib/UefiMemoryAllocationLib.inf
  163. !if $(INCLUDE_TFTP_COMMAND) == TRUE
  164. ShellLib|ShellPkg/Library/UefiShellLib/UefiShellLib.inf
  165. FileHandleLib|MdePkg/Library/UefiFileHandleLib/UefiFileHandleLib.inf
  166. !endif
  167. [LibraryClasses.common.UEFI_APPLICATION]
  168. PerformanceLib|MdeModulePkg/Library/DxePerformanceLib/DxePerformanceLib.inf
  169. MemoryAllocationLib|MdePkg/Library/UefiMemoryAllocationLib/UefiMemoryAllocationLib.inf
  170. HiiLib|MdeModulePkg/Library/UefiHiiLib/UefiHiiLib.inf
  171. ShellLib|ShellPkg/Library/UefiShellLib/UefiShellLib.inf
  172. FileHandleLib|MdePkg/Library/UefiFileHandleLib/UefiFileHandleLib.inf
  173. [LibraryClasses.common.UEFI_DRIVER]
  174. ExtractGuidedSectionLib|MdePkg/Library/DxeExtractGuidedSectionLib/DxeExtractGuidedSectionLib.inf
  175. PerformanceLib|MdeModulePkg/Library/DxePerformanceLib/DxePerformanceLib.inf
  176. MemoryAllocationLib|MdePkg/Library/UefiMemoryAllocationLib/UefiMemoryAllocationLib.inf
  177. [LibraryClasses.common.DXE_RUNTIME_DRIVER]
  178. MemoryAllocationLib|MdePkg/Library/UefiMemoryAllocationLib/UefiMemoryAllocationLib.inf
  179. CapsuleLib|MdeModulePkg/Library/DxeCapsuleLibNull/DxeCapsuleLibNull.inf
  180. EfiResetSystemLib|Platform/RaspberryPi/Library/ResetLib/ResetLib.inf
  181. ArmSmcLib|ArmPkg/Library/ArmSmcLib/ArmSmcLib.inf
  182. !if $(SECURE_BOOT_ENABLE) == TRUE
  183. BaseCryptLib|CryptoPkg/Library/BaseCryptLib/RuntimeCryptLib.inf
  184. !endif
  185. ###################################################################################################
  186. # BuildOptions Section - Define the module specific tool chain flags that should be used as
  187. # the default flags for a module. These flags are appended to any
  188. # standard flags that are defined by the build process.
  189. ###################################################################################################
  190. [BuildOptions]
  191. GCC:*_*_AARCH64_DLINK_FLAGS = -Wl,--fix-cortex-a53-843419
  192. GCC:RELEASE_*_*_CC_FLAGS = -DMDEPKG_NDEBUG -DNDEBUG
  193. [BuildOptions.common.EDKII.DXE_RUNTIME_DRIVER]
  194. GCC:*_*_AARCH64_DLINK_FLAGS = -z common-page-size=0x10000
  195. ################################################################################
  196. #
  197. # Pcd Section - list of all EDK II PCD Entries defined by this Platform
  198. #
  199. ################################################################################
  200. [PcdsFeatureFlag.common]
  201. # Use the Vector Table location in CpuDxe. We will not copy the Vector Table at PcdCpuVectorBaseAddress
  202. gArmTokenSpaceGuid.PcdRelocateVectorTable|FALSE
  203. gEmbeddedTokenSpaceGuid.PcdPrePiProduceMemoryTypeInformationHob|TRUE
  204. gEfiMdeModulePkgTokenSpaceGuid.PcdTurnOffUsbLegacySupport|TRUE
  205. ## If TRUE, Graphics Output Protocol will be installed on virtual handle created by ConsplitterDxe.
  206. # It could be set FALSE to save size.
  207. gEfiMdeModulePkgTokenSpaceGuid.PcdConOutGopSupport|TRUE
  208. gEfiMdeModulePkgTokenSpaceGuid.PcdConOutUgaSupport|FALSE
  209. [PcdsFixedAtBuild.common]
  210. gEfiMdePkgTokenSpaceGuid.PcdMaximumUnicodeStringLength|1000000
  211. gEfiMdePkgTokenSpaceGuid.PcdMaximumAsciiStringLength|1000000
  212. gEfiMdePkgTokenSpaceGuid.PcdMaximumLinkedListLength|1000000
  213. gEfiMdePkgTokenSpaceGuid.PcdSpinLockTimeout|10000000
  214. gEfiMdePkgTokenSpaceGuid.PcdDebugClearMemoryValue|0xAF
  215. gEfiMdePkgTokenSpaceGuid.PcdPerformanceLibraryPropertyMask|1
  216. gEfiMdePkgTokenSpaceGuid.PcdPostCodePropertyMask|0
  217. gEfiMdePkgTokenSpaceGuid.PcdUefiLibMaxPrintBufferSize|320
  218. gRaspberryPiTokenSpaceGuid.PcdFdtBaseAddress|0x20000
  219. # DEBUG_ASSERT_ENABLED 0x01
  220. # DEBUG_PRINT_ENABLED 0x02
  221. # DEBUG_CODE_ENABLED 0x04
  222. # CLEAR_MEMORY_ENABLED 0x08
  223. # ASSERT_BREAKPOINT_ENABLED 0x10
  224. # ASSERT_DEADLOOP_ENABLED 0x20
  225. !if $(TARGET) == RELEASE
  226. gEfiMdePkgTokenSpaceGuid.PcdDebugPropertyMask|0x21
  227. !else
  228. gEfiMdePkgTokenSpaceGuid.PcdDebugPropertyMask|0x2f
  229. !endif
  230. # DEBUG_INIT 0x00000001 // Initialization
  231. # DEBUG_WARN 0x00000002 // Warnings
  232. # DEBUG_LOAD 0x00000004 // Load events
  233. # DEBUG_FS 0x00000008 // EFI File system
  234. # DEBUG_POOL 0x00000010 // Alloc & Free (pool)
  235. # DEBUG_PAGE 0x00000020 // Alloc & Free (page)
  236. # DEBUG_INFO 0x00000040 // Informational debug messages
  237. # DEBUG_DISPATCH 0x00000080 // PEI/DXE/SMM Dispatchers
  238. # DEBUG_VARIABLE 0x00000100 // Variable
  239. # DEBUG_BM 0x00000400 // Boot Manager
  240. # DEBUG_BLKIO 0x00001000 // BlkIo Driver
  241. # DEBUG_NET 0x00004000 // SNP Driver
  242. # DEBUG_UNDI 0x00010000 // UNDI Driver
  243. # DEBUG_LOADFILE 0x00020000 // LoadFile
  244. # DEBUG_EVENT 0x00080000 // Event messages
  245. # DEBUG_GCD 0x00100000 // Global Coherency Database changes
  246. # DEBUG_CACHE 0x00200000 // Memory range cachability changes
  247. # DEBUG_VERBOSE 0x00400000 // Detailed debug messages that may
  248. # // significantly impact boot performance
  249. # DEBUG_ERROR 0x80000000 // Error
  250. gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel|$(DEBUG_PRINT_ERROR_LEVEL)
  251. gEfiMdePkgTokenSpaceGuid.PcdReportStatusCodePropertyMask|0x07
  252. #
  253. # Optional feature to help prevent EFI memory map fragments
  254. # Turned on and off via: PcdPrePiProduceMemoryTypeInformationHob
  255. # Values are in EFI Pages (4K). DXE Core will make sure that
  256. # at least this much of each type of memory can be allocated
  257. # from a single memory range. This way you only end up with
  258. # maximum of two fragments for each type in the memory map
  259. # (the memory used, and the free memory that was prereserved
  260. # but not used).
  261. #
  262. gEmbeddedTokenSpaceGuid.PcdMemoryTypeEfiACPIReclaimMemory|0
  263. gEmbeddedTokenSpaceGuid.PcdMemoryTypeEfiACPIMemoryNVS|0
  264. gEmbeddedTokenSpaceGuid.PcdMemoryTypeEfiReservedMemoryType|0
  265. !if $(SECURE_BOOT_ENABLE) == TRUE
  266. gEmbeddedTokenSpaceGuid.PcdMemoryTypeEfiRuntimeServicesData|600
  267. gEmbeddedTokenSpaceGuid.PcdMemoryTypeEfiRuntimeServicesCode|400
  268. gEmbeddedTokenSpaceGuid.PcdMemoryTypeEfiBootServicesCode|1500
  269. !else
  270. gEmbeddedTokenSpaceGuid.PcdMemoryTypeEfiRuntimeServicesData|300
  271. gEmbeddedTokenSpaceGuid.PcdMemoryTypeEfiRuntimeServicesCode|150
  272. gEmbeddedTokenSpaceGuid.PcdMemoryTypeEfiBootServicesCode|1000
  273. !endif
  274. gEmbeddedTokenSpaceGuid.PcdMemoryTypeEfiBootServicesData|12000
  275. gEmbeddedTokenSpaceGuid.PcdMemoryTypeEfiLoaderCode|20
  276. gEmbeddedTokenSpaceGuid.PcdMemoryTypeEfiLoaderData|0
  277. gEmbeddedTokenSpaceGuid.PcdDmaDeviceOffset|0xc0000000
  278. gEfiMdeModulePkgTokenSpaceGuid.PcdFirmwareVersionString|L"EDK2-DEV"
  279. !if $(SECURE_BOOT_ENABLE) == TRUE
  280. # override the default values from SecurityPkg to ensure images from all sources are verified in secure boot
  281. gEfiSecurityPkgTokenSpaceGuid.PcdOptionRomImageVerificationPolicy|0x04
  282. gEfiSecurityPkgTokenSpaceGuid.PcdFixedMediaImageVerificationPolicy|0x04
  283. gEfiSecurityPkgTokenSpaceGuid.PcdRemovableMediaImageVerificationPolicy|0x04
  284. !endif
  285. [LibraryClasses.common]
  286. ArmLib|ArmPkg/Library/ArmLib/ArmBaseLib.inf
  287. ArmMmuLib|ArmPkg/Library/ArmMmuLib/ArmMmuBaseLib.inf
  288. ArmPlatformLib|Platform/RaspberryPi/Library/PlatformLib/PlatformLib.inf
  289. TimerLib|ArmPkg/Library/ArmArchTimerLib/ArmArchTimerLib.inf
  290. CapsuleLib|MdeModulePkg/Library/DxeCapsuleLibNull/DxeCapsuleLibNull.inf
  291. UefiBootManagerLib|MdeModulePkg/Library/UefiBootManagerLib/UefiBootManagerLib.inf
  292. BootLogoLib|MdeModulePkg/Library/BootLogoLib/BootLogoLib.inf
  293. PlatformBootManagerLib|Platform/RaspberryPi/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf
  294. CustomizedDisplayLib|MdeModulePkg/Library/CustomizedDisplayLib/CustomizedDisplayLib.inf
  295. FileExplorerLib|MdeModulePkg/Library/FileExplorerLib/FileExplorerLib.inf
  296. [LibraryClasses.common.UEFI_DRIVER]
  297. UefiScsiLib|MdePkg/Library/UefiScsiLib/UefiScsiLib.inf
  298. ################################################################################
  299. #
  300. # Pcd Section - list of all EDK II PCD Entries defined by this Platform
  301. #
  302. ################################################################################
  303. [PcdsFeatureFlag.common]
  304. gEfiMdeModulePkgTokenSpaceGuid.PcdConOutGopSupport|TRUE
  305. gEfiMdeModulePkgTokenSpaceGuid.PcdConOutUgaSupport|FALSE
  306. gEfiMdeModulePkgTokenSpaceGuid.PcdInstallAcpiSdtProtocol|TRUE
  307. [PcdsFixedAtBuild.common]
  308. gArmPlatformTokenSpaceGuid.PcdCoreCount|4
  309. gArmTokenSpaceGuid.PcdVFPEnabled|1
  310. gArmPlatformTokenSpaceGuid.PcdCPUCorePrimaryStackSize|0x4000
  311. gEfiMdeModulePkgTokenSpaceGuid.PcdMaxVariableSize|0x2000
  312. gEfiMdeModulePkgTokenSpaceGuid.PcdMaxAuthVariableSize|0x2800
  313. # Size of the region used by UEFI in permanent memory (Reserved 64MB)
  314. gArmPlatformTokenSpaceGuid.PcdSystemMemoryUefiRegionSize|0x04000000
  315. #
  316. # This matches PcdFvBaseAddress, since everything less is ATF, and
  317. # will be reserved away.
  318. #
  319. gArmTokenSpaceGuid.PcdSystemMemoryBase|0x00400000
  320. gArmTokenSpaceGuid.PcdSystemMemorySize|0x3fc00000
  321. #
  322. # Device specific addresses
  323. #
  324. gRaspberryPiTokenSpaceGuid.PcdExtendedMemoryBase|0x40000000
  325. gBcm27xxTokenSpaceGuid.PcdBcm27xxRegistersAddress|0xfc000000
  326. gBcm283xTokenSpaceGuid.PcdBcm283xRegistersAddress|0xfe000000
  327. ## NS16550 compatible UART
  328. gEfiMdeModulePkgTokenSpaceGuid.PcdSerialRegisterBase|0xfe215040
  329. gEfiMdeModulePkgTokenSpaceGuid.PcdSerialUseMmio|TRUE
  330. gEfiMdeModulePkgTokenSpaceGuid.PcdSerialRegisterStride|4
  331. gEfiMdeModulePkgTokenSpaceGuid.PcdSerialClockRate|500000000
  332. gEfiMdeModulePkgTokenSpaceGuid.PcdSerialFifoControl|0x27
  333. gEfiMdeModulePkgTokenSpaceGuid.PcdSerialExtendedTxFifoSize|8
  334. gEfiMdePkgTokenSpaceGuid.PcdUartDefaultBaudRate|115200
  335. #
  336. # ARM General Interrupt Controller
  337. #
  338. gArmTokenSpaceGuid.PcdGicDistributorBase|0xFF841000
  339. gArmTokenSpaceGuid.PcdGicInterruptInterfaceBase|0xFF842000
  340. ## Default Terminal Type
  341. ## 0-PCANSI, 1-VT100, 2-VT00+, 3-UTF8, 4-TTYTERM
  342. gEfiMdePkgTokenSpaceGuid.PcdDefaultTerminalType|4
  343. gEfiMdeModulePkgTokenSpaceGuid.PcdResetOnMemoryTypeInformationChange|FALSE
  344. gEfiMdeModulePkgTokenSpaceGuid.PcdBootManagerMenuFile|{ 0x21, 0xaa, 0x2c, 0x46, 0x14, 0x76, 0x03, 0x45, 0x83, 0x6e, 0x8a, 0xb6, 0xf4, 0x66, 0x23, 0x31 }
  345. gEfiMdeModulePkgTokenSpaceGuid.PcdFirmwareVendor|L"EDK2"
  346. gEfiMdeModulePkgTokenSpaceGuid.PcdSetNxForStack|TRUE
  347. [PcdsDynamicHii.common.DEFAULT]
  348. #
  349. # Clock overrides.
  350. #
  351. gRaspberryPiTokenSpaceGuid.PcdCpuClock|L"CpuClock"|gConfigDxeFormSetGuid|0x0|0
  352. gRaspberryPiTokenSpaceGuid.PcdCustomCpuClock|L"CustomCpuClock"|gConfigDxeFormSetGuid|0x0|600
  353. #
  354. # SD-related.
  355. #
  356. gRaspberryPiTokenSpaceGuid.PcdSdIsArasan|L"SdIsArasan"|gConfigDxeFormSetGuid|0x0|1
  357. gRaspberryPiTokenSpaceGuid.PcdMmcForce1Bit|L"MmcForce1Bit"|gConfigDxeFormSetGuid|0x0|0
  358. gRaspberryPiTokenSpaceGuid.PcdMmcForceDefaultSpeed|L"MmcForceDefaultSpeed"|gConfigDxeFormSetGuid|0x0|0
  359. gRaspberryPiTokenSpaceGuid.PcdMmcSdDefaultSpeedMHz|L"MmcSdDefaultSpeedMHz"|gConfigDxeFormSetGuid|0x0|25
  360. gRaspberryPiTokenSpaceGuid.PcdMmcSdHighSpeedMHz|L"MmcSdHighSpeedMHz"|gConfigDxeFormSetGuid|0x0|50
  361. gRaspberryPiTokenSpaceGuid.PcdMmcDisableMulti|L"MmcDisableMulti"|gConfigDxeFormSetGuid|0x0|0
  362. #
  363. # Debug-related.
  364. #
  365. gRaspberryPiTokenSpaceGuid.PcdDebugEnableJTAG|L"DebugEnableJTAG"|gConfigDxeFormSetGuid|0x0|0
  366. gRaspberryPiTokenSpaceGuid.PcdDebugShowUEFIExit|L"DebugShowUEFIExit"|gConfigDxeFormSetGuid|0x0|0
  367. #
  368. # Display-related.
  369. #
  370. gRaspberryPiTokenSpaceGuid.PcdDisplayEnableScaledVModes|L"DisplayEnableScaledVModes"|gConfigDxeFormSetGuid|0x0|0xff
  371. gRaspberryPiTokenSpaceGuid.PcdDisplayEnableSShot|L"DisplayEnableSShot"|gConfigDxeFormSetGuid|0x0|1
  372. #
  373. # Common UEFI ones.
  374. #
  375. gEfiMdePkgTokenSpaceGuid.PcdPlatformBootTimeOut|L"Timeout"|gEfiGlobalVariableGuid|0x0|5
  376. #
  377. # This is silly, but by pointing SetupConXXX and ConXXX PCDs to
  378. # the same variables, I can use the graphical configuration to
  379. # change the mode used by ConSplitter.
  380. #
  381. gEfiMdeModulePkgTokenSpaceGuid.PcdSetupConOutColumn|L"Columns"|gRaspberryPiTokenSpaceGuid|0x0|80
  382. gEfiMdeModulePkgTokenSpaceGuid.PcdConOutColumn|L"Columns"|gRaspberryPiTokenSpaceGuid|0x0|80
  383. gEfiMdeModulePkgTokenSpaceGuid.PcdSetupConOutRow|L"Rows"|gRaspberryPiTokenSpaceGuid|0x0|25
  384. gEfiMdeModulePkgTokenSpaceGuid.PcdConOutRow|L"Rows"|gRaspberryPiTokenSpaceGuid|0x0|25
  385. [PcdsDynamicDefault.common]
  386. #
  387. # Set video resolution for boot options and for text setup.
  388. #
  389. gEfiMdeModulePkgTokenSpaceGuid.PcdVideoHorizontalResolution|0
  390. gEfiMdeModulePkgTokenSpaceGuid.PcdVideoVerticalResolution|0
  391. gEfiMdeModulePkgTokenSpaceGuid.PcdSetupVideoHorizontalResolution|640
  392. gEfiMdeModulePkgTokenSpaceGuid.PcdSetupVideoVerticalResolution|480
  393. gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableBase64|0
  394. gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingBase|0
  395. gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareBase|0
  396. ################################################################################
  397. #
  398. # Components Section - list of all EDK II Modules needed by this Platform
  399. #
  400. ################################################################################
  401. [Components.common]
  402. #
  403. # PEI Phase modules
  404. #
  405. ArmPlatformPkg/PrePi/PeiUniCore.inf
  406. #
  407. # DXE
  408. #
  409. MdeModulePkg/Core/Dxe/DxeMain.inf {
  410. <LibraryClasses>
  411. NULL|MdeModulePkg/Library/DxeCrc32GuidedSectionExtractLib/DxeCrc32GuidedSectionExtractLib.inf
  412. }
  413. MdeModulePkg/Universal/PCD/Dxe/Pcd.inf {
  414. <LibraryClasses>
  415. PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf
  416. }
  417. #
  418. # Architectural Protocols
  419. #
  420. ArmPkg/Drivers/CpuDxe/CpuDxe.inf
  421. MdeModulePkg/Core/RuntimeDxe/RuntimeDxe.inf
  422. Platform/RaspberryPi/Drivers/VarBlockServiceDxe/VarBlockServiceDxe.inf
  423. MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteDxe.inf
  424. MdeModulePkg/Universal/Variable/RuntimeDxe/VariableRuntimeDxe.inf {
  425. <LibraryClasses>
  426. NULL|MdeModulePkg/Library/VarCheckUefiLib/VarCheckUefiLib.inf
  427. DebugLib|MdePkg/Library/BaseDebugLibNull/BaseDebugLibNull.inf
  428. }
  429. !if $(SECURE_BOOT_ENABLE) == TRUE
  430. MdeModulePkg/Universal/SecurityStubDxe/SecurityStubDxe.inf {
  431. <LibraryClasses>
  432. NULL|SecurityPkg/Library/DxeImageVerificationLib/DxeImageVerificationLib.inf
  433. }
  434. SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootConfigDxe.inf
  435. !else
  436. MdeModulePkg/Universal/SecurityStubDxe/SecurityStubDxe.inf
  437. !endif
  438. MdeModulePkg/Universal/CapsuleRuntimeDxe/CapsuleRuntimeDxe.inf
  439. MdeModulePkg/Universal/MonotonicCounterRuntimeDxe/MonotonicCounterRuntimeDxe.inf
  440. EmbeddedPkg/ResetRuntimeDxe/ResetRuntimeDxe.inf
  441. EmbeddedPkg/RealTimeClockRuntimeDxe/RealTimeClockRuntimeDxe.inf {
  442. <LibraryClasses>
  443. RealTimeClockLib|EmbeddedPkg/Library/VirtualRealTimeClockLib/VirtualRealTimeClockLib.inf
  444. }
  445. EmbeddedPkg/MetronomeDxe/MetronomeDxe.inf
  446. MdeModulePkg/Universal/Console/ConPlatformDxe/ConPlatformDxe.inf
  447. MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitterDxe.inf
  448. Platform/RaspberryPi/Drivers/GraphicsConsoleDxe/GraphicsConsoleDxe.inf
  449. MdeModulePkg/Universal/Console/TerminalDxe/TerminalDxe.inf
  450. MdeModulePkg/Universal/SerialDxe/SerialDxe.inf
  451. Platform/RaspberryPi/Drivers/DisplayDxe/DisplayDxe.inf
  452. MdeModulePkg/Universal/HiiDatabaseDxe/HiiDatabaseDxe.inf
  453. UefiCpuPkg/CpuIo2Dxe/CpuIo2Dxe.inf
  454. ArmPkg/Drivers/ArmGic/ArmGicDxe.inf
  455. Platform/RaspberryPi/Drivers/RpiFirmwareDxe/RpiFirmwareDxe.inf
  456. Platform/RaspberryPi/Drivers/FdtDxe/FdtDxe.inf
  457. Platform/RaspberryPi/Drivers/ConfigDxe/ConfigDxe.inf
  458. ArmPkg/Drivers/TimerDxe/TimerDxe.inf
  459. MdeModulePkg/Universal/WatchdogTimerDxe/WatchdogTimer.inf
  460. MdeModulePkg/Universal/EbcDxe/EbcDxe.inf
  461. #
  462. # FAT filesystem + GPT/MBR partitioning
  463. #
  464. MdeModulePkg/Universal/Disk/DiskIoDxe/DiskIoDxe.inf
  465. MdeModulePkg/Universal/Disk/PartitionDxe/PartitionDxe.inf
  466. MdeModulePkg/Universal/Disk/UnicodeCollation/EnglishDxe/EnglishDxe.inf
  467. FatPkg/EnhancedFatDxe/Fat.inf
  468. #
  469. # ACPI Support
  470. #
  471. MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableDxe.inf
  472. MdeModulePkg/Universal/Acpi/AcpiPlatformDxe/AcpiPlatformDxe.inf
  473. MdeModulePkg/Universal/Acpi/BootGraphicsResourceTableDxe/BootGraphicsResourceTableDxe.inf
  474. Platform/RaspberryPi/$(PLATFORM_NAME)/AcpiTables/AcpiTables.inf
  475. #
  476. # SMBIOS Support
  477. #
  478. Platform/RaspberryPi/Drivers/PlatformSmbiosDxe/PlatformSmbiosDxe.inf
  479. MdeModulePkg/Universal/SmbiosDxe/SmbiosDxe.inf
  480. #
  481. # RAM Disk Support
  482. #
  483. MdeModulePkg/Universal/Disk/RamDiskDxe/RamDiskDxe.inf
  484. #
  485. # Bds
  486. #
  487. MdeModulePkg/Universal/DevicePathDxe/DevicePathDxe.inf
  488. MdeModulePkg/Universal/DisplayEngineDxe/DisplayEngineDxe.inf
  489. MdeModulePkg/Universal/SetupBrowserDxe/SetupBrowserDxe.inf
  490. MdeModulePkg/Universal/DriverHealthManagerDxe/DriverHealthManagerDxe.inf
  491. MdeModulePkg/Universal/BdsDxe/BdsDxe.inf
  492. Platform/RaspberryPi/Drivers/LogoDxe/LogoDxe.inf
  493. MdeModulePkg/Application/UiApp/UiApp.inf {
  494. <LibraryClasses>
  495. NULL|MdeModulePkg/Library/DeviceManagerUiLib/DeviceManagerUiLib.inf
  496. NULL|MdeModulePkg/Library/BootManagerUiLib/BootManagerUiLib.inf
  497. NULL|Platform/RaspberryPi/Library/PlatformUiAppLib/PlatformUiAppLib.inf
  498. NULL|MdeModulePkg/Library/BootMaintenanceManagerUiLib/BootMaintenanceManagerUiLib.inf
  499. }
  500. #
  501. # SCSI Bus and Disk Driver
  502. #
  503. MdeModulePkg/Bus/Scsi/ScsiBusDxe/ScsiBusDxe.inf
  504. MdeModulePkg/Bus/Scsi/ScsiDiskDxe/ScsiDiskDxe.inf
  505. #
  506. # USB Support
  507. #
  508. Platform/RaspberryPi/Drivers/DwUsbHostDxe/DwUsbHostDxe.inf
  509. MdeModulePkg/Bus/Usb/UsbBusDxe/UsbBusDxe.inf
  510. MdeModulePkg/Bus/Usb/UsbKbDxe/UsbKbDxe.inf
  511. MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassStorageDxe.inf
  512. Drivers/OptionRomPkg/Bus/Usb/UsbNetworking/Ax88772b/Ax88772b.inf
  513. #
  514. # SD/MMC support
  515. #
  516. # Platform/RaspberryPi/Drivers/SdHostDxe/SdHostDxe.inf
  517. Platform/RaspberryPi/Drivers/ArasanMmcHostDxe/ArasanMmcHostDxe.inf
  518. Platform/RaspberryPi/Drivers/MmcDxe/MmcDxe.inf
  519. #
  520. # Networking stack
  521. #
  522. !include NetworkPkg/Network.dsc.inc
  523. #
  524. # RNG
  525. #
  526. Silicon/Broadcom/Bcm283x/Drivers/Bcm2838RngDxe/Bcm2838RngDxe.inf
  527. #
  528. # UEFI application (Shell Embedded Boot Loader)
  529. #
  530. ShellPkg/Application/Shell/Shell.inf {
  531. <LibraryClasses>
  532. ShellCommandLib|ShellPkg/Library/UefiShellCommandLib/UefiShellCommandLib.inf
  533. NULL|ShellPkg/Library/UefiShellLevel2CommandsLib/UefiShellLevel2CommandsLib.inf
  534. NULL|ShellPkg/Library/UefiShellLevel1CommandsLib/UefiShellLevel1CommandsLib.inf
  535. NULL|ShellPkg/Library/UefiShellLevel3CommandsLib/UefiShellLevel3CommandsLib.inf
  536. NULL|ShellPkg/Library/UefiShellDriver1CommandsLib/UefiShellDriver1CommandsLib.inf
  537. NULL|ShellPkg/Library/UefiShellDebug1CommandsLib/UefiShellDebug1CommandsLib.inf
  538. NULL|ShellPkg/Library/UefiShellInstall1CommandsLib/UefiShellInstall1CommandsLib.inf
  539. NULL|ShellPkg/Library/UefiShellNetwork1CommandsLib/UefiShellNetwork1CommandsLib.inf
  540. NULL|ShellPkg/Library/UefiShellAcpiViewCommandLib/UefiShellAcpiViewCommandLib.inf
  541. HandleParsingLib|ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.inf
  542. PrintLib|MdePkg/Library/BasePrintLib/BasePrintLib.inf
  543. BcfgCommandLib|ShellPkg/Library/UefiShellBcfgCommandLib/UefiShellBcfgCommandLib.inf
  544. <PcdsFixedAtBuild>
  545. gEfiMdePkgTokenSpaceGuid.PcdDebugPropertyMask|0xFF
  546. gEfiShellPkgTokenSpaceGuid.PcdShellLibAutoInitialize|FALSE
  547. gEfiMdePkgTokenSpaceGuid.PcdUefiLibMaxPrintBufferSize|8000
  548. gEfiShellPkgTokenSpaceGuid.PcdShellFileOperationSize|0x200000
  549. }
  550. !if $(INCLUDE_TFTP_COMMAND) == TRUE
  551. ShellPkg/DynamicCommand/TftpDynamicCommand/TftpDynamicCommand.inf
  552. !endif