# ARM processor package.\r
#\r
# Copyright (c) 2009 - 2010, Apple Inc. All rights reserved.<BR>\r
-# Copyright (c) 2011 - 2014, ARM Ltd. All rights reserved.<BR>\r
+# Copyright (c) 2011 - 2015, ARM Ltd. All rights reserved.<BR>\r
#\r
# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
#\r
-# Copyright (c) 2011-2014, ARM Limited. All rights reserved.\r
+# Copyright (c) 2011-2015, ARM 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
#\r
-# Copyright (c) 2011-2014, ARM Limited. All rights reserved.\r
+# Copyright (c) 2011-2015, ARM 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
#\r
-# Copyright (c) 2011-2014, ARM Limited. All rights reserved.\r
+# Copyright (c) 2011-2015, ARM 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
#\r
-# Copyright (c) 2012-2014, ARM Limited. All rights reserved.\r
+# Copyright (c) 2012-2015, ARM 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
# It could be set FALSE to save size.\r
gEfiMdeModulePkgTokenSpaceGuid.PcdConOutGopSupport|TRUE\r
\r
+ #\r
+ # FDT installation : enable the development specific features\r
+ #\r
+ gEmbeddedTokenSpaceGuid.PcdOverridePlatformFdt|TRUE\r
+\r
[PcdsFixedAtBuild.common]\r
gArmPlatformTokenSpaceGuid.PcdFirmwareVendor|"ARM Versatile Express"\r
gEmbeddedTokenSpaceGuid.PcdEmbeddedPrompt|"ArmVExpress-CTA15-A7"\r
# Ethernet (SMSC LAN9118)\r
gEmbeddedTokenSpaceGuid.PcdLan9118DxeBaseAddress|0x1A000000\r
\r
+ #\r
+ # Define the device path to the FDT for the platform\r
+ #\r
+ gEmbeddedTokenSpaceGuid.PcdFdtDevicePaths|L"VenHw(1F15DA3C-37FF-4070-B471-BB4AF12A724A)/MemoryMapped(0x0,0x0E800000,0x0E803000)"\r
+\r
#\r
# ARM OS Loader\r
#\r
#\r
-# Copyright (c) 2012-2014, ARM Limited. All rights reserved.\r
+# Copyright (c) 2012-2015, ARM 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
\r
[FD.ARM_VEXPRESS_CTA15A7_EFI]\r
BaseAddress = 0xB0000000|gArmTokenSpaceGuid.PcdFdBaseAddress # The base address of the Firmware in remapped DRAM.\r
-Size = 0x000B8000|gArmTokenSpaceGuid.PcdFdSize # The size in bytes of the FLASH Device\r
+Size = 0x000C0000|gArmTokenSpaceGuid.PcdFdSize # The size in bytes of the FLASH Device\r
ErasePolarity = 1\r
BlockSize = 0x00001000\r
-NumBlocks = 0xB8\r
+NumBlocks = 0xC0\r
\r
-0x00000000|0x000B8000\r
+0x00000000|0x000C0000\r
gArmTokenSpaceGuid.PcdFvBaseAddress|gArmTokenSpaceGuid.PcdFvSize\r
FV = FVMAIN_COMPACT\r
\r
#\r
INF ArmPlatformPkg/ArmVExpressPkg/ArmVExpressDxe/ArmHwDxe.inf\r
\r
+ #\r
+ # FDT installation\r
+ #\r
+ INF EmbeddedPkg/Drivers/FdtPlatformDxe/FdtPlatformDxe.inf\r
+\r
#\r
# Multimedia Card Interface\r
#\r
# FV Filesystem\r
INF MdeModulePkg/Universal/FvSimpleFileSystemDxe/FvSimpleFileSystemDxe.inf\r
\r
+ # Example to add a Device Tree to the Firmware Volume\r
+ #FILE FREEFORM = PCD(gArmVExpressTokenSpaceGuid.PcdFdtVExpressHwA15x2A7x3) {\r
+ # SECTION RAW = ArmPlatformPkg/ArmVExpressPkg/Fdts/vexpress-v2p-ca15_a7.dtb\r
+ #}\r
+\r
[FV.FVMAIN_COMPACT]\r
FvBaseAddress = 0xB0000000\r
FvForceRebase = TRUE\r
#\r
-# Copyright (c) 2011-2014, ARM Limited. All rights reserved.\r
+# Copyright (c) 2011-2015, ARM 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
# It could be set FALSE to save size.\r
gEfiMdeModulePkgTokenSpaceGuid.PcdConOutGopSupport|TRUE\r
\r
+ #\r
+ # FDT installation : enable the development specific features\r
+ #\r
+ gEmbeddedTokenSpaceGuid.PcdOverridePlatformFdt|TRUE\r
+\r
[PcdsFixedAtBuild.common]\r
gArmPlatformTokenSpaceGuid.PcdFirmwareVendor|"ARM Versatile Express"\r
gEmbeddedTokenSpaceGuid.PcdEmbeddedPrompt|"ArmVExpress"\r
gArmTokenSpaceGuid.PcdGicDistributorBase|0x1e001000\r
gArmTokenSpaceGuid.PcdGicInterruptInterfaceBase|0x1e000100\r
\r
+ #\r
+ # Define the device path to the FDT for the platform\r
+ #\r
+ gEmbeddedTokenSpaceGuid.PcdFdtDevicePaths|L"VenHw(1F15DA3C-37FF-4070-B471-BB4AF12A724A)/MemoryMapped(0x0,0x46800000,0x46803000)"\r
+\r
#\r
# ARM OS Loader\r
#\r
#\r
-# Copyright (c) 2011-2014, ARM Limited. All rights reserved.\r
+# Copyright (c) 2011-2015, ARM 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
# Versatile Express FileSystem\r
INF ArmPlatformPkg/FileSystem/BootMonFs/BootMonFs.inf\r
\r
+ #\r
+ # FDT installation\r
+ #\r
+ INF EmbeddedPkg/Drivers/FdtPlatformDxe/FdtPlatformDxe.inf\r
+\r
#\r
# Multimedia Card Interface\r
#\r
# FV Filesystem\r
INF MdeModulePkg/Universal/FvSimpleFileSystemDxe/FvSimpleFileSystemDxe.inf\r
\r
+ # Example to add a Device Tree to the Firmware Volume\r
+ #FILE FREEFORM = PCD(gArmVExpressTokenSpaceGuid.PcdFdtVExpressHwA9x4) {\r
+ # SECTION RAW = ArmPlatformPkg/ArmVExpressPkg/Fdts/vexpress-v2p-ca9.dtb\r
+ #}\r
+\r
[FV.FVMAIN_COMPACT]\r
FvAlignment = 8\r
ERASE_POLARITY = 1\r
ArmPlatformSecLib|ArmPlatformPkg/ArmVExpressPkg/Library/ArmVExpressSecLibRTSM/ArmVExpressSecLib.inf\r
ArmPlatformLib|ArmPlatformPkg/ArmVExpressPkg/Library/ArmVExpressLibRTSM/ArmVExpressLibSec.inf\r
\r
+[LibraryClasses.common.UEFI_DRIVER, LibraryClasses.common.UEFI_APPLICATION, LibraryClasses.common.DXE_RUNTIME_DRIVER, LibraryClasses.common.DXE_DRIVER]\r
+ PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf\r
+\r
[BuildOptions]\r
GCC:*_*_AARCH64_PLATFORM_FLAGS == -I$(WORKSPACE)/ArmPlatformPkg/ArmVExpressPkg/Include -I$(WORKSPACE)/ArmPlatformPkg/ArmVExpressPkg/Include/Platform/RTSM\r
\r
# to configure the Non-Secure interrupts in the GIC Redistributors\r
# which is not supported at the moment.\r
gArmTokenSpaceGuid.PcdArmGicV3WithV2Legacy|TRUE\r
+ #\r
+ # FDT installation : enable the development specific features\r
+ #\r
+ gEmbeddedTokenSpaceGuid.PcdOverridePlatformFdt|TRUE\r
\r
[PcdsFixedAtBuild.common]\r
gArmPlatformTokenSpaceGuid.PcdFirmwareVendor|"ARM Fixed Virtual Platform"\r
# Set tick frequency value to 100Mhz\r
gArmTokenSpaceGuid.PcdArmArchTimerFreqInHz|100000000\r
\r
+[PcdsDynamicDefault.common]\r
+ #\r
+ # The size of a dynamic PCD of the (VOID*) type can not be increased at run\r
+ # time from its size at build time. Set the "PcdFdtDevicePaths" PCD to a 128\r
+ # character "empty" string, to allow to be able to set FDT text device paths\r
+ # up to 128 characters long.\r
+ #\r
+ gEmbeddedTokenSpaceGuid.PcdFdtDevicePaths|L" "\r
+\r
################################################################################\r
#\r
# Components Section - list of all EDK II Modules needed by this Platform\r
#\r
-# Copyright (c) 2011 - 2014, ARM Limited. All rights reserved.\r
+# Copyright (c) 2011 - 2015, ARM 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
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
+ INF MdeModulePkg/Universal/PCD/Dxe/Pcd.inf\r
\r
#\r
# PI DXE Drivers producing Architectural Protocols (EFI Services)\r
INF ArmPlatformPkg/ArmVExpressPkg/ArmVExpressDxe/ArmFvpDxe.inf\r
INF OvmfPkg/VirtioBlkDxe/VirtioBlk.inf\r
\r
+ #\r
+ # FDT installation\r
+ #\r
+ INF EmbeddedPkg/Drivers/FdtPlatformDxe/FdtPlatformDxe.inf\r
+\r
#\r
# UEFI application (Shell Embedded Boot Loader)\r
#\r
#\r
-# Copyright (c) 2011-2014, ARM Limited. All rights reserved.\r
+# Copyright (c) 2011-2015, ARM 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
ArmPlatformSecLib|ArmPlatformPkg/ArmVExpressPkg/Library/ArmVExpressSecLibRTSM/ArmVExpressSecLib.inf\r
ArmPlatformLib|ArmPlatformPkg/ArmVExpressPkg/Library/ArmVExpressLibRTSM/ArmVExpressLibSec.inf\r
\r
+[LibraryClasses.common.UEFI_DRIVER, LibraryClasses.common.UEFI_APPLICATION, LibraryClasses.common.DXE_RUNTIME_DRIVER, LibraryClasses.common.DXE_DRIVER]\r
+ PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf\r
+\r
[BuildOptions]\r
RVCT:*_*_ARM_PLATFORM_FLAGS == --cpu Cortex-A15 -I$(WORKSPACE)/ArmPlatformPkg/ArmVExpressPkg/Include -I$(WORKSPACE)/ArmPlatformPkg/ArmVExpressPkg/Include/Platform/RTSM\r
\r
# It could be set FALSE to save size.\r
gEfiMdeModulePkgTokenSpaceGuid.PcdConOutGopSupport|TRUE\r
\r
+ #\r
+ # FDT installation : enable the development specific features\r
+ #\r
+ gEmbeddedTokenSpaceGuid.PcdOverridePlatformFdt|TRUE\r
+\r
[PcdsFixedAtBuild.common]\r
gArmPlatformTokenSpaceGuid.PcdFirmwareVendor|"ARM Versatile Express"\r
gEmbeddedTokenSpaceGuid.PcdEmbeddedPrompt|"ArmVExpress-RTSM"\r
#\r
gArmTokenSpaceGuid.PcdArmArchTimerFreqInHz|100000000\r
\r
+[PcdsDynamicDefault.common]\r
+ #\r
+ # The size of a dynamic PCD of the (VOID*) type can not be increased at run\r
+ # time from its size at build time. Set the "PcdFdtDevicePaths" PCD to a 128\r
+ # character "empty" string, to allow to be able to set FDT text device paths\r
+ # up to 128 characters long.\r
+ #\r
+ gEmbeddedTokenSpaceGuid.PcdFdtDevicePaths|L" "\r
\r
################################################################################\r
#\r
#\r
-# Copyright (c) 2011-2014, ARM Limited. All rights reserved.\r
+# Copyright (c) 2011-2015, ARM 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
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
+ INF MdeModulePkg/Universal/PCD/Dxe/Pcd.inf\r
\r
#\r
# PI DXE Drivers producing Architectural Protocols (EFI Services)\r
INF ArmPlatformPkg/ArmVExpressPkg/ArmVExpressDxe/ArmFvpDxe.inf\r
INF OvmfPkg/VirtioBlkDxe/VirtioBlk.inf\r
\r
+ #\r
+ # FDT installation\r
+ #\r
+ INF EmbeddedPkg/Drivers/FdtPlatformDxe/FdtPlatformDxe.inf\r
+\r
#\r
# UEFI application (Shell Embedded Boot Loader)\r
#\r
# FV Filesystem\r
INF MdeModulePkg/Universal/FvSimpleFileSystemDxe/FvSimpleFileSystemDxe.inf\r
\r
+ # Example to add a Device Tree to the Firmware Volume\r
+ #FILE FREEFORM = PCD(gArmVExpressTokenSpaceGuid.PcdFdtVExpressFvpA15x1) {\r
+ # SECTION RAW = ArmPlatformPkg/ArmVExpressPkg/Fdts/rtsm_ve-ca15x1.dtb\r
+ #}\r
+\r
[FV.FVMAIN_COMPACT]\r
FvAlignment = 8\r
ERASE_POLARITY = 1\r
#\r
-# Copyright (c) 2011-2014, ARM Limited. All rights reserved.\r
+# Copyright (c) 2011-2015, ARM 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
ArmPlatformSecLib|ArmPlatformPkg/ArmVExpressPkg/Library/ArmVExpressSecLibRTSM/ArmVExpressSecLib.inf\r
ArmPlatformLib|ArmPlatformPkg/ArmVExpressPkg/Library/ArmVExpressLibRTSM/ArmVExpressLibSec.inf\r
\r
+[LibraryClasses.common.UEFI_DRIVER, LibraryClasses.common.UEFI_APPLICATION, LibraryClasses.common.DXE_RUNTIME_DRIVER, LibraryClasses.common.DXE_DRIVER]\r
+ PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf\r
+\r
[BuildOptions]\r
RVCT:*_*_ARM_PLATFORM_FLAGS == --cpu Cortex-A15 -I$(WORKSPACE)/ArmPlatformPkg/ArmVExpressPkg/Include -I$(WORKSPACE)/ArmPlatformPkg/ArmVExpressPkg/Include/Platform/RTSM\r
\r
# It could be set FALSE to save size.\r
gEfiMdeModulePkgTokenSpaceGuid.PcdConOutGopSupport|TRUE\r
\r
+ #\r
+ # FDT installation : enable the development specific features\r
+ #\r
+ gEmbeddedTokenSpaceGuid.PcdOverridePlatformFdt|TRUE\r
+\r
[PcdsFixedAtBuild.common]\r
gArmPlatformTokenSpaceGuid.PcdFirmwareVendor|"ARM Versatile Express"\r
gEmbeddedTokenSpaceGuid.PcdEmbeddedPrompt|"ArmVExpress-RTSM"\r
#\r
gArmTokenSpaceGuid.PcdArmArchTimerFreqInHz|100000000\r
\r
+[PcdsDynamicDefault.common]\r
+ #\r
+ # The size of a dynamic PCD of the (VOID*) type can not be increased at run\r
+ # time from its size at build time. Set the "PcdFdtDevicePaths" PCD to a 128\r
+ # character "empty" string, to allow to be able to set FDT text device paths\r
+ # up to 128 characters long.\r
+ #\r
+ gEmbeddedTokenSpaceGuid.PcdFdtDevicePaths|L" "\r
\r
################################################################################\r
#\r
#\r
-# Copyright (c) 2011-2014, ARM Limited. All rights reserved.\r
+# Copyright (c) 2011-2015, ARM 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
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
+ INF MdeModulePkg/Universal/PCD/Dxe/Pcd.inf\r
\r
#\r
# PI DXE Drivers producing Architectural Protocols (EFI Services)\r
INF ArmPlatformPkg/ArmVExpressPkg/ArmVExpressDxe/ArmFvpDxe.inf\r
INF OvmfPkg/VirtioBlkDxe/VirtioBlk.inf\r
\r
+ #\r
+ # FDT installation\r
+ #\r
+ INF EmbeddedPkg/Drivers/FdtPlatformDxe/FdtPlatformDxe.inf\r
+\r
#\r
# UEFI application (Shell Embedded Boot Loader)\r
#\r
# FV Filesystem\r
INF MdeModulePkg/Universal/FvSimpleFileSystemDxe/FvSimpleFileSystemDxe.inf\r
\r
+ # Example to add a Device Tree to the Firmware Volume\r
+ #FILE FREEFORM = PCD(gArmVExpressTokenSpaceGuid.PcdFdtVExpressFvpA15x4) {\r
+ # SECTION RAW = ArmPlatformPkg/ArmVExpressPkg/Fdts/rtsm_ve-ca15x4.dtb\r
+ #}\r
+\r
[FV.FVMAIN_COMPACT]\r
FvAlignment = 8\r
ERASE_POLARITY = 1\r
#\r
-# Copyright (c) 2011-2014, ARM Limited. All rights reserved.\r
+# Copyright (c) 2011-2015, ARM 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
# Uncomment to turn on GDB stub in SEC.\r
#DebugAgentLib|EmbeddedPkg/Library/GdbDebugAgent/GdbDebugAgent.inf\r
\r
+[LibraryClasses.common.UEFI_DRIVER, LibraryClasses.common.UEFI_APPLICATION, LibraryClasses.common.DXE_RUNTIME_DRIVER, LibraryClasses.common.DXE_DRIVER]\r
+ PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf\r
+\r
[BuildOptions]\r
RVCT:*_*_ARM_PLATFORM_FLAGS == --cpu Cortex-A9 -I$(WORKSPACE)/ArmPlatformPkg/ArmVExpressPkg/Include -I$(WORKSPACE)/ArmPlatformPkg/ArmVExpressPkg/Include/Platform/RTSM\r
\r
# It could be set FALSE to save size.\r
gEfiMdeModulePkgTokenSpaceGuid.PcdConOutGopSupport|TRUE\r
\r
+ #\r
+ # FDT installation : enable the development specific features\r
+ #\r
+ gEmbeddedTokenSpaceGuid.PcdOverridePlatformFdt|TRUE\r
+\r
[PcdsFixedAtBuild.common]\r
gArmPlatformTokenSpaceGuid.PcdFirmwareVendor|"ARM Versatile Express"\r
gEmbeddedTokenSpaceGuid.PcdEmbeddedPrompt|"ArmVExpress-RTSM"\r
#\r
gArmTokenSpaceGuid.PcdL2x0ControllerBase|0x1E00A000\r
\r
+[PcdsDynamicDefault.common]\r
+ #\r
+ # The size of a dynamic PCD of the (VOID*) type can not be increased at run\r
+ # time from its size at build time. Set the "PcdFdtDevicePaths" PCD to a 128\r
+ # character "empty" string, to allow to be able to set FDT text device paths\r
+ # up to 128 characters long.\r
+ #\r
+ gEmbeddedTokenSpaceGuid.PcdFdtDevicePaths|L" "\r
+\r
################################################################################\r
#\r
# Components Section - list of all EDK II Modules needed by this Platform\r
#\r
-# Copyright (c) 2011-2014, ARM Limited. All rights reserved.\r
+# Copyright (c) 2011-2015, ARM 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
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
+ INF MdeModulePkg/Universal/PCD/Dxe/Pcd.inf\r
\r
#\r
# PI DXE Drivers producing Architectural Protocols (EFI Services)\r
INF ArmPlatformPkg/ArmVExpressPkg/ArmVExpressDxe/ArmFvpDxe.inf\r
INF OvmfPkg/VirtioBlkDxe/VirtioBlk.inf\r
\r
+ #\r
+ # FDT installation\r
+ #\r
+ INF EmbeddedPkg/Drivers/FdtPlatformDxe/FdtPlatformDxe.inf\r
+\r
#\r
# UEFI application (Shell Embedded Boot Loader)\r
#\r
# FV Filesystem\r
INF MdeModulePkg/Universal/FvSimpleFileSystemDxe/FvSimpleFileSystemDxe.inf\r
\r
+ # Example to add a Device Tree to the Firmware Volume\r
+ #FILE FREEFORM = PCD(gArmVExpressTokenSpaceGuid.PcdFdtVExpressFvpA9x4) {\r
+ # SECTION RAW = ArmPlatformPkg/ArmVExpressPkg/Fdts/rtsm_ve-ca9x4.dtb\r
+ #}\r
+\r
[FV.FVMAIN_COMPACT]\r
FvAlignment = 8\r
ERASE_POLARITY = 1\r
#\r
-# Copyright (c) 2011-2013, ARM Limited. All rights reserved.\r
+# Copyright (c) 2011-2015, ARM 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
ArmPlatformSecLib|ArmPlatformPkg/ArmVExpressPkg/Library/ArmVExpressSecLibRTSM/ArmVExpressFoundationSecLib.inf\r
ArmPlatformLib|ArmPlatformPkg/ArmVExpressPkg/Library/ArmVExpressLibRTSM/ArmVExpressFoundationLibSec.inf\r
\r
+[LibraryClasses.common.UEFI_DRIVER, LibraryClasses.common.UEFI_APPLICATION, LibraryClasses.common.DXE_RUNTIME_DRIVER, LibraryClasses.common.DXE_DRIVER]\r
+ PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf\r
+\r
[BuildOptions]\r
GCC:*_*_AARCH64_PLATFORM_FLAGS == -I$(WORKSPACE)/ArmPlatformPkg/ArmVExpressPkg/Include -I$(WORKSPACE)/ArmPlatformPkg/ArmVExpressPkg/Include/Platform/RTSM\r
\r
# It could be set FALSE to save size.\r
gEfiMdeModulePkgTokenSpaceGuid.PcdConOutGopSupport|FALSE\r
\r
+ #\r
+ # FDT installation : enable the development specific features\r
+ #\r
+ gEmbeddedTokenSpaceGuid.PcdOverridePlatformFdt|TRUE\r
+\r
[PcdsFixedAtBuild.common]\r
gArmPlatformTokenSpaceGuid.PcdFirmwareVendor|"ARM Foundation Model"\r
gEmbeddedTokenSpaceGuid.PcdEmbeddedPrompt|"ArmFoundation"\r
# Set model tick to 100Mhz. This depends a lot on workstation performance.\r
gArmTokenSpaceGuid.PcdArmArchTimerFreqInHz|100000000\r
\r
+[PcdsDynamicDefault.common]\r
+ #\r
+ # The size of a dynamic PCD of the (VOID*) type can not be increased at run\r
+ # time from its size at build time. Set the "PcdFdtDevicePaths" PCD to a 128\r
+ # character "empty" string, to allow to be able to set FDT text device paths\r
+ # up to 128 characters long.\r
+ #\r
+ gEmbeddedTokenSpaceGuid.PcdFdtDevicePaths|L" "\r
+\r
################################################################################\r
#\r
# Components Section - list of all EDK II Modules needed by this Platform\r
#\r
-# Copyright (c) 2011 - 2014, ARM Limited. All rights reserved.\r
+# Copyright (c) 2011 - 2015, ARM 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
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
+ INF MdeModulePkg/Universal/PCD/Dxe/Pcd.inf\r
\r
#\r
# PI DXE Drivers producing Architectural Protocols (EFI Services)\r
INF ArmPlatformPkg/ArmVExpressPkg/ArmVExpressDxe/ArmFvpDxe.inf\r
INF OvmfPkg/VirtioBlkDxe/VirtioBlk.inf\r
\r
+ #\r
+ # FDT installation\r
+ #\r
+ INF EmbeddedPkg/Drivers/FdtPlatformDxe/FdtPlatformDxe.inf\r
+\r
#\r
# UEFI application (Shell Embedded Boot Loader)\r
#\r
#\r
-# Copyright (c) 2011-2013, ARM Limited. All rights reserved.\r
+# Copyright (c) 2011-2015, ARM 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
ArmPlatformSecLib|ArmPlatformPkg/ArmVExpressPkg/Library/ArmVExpressSecLibRTSM/ArmVExpressSecLib.inf\r
ArmPlatformLib|ArmPlatformPkg/ArmVExpressPkg/Library/ArmVExpressLibRTSM/ArmVExpressLibSec.inf\r
\r
+[LibraryClasses.common.UEFI_DRIVER, LibraryClasses.common.UEFI_APPLICATION, LibraryClasses.common.DXE_RUNTIME_DRIVER, LibraryClasses.common.DXE_DRIVER]\r
+ PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf\r
+\r
[BuildOptions]\r
GCC:*_*_AARCH64_PLATFORM_FLAGS == -I$(WORKSPACE)/ArmPlatformPkg/ArmVExpressPkg/Include -I$(WORKSPACE)/ArmPlatformPkg/ArmVExpressPkg/Include/Platform/RTSM\r
\r
# This PCD ensures the secondary cores are parked into the AArch64 Linux parking protocol.\r
gArmTokenSpaceGuid.PcdArmLinuxSpinTable|TRUE\r
\r
+ #\r
+ # FDT installation : enable the development specific features\r
+ #\r
+ gEmbeddedTokenSpaceGuid.PcdOverridePlatformFdt|TRUE\r
+\r
[PcdsFixedAtBuild.common]\r
gArmPlatformTokenSpaceGuid.PcdFirmwareVendor|"ARM Versatile Express"\r
gEmbeddedTokenSpaceGuid.PcdEmbeddedPrompt|"ArmVExpress-RTSM"\r
# Set model tick to 100Mhz. This depends a lot on workstation performance.\r
gArmTokenSpaceGuid.PcdArmArchTimerFreqInHz|100000000\r
\r
+[PcdsDynamicDefault.common]\r
+ #\r
+ # The size of a dynamic PCD of the (VOID*) type can not be increased at run\r
+ # time from its size at build time. Set the "PcdFdtDevicePaths" PCD to a 128\r
+ # character "empty" string, to allow to be able to set FDT text device paths\r
+ # up to 128 characters long.\r
+ #\r
+ gEmbeddedTokenSpaceGuid.PcdFdtDevicePaths|L" "\r
+\r
################################################################################\r
#\r
# Components Section - list of all EDK II Modules needed by this Platform\r
#\r
-# Copyright (c) 2011 - 2014, ARM Limited. All rights reserved.\r
+# Copyright (c) 2011 - 2015, ARM 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
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
+ INF MdeModulePkg/Universal/PCD/Dxe/Pcd.inf\r
\r
#\r
# PI DXE Drivers producing Architectural Protocols (EFI Services)\r
INF ArmPlatformPkg/ArmVExpressPkg/ArmVExpressDxe/ArmFvpDxe.inf\r
INF OvmfPkg/VirtioBlkDxe/VirtioBlk.inf\r
\r
+ #\r
+ # FDT installation\r
+ #\r
+ INF EmbeddedPkg/Drivers/FdtPlatformDxe/FdtPlatformDxe.inf\r
+\r
#\r
# UEFI application (Shell Embedded Boot Loader)\r
#\r
gEfiShellPkgTokenSpaceGuid.PcdShellLibAutoInitialize|FALSE\r
\r
[Components.common]\r
+ MdeModulePkg/Universal/PCD/Dxe/Pcd.inf\r
+\r
# Versatile Express FileSystem\r
ArmPlatformPkg/FileSystem/BootMonFs/BootMonFs.inf\r
\r
// model or hardware platforms).\r
//\r
CONST ARM_VEXPRESS_PLATFORM ArmVExpressPlatforms[] = {\r
- { ARM_FVP_VEXPRESS_AEMv8x4 },\r
- { ARM_FVP_BASE_AEMv8x4_AEMv8x4_GICV2 },\r
- { ARM_FVP_BASE_AEMv8x4_AEMv8x4_GICV2_LEGACY },\r
- { ARM_FVP_BASE_AEMv8x4_AEMv8x4_GICV3 },\r
- { ARM_FVP_FOUNDATION_GICV2 },\r
- { ARM_FVP_FOUNDATION_GICV2_LEGACY },\r
- { ARM_FVP_FOUNDATION_GICV3 },\r
- { ARM_FVP_VEXPRESS_UNKNOWN }\r
+ { ARM_FVP_VEXPRESS_AEMv8x4, { 0x240d627e, 0xeb4d, 0x447d, { 0x86, 0x30, 0xf2, 0x12, 0x3b, 0xc3, 0x89, 0x3f } }, L"rtsm_ve-aemv8a.dtb" },\r
+ { ARM_FVP_BASE_AEMv8x4_AEMv8x4_GICV2, { 0xfbed0b94, 0x3c81, 0x49e4, { 0xbd, 0xec, 0xd4, 0xf4, 0xa8, 0x47, 0xeb, 0x51 } }, L"fvp-base-gicv2-psci.dtb" },\r
+ { ARM_FVP_BASE_AEMv8x4_AEMv8x4_GICV2_LEGACY, { 0x6d8dfd91, 0x431a, 0x4e6c, { 0x84, 0x5a, 0x15, 0xf1, 0xfc, 0x8d, 0x9b, 0xe2 } }, L"fvp-base-gicv2legacy-psci.dtb" },\r
+ { ARM_FVP_BASE_AEMv8x4_AEMv8x4_GICV3, { 0xa8ac2953, 0xc4bb, 0x4914, { 0x87, 0xf5, 0xc5, 0x97, 0x5d, 0x7b, 0x32, 0xd1 } }, L"fvp-base-gicv3-psci.dtb" },\r
+ { ARM_FVP_FOUNDATION_GICV2, { 0x4328cb83, 0x6e50, 0x4cb8, { 0xaa, 0x8c, 0xfb, 0x7a, 0xba, 0xba, 0x37, 0xd8 } }, L"fvp-foundation-gicv2-psci.dtb" },\r
+ { ARM_FVP_FOUNDATION_GICV2_LEGACY, { 0x6af00d18, 0x6dfe, 0x45ed, { 0xa6, 0xc4, 0xb4, 0x4d, 0x57, 0xfd, 0xd8, 0xf5 } }, L"fvp-foundation-gicv2legacy-psci.dtb" },\r
+ { ARM_FVP_FOUNDATION_GICV3, { 0x4a17b7fa, 0xf052, 0x4dc1, { 0x92, 0x79, 0x43, 0x80, 0x92, 0x41, 0xf9, 0x98 } }, L"fvp-foundation-gicv3-psci.dtb" },\r
+ { ARM_FVP_VEXPRESS_UNKNOWN, { 0x0, 0x0, 0x0, { 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0 } } }\r
};\r
\r
/**\r
// model or hardware platforms).\r
//\r
CONST ARM_VEXPRESS_PLATFORM ArmVExpressPlatforms[] = {\r
- { ARM_FVP_VEXPRESS_A9x4 },\r
- { ARM_FVP_VEXPRESS_A15x1 },\r
- { ARM_FVP_VEXPRESS_A15x2 },\r
- { ARM_FVP_VEXPRESS_A15x4 },\r
- { ARM_FVP_VEXPRESS_UNKNOWN }\r
+ { ARM_FVP_VEXPRESS_A9x4, { 0x943f2ae9, 0x51b2, 0x48b2, { 0x82, 0xc4, 0x9a, 0xeb, 0x2c, 0x21, 0xd8, 0xe1 } }, L"rtsm_ve-cortex_a9x4.dtb" },\r
+ { ARM_FVP_VEXPRESS_A15x1, { 0x581930c3, 0x9f53, 0x4c53, { 0x91, 0x23, 0x43, 0xb8, 0x65, 0xdf, 0x3f, 0x23} }, L"rtsm_ve-cortex_a15x1.dtb" },\r
+ { ARM_FVP_VEXPRESS_A15x2, { 0x3f10b34a, 0xa310, 0x472c, { 0xac, 0xb9, 0x36, 0x0b, 0x1d, 0xb5, 0x7a, 0x8b} }, L"rtsm_ve-cortex_a15x2.dtb" },\r
+ { ARM_FVP_VEXPRESS_A15x4, { 0x9a783838, 0x8a77, 0x4cdb, { 0x82, 0xa4, 0x35, 0x91, 0x2c, 0x08, 0x8a, 0x2e} }, L"rtsm_ve-cortex_a15x4.dtb" },\r
+ { ARM_FVP_VEXPRESS_UNKNOWN, { 0x0, 0x0, 0x0, { 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0 } } }\r
};\r
\r
/**\r
/** @file\r
\r
- Copyright (c) 2013-2014, ARM Ltd. All rights reserved.<BR>\r
+ Copyright (c) 2013-2015, ARM Ltd. All rights reserved.<BR>\r
\r
This program and the accompanying materials\r
are licensed and made available under the terms and conditions of the BSD License\r
\r
#include <Library/VirtioMmioDeviceLib.h>\r
#include <Library/ArmShellCmdLib.h>\r
+#include <Library/MemoryAllocationLib.h>\r
\r
#define ARM_FVP_BASE_VIRTIO_BLOCK_BASE 0x1c130000\r
\r
}\r
};\r
\r
+/**\r
+ * Generic UEFI Entrypoint for 'ArmFvpDxe' driver\r
+ * See UEFI specification for the details of the parameters\r
+ */\r
EFI_STATUS\r
EFIAPI\r
ArmFvpInitialise (\r
IN EFI_SYSTEM_TABLE *SystemTable\r
)\r
{\r
- EFI_STATUS Status;\r
+ CONST ARM_VEXPRESS_PLATFORM* Platform;\r
+ EFI_STATUS Status;\r
+ CHAR16 *TextDevicePath;\r
+ UINTN TextDevicePathSize;\r
+ VOID *Buffer;\r
\r
Status = gBS->InstallProtocolInterface (&ImageHandle,\r
&gEfiDevicePathProtocolGuid, EFI_NATIVE_INTERFACE,\r
return Status;\r
}\r
\r
+ Status = ArmVExpressGetPlatform (&Platform);\r
+ if (!EFI_ERROR (Status)) {\r
+ TextDevicePathSize = StrSize ((CHAR16*)PcdGetPtr (PcdFvpFdtDevicePathsBase)) - sizeof (CHAR16);\r
+ TextDevicePathSize += StrSize (Platform->FdtName);\r
+\r
+ TextDevicePath = AllocatePool (TextDevicePathSize);\r
+ if (TextDevicePath != NULL) {\r
+ StrCpy (TextDevicePath, ((CHAR16*)PcdGetPtr (PcdFvpFdtDevicePathsBase)));\r
+ StrCat (TextDevicePath, Platform->FdtName);\r
+ Buffer = PcdSetPtr (PcdFdtDevicePaths, &TextDevicePathSize, TextDevicePath);\r
+ if (Buffer == NULL) {\r
+ DEBUG ((\r
+ EFI_D_ERROR,\r
+ "ArmFvpDxe: Setting of FDT device path in PcdFdtDevicePaths failed - %r\n", EFI_BUFFER_TOO_SMALL\r
+ ));\r
+ }\r
+ FreePool (TextDevicePath);\r
+ }\r
+ }\r
+\r
// Declare the Virtio BlockIo device\r
Status = VirtioMmioInstallDevice (ARM_FVP_BASE_VIRTIO_BLOCK_BASE, ImageHandle);\r
if (EFI_ERROR (Status)) {\r
ArmPkg/ArmPkg.dec\r
ArmPlatformPkg/ArmPlatformPkg.dec\r
ArmPlatformPkg/ArmVExpressPkg/ArmVExpressPkg.dec\r
+ EmbeddedPkg/EmbeddedPkg.dec\r
OvmfPkg/OvmfPkg.dec\r
\r
[LibraryClasses]\r
+ PcdLib\r
ArmShellCmdRunAxfLib\r
ArmLib\r
ArmPlatformLib\r
BaseMemoryLib\r
+ MemoryAllocationLib\r
UefiDriverEntryPoint\r
UefiBootServicesTableLib\r
VirtioMmioDeviceLib\r
\r
[LibraryClasses.AARCH64]\r
ArmGicLib\r
+\r
+[FixedPcd]\r
+ gArmVExpressTokenSpaceGuid.PcdFvpFdtDevicePathsBase\r
+\r
+[Pcd]\r
+ gEmbeddedTokenSpaceGuid.PcdFdtDevicePaths\r
/** @file\r
\r
- Copyright (c) 2013-2014, ARM Ltd. All rights reserved.<BR>\r
+ Copyright (c) 2013-2015, ARM Ltd. All rights reserved.<BR>\r
\r
This program and the accompanying materials\r
are licensed and made available under the terms and conditions of the BSD License\r
// model or hardware platforms).\r
//\r
CONST ARM_VEXPRESS_PLATFORM ArmVExpressPlatforms[] = {\r
- { ARM_HW_A9x4 },\r
- { ARM_HW_A15x2_A7x3 },\r
- { ARM_HW_A15 },\r
- { ARM_HW_A5 },\r
- { ARM_FVP_VEXPRESS_UNKNOWN }\r
+ { ARM_HW_A9x4, { 0x2fd21cf6, 0xe6e8, 0x4ff2, { 0xa9, 0xca, 0x3b, 0x9f, 0x00, 0xe9, 0x28, 0x89 } }, L"vexpress-v2p-ca9.dtb" },\r
+ { ARM_HW_A15x2_A7x3, { 0xd5e606eb, 0x83df, 0x4e90, { 0x81, 0xe8, 0xc3, 0xdb, 0x2f, 0x77, 0x17, 0x9a } }, L"vexpress-v2p-ca15_a7.dtb" },\r
+ { ARM_HW_A15, { 0x6b8947c2, 0x4287, 0x4d91, { 0x8f, 0xe0, 0xa3, 0x81, 0xea, 0x5b, 0x56, 0x8f } }, L"vexpress-v2p-ca15-tc1.dtb" },\r
+ { ARM_HW_A5, { 0xa2cc7663, 0x4d7c, 0x448a, { 0xaa, 0xb5, 0x4c, 0x03, 0x4b, 0x6f, 0xda, 0xb7 } }, L"vexpress-v2p-ca5s.dtb" },\r
+ { ARM_FVP_VEXPRESS_UNKNOWN, { 0x0, 0x0, 0x0, { 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0 } } }\r
};\r
\r
/**\r
return EFI_NOT_FOUND;\r
}\r
\r
+/**\r
+ * Generic UEFI Entrypoint for 'ArmHwDxe' driver\r
+ * See UEFI specification for the details of the parameters\r
+ */\r
EFI_STATUS\r
EFIAPI\r
ArmHwInitialise (\r
#/** @file\r
#\r
-# Copyright (c) 2013-2014, ARM Ltd. All rights reserved.<BR>\r
+# Copyright (c) 2013-2015, ARM Ltd. All rights reserved.<BR>\r
#\r
# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
\r
[Defines]\r
INF_VERSION = 0x00010006\r
- BASE_NAME = ArmFvpDxe\r
+ BASE_NAME = ArmHwDxe\r
FILE_GUID = fe61bb5f-1b67-4c24-b346-73db42e873e5\r
MODULE_TYPE = UEFI_DRIVER\r
VERSION_STRING = 1.0\r
[Packages]\r
ArmPkg/ArmPkg.dec\r
ArmPlatformPkg/ArmPlatformPkg.dec\r
+ EmbeddedPkg/EmbeddedPkg.dec\r
MdePkg/MdePkg.dec\r
\r
[LibraryClasses]\r
ArmShellCmdRunAxfLib\r
+ MemoryAllocationLib\r
UefiDriverEntryPoint\r
+\r
+[Protocols]\r
+ gEfiDevicePathProtocolGuid\r
/** @file\r
\r
- Copyright (c) 2014, ARM Ltd. All rights reserved.\r
+ Copyright (c) 2014-2015, ARM Ltd. All rights reserved.\r
\r
This program and the accompanying materials are licensed and made available\r
under the terms and conditions of the BSD License which accompanies this\r
\r
typedef struct {\r
ARM_VEXPRESS_PLATFORM_ID Id;\r
- // Will be extended with platform specific information\r
+\r
+ // Flattened Device Tree (FDT) File\r
+ EFI_GUID FdtGuid; /// Name of the FDT when present into the FV\r
+ CONST CHAR16* FdtName; /// Name of the FDT when present into a File System\r
} ARM_VEXPRESS_PLATFORM;\r
\r
// Array that contains the list of the VExpress based platform supported by this DXE driver\r
#/** @file\r
# Arm Versatile Express package.\r
#\r
-# Copyright (c) 2012, ARM Limited. All rights reserved.\r
+# Copyright (c) 2012-2015, ARM 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
+# This program and the accompanying materials are licensed and made available\r
+# under the terms and conditions of the BSD License which accompanies this\r
+# 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
#\r
# For a list of mode numbers look in LcdArmVExpress.c\r
#\r
- gArmVExpressTokenSpaceGuid.PcdPL111LcdMaxMode|3|UINT32|0x00000003\r
- gArmVExpressTokenSpaceGuid.PcdPL111LcdVideoModeOscId|1|UINT32|0x00000004\r
- gArmVExpressTokenSpaceGuid.PcdHdLcdVideoModeOscId|0|UINT32|0x00000009\r
+ gArmVExpressTokenSpaceGuid.PcdPL111LcdMaxMode|3|UINT32|0x00000001\r
+ gArmVExpressTokenSpaceGuid.PcdPL111LcdVideoModeOscId|1|UINT32|0x00000002\r
+ gArmVExpressTokenSpaceGuid.PcdHdLcdVideoModeOscId|0|UINT32|0x00000003\r
\r
#\r
# Device path of block device on which Fastboot will flash partitions\r
#\r
- gArmVExpressTokenSpaceGuid.PcdAndroidFastbootNvmDevicePath|""|VOID*|0x00000001\r
+ gArmVExpressTokenSpaceGuid.PcdAndroidFastbootNvmDevicePath|""|VOID*|0x00000004\r
+\r
+ # FVP platforms : install FDT from SemiHosting\r
+ gArmVExpressTokenSpaceGuid.PcdFvpFdtDevicePathsBase|L"VenHw(C5B9C74A-6D72-4719-99AB-C59F199091EB)/"|VOID*|0x00000005\r
+ # HW platforms : install FDT from NOR Flash\r
+ gArmVExpressTokenSpaceGuid.PcdHwFdtDevicePathsBase|L"VenHw(E7223039-5836-41E1-B542-D7EC736C5E59)/"|VOID*|0x00000006\r
+\r
+ #\r
+ # ARM Versatile Express FDT Guids\r
+ #\r
+ # FVP platforms\r
+ gArmVExpressTokenSpaceGuid.PcdFdtVExpressFvpA9x4|{ 0xe9, 0x2a, 0x3f, 0x94, 0xb2, 0x51, 0xb2, 0x48, 0x48, 0xb2, 0x82, 0xc4, 0x9a, 0xeb, 0x2c, 0x21, 0xd8, 0xe1 }|VOID*|0x00000007\r
+ gArmVExpressTokenSpaceGuid.PcdFdtVExpressFvpA15x1|{ 0xc3, 0x30, 0x19, 0x58 0x53, 0x9f, 0x53, 0x4c, 0x4, 0xc53, 0x91, 0x23, 0x43, 0xb8, 0x65, 0xdf, 0x3f, 0x23 }|VOID*|0x00000008\r
+ gArmVExpressTokenSpaceGuid.PcdFdtVExpressFvpA15x2|{ 0x4a, 0xb3, 0x10, 0x3f 0x10, 0xa3, 0x2c, 0x47, 0xac, 0xb9, 0x36, 0x0b, 0x1d, 0xb5, 0x7a, 0x8b }|VOID*|0x00000009\r
+ gArmVExpressTokenSpaceGuid.PcdFdtVExpressFvpA15x4|{ 0x38, 0x38, 0x78, 0x9a, 0x77, 0x8a, 0xdb, 0x4c, 0x82, 0xa4, 0x35, 0x91, 0x2c, 0x08, 0x8a, 0x2e }|VOID*|0x0000000A\r
+ # HW platforms\r
+ gArmVExpressTokenSpaceGuid.PcdFdtVExpressHwA9x4|{ 0xf6, 0x1c, 0xd2, 0x2f, 0xe8, 0xe6, 0xf2, 0x4f, 0xa9, 0xca, 0x3b, 0x9f, 0x00, 0xe9, 0x28, 0x89 }|VOID*|0x0000000B\r
+ gArmVExpressTokenSpaceGuid.PcdFdtVExpressHwA15x2A7x3|{ 0xeb, 0x06, e6, 0xd5, 0xdf, 0x83, 0x90, 0x4e, 0x81, 0xe8, 0xc3, 0xdb, 0x2f, 0x77, 0x17, 0x9a }|VOID*|0x0000000C\r
+ gArmVExpressTokenSpaceGuid.PcdFdtVExpressHwA15|{ 0xc2, 0x47, 0x89, 0x6b, 0x87, 0x42, 0x91, 0x4d, 0x8f, 0xe0, 0xa3, 0x81, 0xea, 0x5b, 0x56, 0x8f }|VOID*|0x0000000D\r
+ gArmVExpressTokenSpaceGuid.PcdFdtVExpressHwA5|{ 0x63, 0x76, 0xcc, 0xa2, 0x7c, 0x4d, 0x8a, 0x44, 0xaa, 0xb5, 0x4c, 0x03, 0x4b, 0x6f, 0xda, 0xb7 }|VOID*|0x0000000E\r
#\r
-# Copyright (c) 2011-2012, ARM Limited. All rights reserved.\r
+# Copyright (c) 2011-2015, ARM Limited. All rights reserved.\r
# Copyright (c) 2014, Linaro Limited. All rights reserved.\r
#\r
# This program and the accompanying materials\r
#\r
#\r
# Copyright (c) 2007, Intel Corporation. All rights reserved.<BR>\r
-# Copyright (c) 2012-2014, ARM Ltd. All rights reserved.<BR>\r
+# Copyright (c) 2012-2015, ARM Ltd. All rights reserved.<BR>\r
#\r
# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
EmbeddedPkg/Universal/MmcDxe/MmcDxe.inf\r
\r
# FDT installation\r
- EmbeddedPkg/Library/FdtLoadLib/FdtLoadLib.inf\r
EmbeddedPkg/Drivers/FdtPlatformDxe/FdtPlatformDxe.inf\r
\r
EmbeddedPkg/Application/AndroidFastboot/AndroidFastbootApp.inf\r
+++ /dev/null
-/** @file\r
-*\r
-* Copyright (c) 2014, ARM 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
-#include <PiDxe.h>\r
-#include <Library/DebugLib.h>\r
-#include <Library/FdtLoadLib.h>\r
-#include <Library/MemoryAllocationLib.h>\r
-#include <Library/UefiBootServicesTableLib.h>\r
-\r
-#include <Protocol/DevicePath.h>\r
-#include <Protocol/FirmwareVolume2.h>\r
-#include <Protocol/SimpleFileSystem.h>\r
-\r
-#include <Guid/Fdt.h>\r
-#include <Guid/FileInfo.h>\r
-\r
-#include <libfdt.h>\r
-\r
-//\r
-// Device path for SemiHosting\r
-//\r
-STATIC CONST struct {\r
- VENDOR_DEVICE_PATH Guid;\r
- EFI_DEVICE_PATH_PROTOCOL End;\r
-} mSemihostingDevicePath = {\r
- {\r
- { HARDWARE_DEVICE_PATH, HW_VENDOR_DP, { sizeof (VENDOR_DEVICE_PATH), 0 } },\r
- { 0xC5B9C74A, 0x6D72, 0x4719, { 0x99, 0xAB, 0xC5, 0x9F, 0x19, 0x90, 0x91, 0xEB } }\r
- },\r
- { END_DEVICE_PATH_TYPE, END_ENTIRE_DEVICE_PATH_SUBTYPE, { sizeof (EFI_DEVICE_PATH_PROTOCOL), 0 } }\r
-};\r
-\r
-\r
-/**\r
- This function declares the passed FDT into the UEFI Configuration Table\r
-\r
- @param FdtBlob Base address of the Fdt Blob in System Memory\r
- @param FdtSize Size of the Fdt Blob in System Memory\r
-\r
- @return EFI_SUCCESS Fdt Blob was successfully installed into the configuration table\r
- @return !EFI_SUCCESS Error returned by BS.InstallConfigurationTable()\r
-\r
-**/\r
-STATIC\r
-EFI_STATUS\r
-InstallFdtIntoConfigurationTable (\r
- IN VOID* FdtBlob,\r
- IN UINTN FdtSize\r
- )\r
-{\r
- EFI_STATUS Status;\r
-\r
- // Check the FDT header is valid. We only make this check in DEBUG mode in case the FDT header change on\r
- // production device and this ASSERT() becomes not valid.\r
- ASSERT (fdt_check_header (FdtBlob) == 0);\r
-\r
- // Ensure the Size of the Device Tree is smaller than the size of the read file\r
- ASSERT ((UINTN)fdt_totalsize (FdtBlob) <= FdtSize);\r
-\r
- // Install the FDT into the Configuration Table\r
- Status = gBS->InstallConfigurationTable (&gFdtTableGuid, FdtBlob);\r
-\r
- return Status;\r
-}\r
-\r
-\r
-/**\r
- Load and Install FDT from Semihosting\r
-\r
- @param Filename Name of the file to load from semihosting\r
-\r
- @return EFI_SUCCESS Fdt Blob was successfully installed into the configuration table\r
- from semihosting\r
- @return EFI_NOT_FOUND Fail to locate the file in semihosting\r
- @return EFI_OUT_OF_RESOURCES Fail to allocate memory to contain the blob\r
-**/\r
-EFI_STATUS\r
-InstallFdtFromSemihosting (\r
- IN CONST CHAR16* FileName\r
- )\r
-{\r
- EFI_STATUS Status;\r
- EFI_DEVICE_PATH* Remaining;\r
- EFI_HANDLE Handle;\r
- EFI_SIMPLE_FILE_SYSTEM_PROTOCOL *SemihostingFs;\r
- EFI_FILE_PROTOCOL *Fs;\r
- EFI_FILE_PROTOCOL *File;\r
- EFI_PHYSICAL_ADDRESS FdtBase;\r
- EFI_FILE_INFO *FileInfo;\r
- UINTN FdtSize;\r
- UINTN FileInfoSize;\r
-\r
- // Ensure the Semihosting driver is initialized\r
- Remaining = (EFI_DEVICE_PATH*)&mSemihostingDevicePath;\r
- // The LocateDevicePath() function locates all devices on DevicePath that support Protocol and returns\r
- // the handle to the device that is closest to DevicePath. On output, the device path pointer is modified\r
- // to point to the remaining part of the device path\r
- Status = gBS->LocateDevicePath (&gEfiDevicePathProtocolGuid, &Remaining, &Handle);\r
- if (EFI_ERROR (Status)) {\r
- ASSERT_EFI_ERROR (Status);\r
- return Status;\r
- }\r
-\r
- // Recursive = FALSE: We do not want to start the whole device tree\r
- Status = gBS->ConnectController (Handle, NULL, Remaining, FALSE);\r
- if (EFI_ERROR (Status)) {\r
- return Status;\r
- }\r
-\r
- // Locate the FileSystem\r
- Status = gBS->HandleProtocol (Handle, &gEfiSimpleFileSystemProtocolGuid, (VOID **)&SemihostingFs);\r
- if (EFI_ERROR (Status)) {\r
- ASSERT_EFI_ERROR (Status);\r
- return Status;\r
- }\r
-\r
- // Try to Open the volume and get root directory\r
- Status = SemihostingFs->OpenVolume (SemihostingFs, &Fs);\r
- if (EFI_ERROR (Status)) {\r
- DEBUG ((EFI_D_WARN, "Warning: Fail to open semihosting filesystem that should contain FDT file.\n"));\r
- return Status;\r
- }\r
-\r
- File = NULL;\r
- Status = Fs->Open (Fs, &File, (CHAR16*)FileName, EFI_FILE_MODE_READ, 0);\r
- if (EFI_ERROR (Status)) {\r
- DEBUG ((EFI_D_WARN, "Warning: Fail to load FDT file '%s'.\n", FileName));\r
- Fs->Close (Fs);\r
- return Status;\r
- }\r
-\r
- FileInfoSize = 0;\r
- File->GetInfo (File, &gEfiFileInfoGuid, &FileInfoSize, NULL);\r
- FileInfo = AllocatePool (FileInfoSize);\r
- if (FileInfo == NULL) {\r
- Status = EFI_OUT_OF_RESOURCES;\r
- goto CLOSE_FILES;\r
- }\r
- Status = File->GetInfo (File, &gEfiFileInfoGuid, &FileInfoSize, FileInfo);\r
- if (EFI_ERROR (Status)) {\r
- FreePool (FileInfo);\r
- goto CLOSE_FILES;\r
- }\r
-\r
- // Get the file size\r
- FdtSize = FileInfo->FileSize;\r
- FreePool (FileInfo);\r
-\r
- // The FDT blob is attached to the Configuration Table. It is recommended to load it as Runtime Service Data\r
- // to prevent the kernel to overwrite its data\r
- Status = gBS->AllocatePages (AllocateAnyPages, EfiRuntimeServicesData, EFI_SIZE_TO_PAGES (FdtSize), &FdtBase);\r
- if (!EFI_ERROR (Status)) {\r
- Status = File->Read (File, &FdtSize, (VOID*)(UINTN)(FdtBase));\r
- if (EFI_ERROR (Status)) {\r
- gBS->FreePages (FdtBase, EFI_SIZE_TO_PAGES (FdtSize));\r
- } else {\r
- // Install the FDT as part of the UEFI Configuration Table\r
- Status = InstallFdtIntoConfigurationTable ((VOID*)(UINTN)FdtBase, FdtSize);\r
- if (EFI_ERROR (Status)) {\r
- gBS->FreePages (FdtBase, EFI_SIZE_TO_PAGES (FdtSize));\r
- }\r
- }\r
- }\r
-\r
-CLOSE_FILES:\r
- File->Close (File);\r
- Fs->Close (Fs);\r
- return Status;\r
-}\r
-\r
-/**\r
- Load and Install FDT from Firmware Volume\r
-\r
- @param Filename Guid of the FDT blob to load from firmware volume\r
-\r
- @return EFI_SUCCESS Fdt Blob was successfully installed into the configuration table\r
- from firmware volume\r
- @return EFI_NOT_FOUND Fail to locate the file in firmware volume\r
- @return EFI_OUT_OF_RESOURCES Fail to allocate memory to contain the blob\r
-**/\r
-EFI_STATUS\r
-InstallFdtFromFv (\r
- IN CONST EFI_GUID *FileName\r
- )\r
-{\r
- EFI_STATUS Status;\r
- EFI_HANDLE *HandleBuffer;\r
- UINTN NumberOfHandles;\r
- UINT32 FvStatus;\r
- UINTN Index;\r
- EFI_FIRMWARE_VOLUME2_PROTOCOL *FvInstance;\r
- INTN SectionInstance;\r
- UINTN FdtSize;\r
- VOID* FdtBlob;\r
- EFI_PHYSICAL_ADDRESS FdtBase;\r
-\r
- FvStatus = 0;\r
- SectionInstance = 0;\r
-\r
- // Locate all the Firmware Volume protocols.\r
- Status = gBS->LocateHandleBuffer (\r
- ByProtocol,\r
- &gEfiFirmwareVolume2ProtocolGuid,\r
- NULL,\r
- &NumberOfHandles,\r
- &HandleBuffer\r
- );\r
- if (EFI_ERROR (Status)) {\r
- return Status;\r
- }\r
-\r
- // Looking for FV that contains the FDT blob\r
- for (Index = 0; Index < NumberOfHandles; Index++) {\r
- //\r
- // Get the protocol on this handle\r
- // This should not fail because of LocateHandleBuffer\r
- //\r
- Status = gBS->HandleProtocol (\r
- HandleBuffer[Index],\r
- &gEfiFirmwareVolume2ProtocolGuid,\r
- (VOID**) &FvInstance\r
- );\r
- if (EFI_ERROR (Status)) {\r
- goto FREE_HANDLE_BUFFER;\r
- }\r
-\r
- while (Status == EFI_SUCCESS) {\r
- // FdtBlob must be allocated by ReadSection\r
- FdtBlob = NULL;\r
-\r
- // See if it contains the FDT file\r
- Status = FvInstance->ReadSection (\r
- FvInstance,\r
- FileName,\r
- EFI_SECTION_RAW,\r
- SectionInstance,\r
- &FdtBlob,\r
- &FdtSize,\r
- &FvStatus\r
- );\r
- if (!EFI_ERROR (Status)) {\r
- // When the FDT blob is attached to the Configuration Table it is recommended to load it as Runtime Service Data\r
- // to prevent the kernel to overwrite its data\r
- Status = gBS->AllocatePages (AllocateAnyPages, EfiRuntimeServicesData, EFI_SIZE_TO_PAGES (FdtSize), &FdtBase);\r
- if (EFI_ERROR (Status)) {\r
- goto FREE_HANDLE_BUFFER;\r
- }\r
-\r
- // Copy the FDT to the Runtime memory\r
- gBS->CopyMem ((VOID*)(UINTN)FdtBase, FdtBlob, FdtSize);\r
- // Free the buffer allocated by FvInstance->ReadSection()\r
- gBS->FreePool (FdtBlob);\r
-\r
- // Install the FDT as part of the UEFI Configuration Table\r
- Status = InstallFdtIntoConfigurationTable ((VOID*)(UINTN)FdtBase, FdtSize);\r
- if (EFI_ERROR (Status)) {\r
- gBS->FreePages (FdtBase, EFI_SIZE_TO_PAGES (FdtSize));\r
- }\r
- break;\r
- }\r
- }\r
- }\r
-\r
-FREE_HANDLE_BUFFER:\r
- // Free any allocated buffers\r
- gBS->FreePool (HandleBuffer);\r
-\r
- return Status;\r
-}\r
+++ /dev/null
-#/* @file\r
-# Copyright (c) 2014, 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
-[Defines]\r
- INF_VERSION = 0x00010005\r
- BASE_NAME = FdtLoadLib\r
- FILE_GUID = F00298C1-BBC3-445F-8906-AAEAFE7729A4\r
- MODULE_TYPE = BASE\r
- VERSION_STRING = 1.0\r
- LIBRARY_CLASS = FdtLoadLib\r
-\r
-#\r
-# The following information is for reference only and not required by the build tools.\r
-#\r
-# VALID_ARCHITECTURES = ARM AARCH64\r
-#\r
-\r
-[Sources]\r
- FdtConfigurationTable.c\r
-\r
-[Packages]\r
- MdePkg/MdePkg.dec\r
- EmbeddedPkg/EmbeddedPkg.dec\r
-\r
-[LibraryClasses]\r
- FdtLib\r
-\r
-[Protocols]\r
- gEfiDevicePathProtocolGuid\r
- gEfiSimpleFileSystemProtocolGuid\r
- gEfiFirmwareVolume2ProtocolGuid\r
-\r
-[Guids]\r
- gEfiFileInfoGuid\r
- gFdtTableGuid\r