diff --git a/Platform/Qemu/SbsaQemu/Readme.md b/Platform/Qemu/SbsaQemu/Readme.md index f89a4597c9..cb8bd060dd 100644 --- a/Platform/Qemu/SbsaQemu/Readme.md +++ b/Platform/Qemu/SbsaQemu/Readme.md @@ -97,6 +97,10 @@ Create a directory $WORKSPACE that would hold source code of the components. cd $WORKSPACE build -b RELEASE -a AARCH64 -t GCC5 -p edk2-platforms/Platform/Qemu/SbsaQemu/SbsaQemu.dsc ``` + An RME aware SBSA system can be compiled by adding `-D ENABLE_RME` to the + command line above. In that case `bl1.bin` and `fip.bin` also have to be RME + aware. Please refer to TF-A instructions to generate RME enabled binaries. + Copy SBSA_FLASH0.fd and SBSA_FLASH1.fd to top $WORKSPACE directory. Then extend the file size to match the machine flash size. ``` diff --git a/Platform/Qemu/SbsaQemu/SbsaQemu.dsc b/Platform/Qemu/SbsaQemu/SbsaQemu.dsc index b2cd2529a9..07134dc6f2 100644 --- a/Platform/Qemu/SbsaQemu/SbsaQemu.dsc +++ b/Platform/Qemu/SbsaQemu/SbsaQemu.dsc @@ -11,11 +11,15 @@ # ################################################################################ [Defines] +!if $(ENABLE_RME) + PLATFORM_NAME = SbsaQemuRme +!else PLATFORM_NAME = SbsaQemu +!endif PLATFORM_GUID = feb0325c-b93d-4e47-8844-b832adeb9e0c PLATFORM_VERSION = 0.1 DSC_SPECIFICATION = 0x00010005 - OUTPUT_DIRECTORY = Build/SbsaQemu + OUTPUT_DIRECTORY = Build/$(PLATFORM_NAME) SUPPORTED_ARCHITECTURES = AARCH64 BUILD_TARGETS = DEBUG|RELEASE|NOOPT SKUID_IDENTIFIER = DEFAULT @@ -392,10 +396,18 @@ DEFINE NETWORK_HTTP_BOOT_ENABLE = FALSE gArmTokenSpaceGuid.PcdVFPEnabled|1 # System Memory Base -- fixed - gArmTokenSpaceGuid.PcdSystemMemoryBase|0x10000000000 + !if $(ENABLE_RME) + # + # When RME is enabled the RMM is installed at 0x10000000000 + # and the system base memory bumped by 1072MB. + # + gArmTokenSpaceGuid.PcdSystemMemoryBase|0x10043000000 + !else + gArmTokenSpaceGuid.PcdSystemMemoryBase|0x10000000000 + !endif # Space for 32 stacks - gArmPlatformTokenSpaceGuid.PcdCPUCoresStackBase|0x1000007c000 + gArmPlatformTokenSpaceGuid.PcdCPUCoresStackBase|gArmTokenSpaceGuid.PcdSystemMemoryBase + 0x7c000 gArmPlatformTokenSpaceGuid.PcdCPUCorePrimaryStackSize|0x4000 gEfiMdeModulePkgTokenSpaceGuid.PcdMaxVariableSize|0x2000 gEfiMdeModulePkgTokenSpaceGuid.PcdMaxAuthVariableSize|0x2800 diff --git a/Platform/Qemu/SbsaQemu/SbsaQemu.fdf b/Platform/Qemu/SbsaQemu/SbsaQemu.fdf index 73b71e01b2..f1ed1516e7 100644 --- a/Platform/Qemu/SbsaQemu/SbsaQemu.fdf +++ b/Platform/Qemu/SbsaQemu/SbsaQemu.fdf @@ -21,10 +21,10 @@ [FD.SBSA_FLASH0] BaseAddress = 0x00000000 -Size = 0x00200000 +Size = 0x00800000 ErasePolarity = 1 BlockSize = 0x00001000 -NumBlocks = 0x200 +NumBlocks = 0x800 ################################################################################ # @@ -46,8 +46,8 @@ NumBlocks = 0x200 0x00000000|0x00012000 FILE = Platform/Qemu/Sbsa/bl1.bin -# and FIP (BL2 + BL31) -0x00012000|0x00020000 +# and FIP (BL2 + BL31 + RMM (if present)) +0x00012000|0x007EE000 FILE = Platform/Qemu/Sbsa/fip.bin ################################################################################