Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[V3] SbsaQemu-rme: Add support for SBSA-rme platform #243

Merged
merged 1 commit into from
Nov 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions Platform/Qemu/SbsaQemu/Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
hrw marked this conversation as resolved.
Show resolved Hide resolved

Copy SBSA_FLASH0.fd and SBSA_FLASH1.fd to top $WORKSPACE directory.
Then extend the file size to match the machine flash size.
```
Expand Down
18 changes: 15 additions & 3 deletions Platform/Qemu/SbsaQemu/SbsaQemu.dsc
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
hrw marked this conversation as resolved.
Show resolved Hide resolved
gArmPlatformTokenSpaceGuid.PcdCPUCoresStackBase|gArmTokenSpaceGuid.PcdSystemMemoryBase + 0x7c000
gArmPlatformTokenSpaceGuid.PcdCPUCorePrimaryStackSize|0x4000
gEfiMdeModulePkgTokenSpaceGuid.PcdMaxVariableSize|0x2000
gEfiMdeModulePkgTokenSpaceGuid.PcdMaxAuthVariableSize|0x2800
Expand Down
8 changes: 4 additions & 4 deletions Platform/Qemu/SbsaQemu/SbsaQemu.fdf
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@

[FD.SBSA_FLASH0]
BaseAddress = 0x00000000
Size = 0x00200000
Size = 0x00800000
ErasePolarity = 1
BlockSize = 0x00001000
NumBlocks = 0x200
NumBlocks = 0x800

################################################################################
#
Expand All @@ -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

################################################################################
Expand Down