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

[RFC] Make OP-TEE physically relocatable when S-EL2 SPMC is not enabled #6712

Closed
wants to merge 1 commit into from

Commits on Apr 8, 2024

  1. core: make OP-TEE relocatable without S-EL2 SPMC

    This dissociates CFG_CORE_PHYS_RELOCATABLE from CFG_CORE_SEL2_SPMC,
    so that OP-TEE can be physically relocated without an SPMC at EL2.
    
    One of the possible use-cases of enabling CFG_CORE_PHYS_RELOCATABLE
    without CFG_CORE_SEL2_SPMC is physical KASLR. In particular, with this
    configuration enabled, earlier stage bootloader can load OP-TEE at
    an arbitrary 4K-aligned physical address.
    
    Unlike the case where OP-TEE is loaded at some offset by an SPMC at
    EL2 (e.g., 16KB by Hafnium) and there are some metadata to keep
    (e.g, FF-A manifest) below the physical offset, we can use the memory
    region below the physical offset as TA RAM when OP-TEE is loaded at
    some random location by earlier stage bootloader, but there's no
    SPMC at EL2.
    
    To that end, we introduce another memory pool `tee_mm_sec_ddr_extra`
    that accompanies with existing `tee_mm_sec_ddr` to provide secure-
    DDR-backed allocation, to support such spliti TA RAM scenarios.
    
    Also note that memory statistic infrastructure for TA RAM will be
    inaccurate as it doesn't take account into split TA RAM, i.e.,
    memory blocks allocated from `tee_sec_mm_ddr_extra`, as of now.
    
    Signed-off-by: Seonghyun Park <seonghp@amazon.com>
    seonghp committed Apr 8, 2024
    Configuration menu
    Copy the full SHA
    dc558ab View commit details
    Browse the repository at this point in the history