Add cca support#20
Conversation
Add --enable-cca flag for the FVP AEMvA device. It sets the FVP model parameters needed for Realm Management Extension (RME). When enabled: - bp.secure_memory=0 and bp.has_rme=1 to use RME instead of TrustZone - rme_support_level=2 and speculative execution restrictions on both clusters, required by RME - brbe recording disabled to avoid conflicts with RME trace filtering - SMMU root registers set for RME Without this flag the FVP runs with bp.secure_memory=1 as before. Signed-off-by: Anders Roxell <anders.roxell@linaro.org>
QEMU SBSA does not support -kernel when pflash firmware is used. EDK2 needs to load the kernel from a FAT drive instead. Add --enable-cca for qemu-arm64 that switches to sbsa-ref machine with RME CPU flags. Add --pflash for SBSA flash images. Create a FAT boot disk with kernel and startup.nsh for EDK2 UEFI shell. Signed-off-by: Anders Roxell <anders.roxell@linaro.org>
The for loop rendering tux_prompt items used Jinja2 whitespace
control ({%- endfor -%}) which stripped the trailing newline.
This caused the test section to be concatenated directly after
the last prompt item, producing invalid YAML like:
- "buildroot"- test:
Remove the whitespace control on endfor so each prompt gets
its own line and the test section starts on a new line.
Signed-off-by: Anders Roxell <anders.roxell@linaro.org>
| if enable_trustzone: | ||
| self.machine = f"{self.machine},secure=on" | ||
|
|
||
| if enable_cca: |
There was a problem hiding this comment.
Two things I can see here, --pflash is required with --enable-cca, we need some validation here. Also what if a user passes --enable-cca, with --enable-trustzone I noticed that CCA will siliently overwrite sbsa-ref. I think same issue with --enable-kvm, these should riase InvalidArguement when combined
There was a problem hiding this comment.
Also we check the kernel, but not the pflash. Shouldnt there be pflash validation here?
|
Can we also include a QEMU CCA template? |
| if enable_trustzone: | ||
| self.machine = f"{self.machine},secure=on" | ||
|
|
||
| if enable_cca: |
There was a problem hiding this comment.
Also we check the kernel, but not the pflash. Shouldnt there be pflash validation here?
| fat_img = tmpdir / "boot.img" | ||
| with open(fat_img, "wb") as f: | ||
| f.truncate(image.stat().st_size + 4 * 1024 * 1024) | ||
| subprocess.run(["mformat", "-i", str(fat_img), "::"], check=True) |
There was a problem hiding this comment.
How to catch these errors when tools not found i.e. it'll fall over with a confusing File Not Found Error
Add
--enable-ccato tuxlava. The flag enables Arm CCA / RME on FVP and qemu-arm64.