Skip to content

Conversation

@spark404
Copy link

@spark404 spark404 commented Oct 28, 2025

This is new PR with the same changes as #6854.

  • Rebased on latest master.
  • Fixed comments on original PR

References:

Test status (xtest):

35535 subtests of which 1 failed
111 test cases of which 1 failed
0 test cases were skipped

@jforissier
Copy link
Contributor

@spark404 thanks for following up on this. Please incorporate the fixes into @lorc's commits, adding yourself as a co-developer i.e.,

Co-developed-by:  Your Name <[email protected]>
Signed-off-by: Your Name <[email protected]>

Thanks!

@spark404 spark404 marked this pull request as ready for review October 28, 2025 14:35
@spark404
Copy link
Author

@jforissier I updated the commits, it this what you mean?

And could you enable the CI build for this PR?

@jforissier
Copy link
Contributor

@jforissier I updated the commits, it this what you mean?

Almost ;) you should put @lorc's Signed-off-by: first since he is the main author.

And could you enable the CI build for this PR?

Done.

VA spaces have no valid PA addresses stored in memory map, so they are
not valid return values for core_mmu_get_type_by_pa() function.

This issues was discovered when OP-TEE tried to access a device tree
that was stored at the very beginning of physical address space. In
may case it had PA address 0x112C0, which was "covered" by
RES_VASPACE:

D/TC:0 0   dump_mmap_table:838 type RES_VASPACE  va 0x1d800000..0x1e1fffff pa 0x00000000..0x009fffff size 0x00a00000 (pgdir)

Signed-off-by: Volodymyr Babchuk <[email protected]>
Acked-by: Jerome Forissier <[email protected]>
@spark404
Copy link
Author

spark404 commented Nov 5, 2025

@jforissier Could you kickoff the CI build again? Rebased on master so the new CI changes are now in this branch.

RPi5 is based on new BCM2712 SoC which is based on quad Cortex-A76.

BCM2712 still does not provide secure memory so we are free to locate
OP-TEE anything we want. It would be most beneficial to locate OP-TEE
right after TF-A, at address 0x80000, but RPi5 loader places kernel
there and it's location can't be changed.

According to PCB silkscreen, RPi5 boards can have 1GB, 2GB, 4GB or 8GB
of memory. To be compatible with any variant, OP-TEE is placed close
to the end of the first gigabyte.

BCM2712 uses PL011 as debug UART so we enable its driver.

According to specification, BCM2712 includes cryptography extensions,
but this basic port does not enable them.

As there is no way to load OP-TEE image into memory during boot
process, TF-A with OPTEE_ALLOW_SMC_LOAD=1 option should be used. In
this case OP-TEE can be loaded via Linux kernel or U-Boot.

Signed-off-by: Volodymyr Babchuk <[email protected]>
Co-developed-by: Hugo Trippaers <[email protected]>
Signed-off-by: Hugo Trippaers <[email protected]>
Acked-by: Jerome Forissier <[email protected]>
@spark404
Copy link
Author

spark404 commented Nov 6, 2025

@jforissier sorry for all the extra back and forth, but I think I got checkpatch happy as well now.

@jforissier jforissier merged commit e1e6e2c into OP-TEE:master Nov 7, 2025
47 checks passed
@spark404 spark404 deleted the pr_rpi5_spark404 branch November 7, 2025 10:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants