From 902d8c57dd28b13d10044e4a6f67b406ebb5e45b Mon Sep 17 00:00:00 2001 From: mattp Date: Thu, 17 Jul 2025 19:18:53 -0400 Subject: [PATCH 26/29] Allocate more space for UEFI image --- Platform/RaspberryPi/RPi5/RPi5.dsc | 12 ++++++++---- Platform/RaspberryPi/RPi5/RPi5.fdf | 20 ++++++++++++-------- 2 files changed, 20 insertions(+), 12 deletions(-) diff --git a/Platform/RaspberryPi/RPi5/RPi5.dsc b/Platform/RaspberryPi/RPi5/RPi5.dsc index e7eed390..8edf0458 100644 --- a/Platform/RaspberryPi/RPi5/RPi5.dsc +++ b/Platform/RaspberryPi/RPi5/RPi5.dsc @@ -286,6 +286,10 @@ gEfiMdePkgTokenSpaceGuid.PcdPerformanceLibraryPropertyMask|1 gEfiMdePkgTokenSpaceGuid.PcdPostCodePropertyMask|0 gEfiMdePkgTokenSpaceGuid.PcdUefiLibMaxPrintBufferSize|320 + # + # Follows right after the FD image. (bump the size again) + # + gRaspberryPiTokenSpaceGuid.PcdFdtBaseAddress|0x003e0000 gEfiMdePkgTokenSpaceGuid.PcdDebugPropertyMask|$(DEBUG_PROPERTY_MASK) @@ -394,11 +398,11 @@ gArmPlatformTokenSpaceGuid.PcdSystemMemoryUefiRegionSize|0x04000000 # # 0x00000000 - 0x001F0000 FD (PcdFdBaseAddress, PcdFdSize) - # 0x001F0000 - 0x00210000 DTB (PcdFdtBaseAddress, PcdFdtSize) - # 0x00210000 - ... RAM (PcdSystemMemoryBase, PcdSystemMemorySize) + # 0x003E0000 - 0x00400000 DTB (PcdFdtBaseAddress, PcdFdtSize) + # 0x00400000 - ... RAM (PcdSystemMemoryBase, PcdSystemMemorySize) # - gArmTokenSpaceGuid.PcdSystemMemoryBase|0x00210000 - gArmTokenSpaceGuid.PcdSystemMemorySize|0x3fdf0000 + gArmTokenSpaceGuid.PcdSystemMemoryBase|0x00400000 + gArmTokenSpaceGuid.PcdSystemMemorySize|0x3fc00000 gRaspberryPiTokenSpaceGuid.PcdFdtSize|0x20000 diff --git a/Platform/RaspberryPi/RPi5/RPi5.fdf b/Platform/RaspberryPi/RPi5/RPi5.fdf index 917f5aab..19b169aa 100644 --- a/Platform/RaspberryPi/RPi5/RPi5.fdf +++ b/Platform/RaspberryPi/RPi5/RPi5.fdf @@ -26,11 +26,11 @@ [FD.RPI_EFI] BaseAddress = 0x00000000|gArmTokenSpaceGuid.PcdFdBaseAddress -Size = 0x001f0000|gArmTokenSpaceGuid.PcdFdSize +Size = 0x003e0000|gArmTokenSpaceGuid.PcdFdSize ErasePolarity = 1 BlockSize = 0x00001000|gRaspberryPiTokenSpaceGuid.PcdFirmwareBlockSize -NumBlocks = 0x1f0 +NumBlocks = 0x3e0 ################################################################################ # @@ -57,7 +57,7 @@ FILE = $(TFA_BUILD_BL31) # # UEFI image # -0x00020000|0x001b0000 +0x00020000|0x00390000 gArmTokenSpaceGuid.PcdFvBaseAddress|gArmTokenSpaceGuid.PcdFvSize FV = FVMAIN_COMPACT @@ -71,7 +71,7 @@ FV = FVMAIN_COMPACT # # NV_VARIABLE_STORE -0x001d0000|0x0000e000 +0x003b0000|0x0000e000 gRaspberryPiTokenSpaceGuid.PcdNvStorageVariableBase|gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableSize DATA = { @@ -114,11 +114,11 @@ DATA = { } # NV_EVENT_LOG -0x001de000|0x00001000 +0x003be000|0x00001000 gRaspberryPiTokenSpaceGuid.PcdNvStorageEventLogBase|gRaspberryPiTokenSpaceGuid.PcdNvStorageEventLogSize # NV_FTW_WORKING header -0x001df000|0x00001000 +0x003bf000|0x00001000 gRaspberryPiTokenSpaceGuid.PcdNvStorageFtwWorkingBase|gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingSize DATA = { @@ -133,14 +133,18 @@ DATA = { } # NV_FTW_WORKING data -0x001e0000|0x00010000 +0x003c0000|0x00010000 gRaspberryPiTokenSpaceGuid.PcdNvStorageFtwSpareBase|gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareSize +# reserve some future RAM for the ACPI PCC channel structures, immediately before the DTB +# 0x003d0000|0x00010000 +# gRaspberryPiTokenSpaceGuid.PcdPccBaseAddress|gRaspberryPiTokenSpaceGuid.PcdPccSize + # # This is just for documentation purposes! The DTB reserved space is not part of the FD, # but this is exactly where it is expected to be. # -# 0x001f0000|0x10000 +# 0x003e0000|0x20000 # gRaspberryPiTokenSpaceGuid.PcdFdtBaseAddress|gRaspberryPiTokenSpaceGuid.PcdFdtSize # -- 2.51.2