Skip to content

Commit

Permalink
core: spmc: handle BTI/PAUTH info in SP manifest
Browse files Browse the repository at this point in the history
Provide information to the SP whether BTI and PAUTH are enabled in
OP-TEE by updating the relevant DT node in the SP manifest.
This way the SP can detect if the required protection is not available.

Signed-off-by: Gabor Toth <[email protected]>
Acked-by: Etienne Carriere <[email protected]>
  • Loading branch information
gabor-toth-arm authored and jforissier committed Sep 2, 2024
1 parent d19343a commit 9f32a1a
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions core/arch/arm/kernel/secure_partition.c
Original file line number Diff line number Diff line change
Expand Up @@ -1411,6 +1411,22 @@ static TEE_Result handle_hw_features(void *fdt)
return res;
}

/* Modify the property only if it's already present */
if (!sp_dt_get_u32(fdt, node, "bti", &val)) {
res = fdt_setprop_u32(fdt, node, "bti",
feat_bti_is_implemented());
if (res)
return res;
}

/* Modify the property only if it's already present */
if (!sp_dt_get_u32(fdt, node, "pauth", &val)) {
res = fdt_setprop_u32(fdt, node, "pauth",
feat_pauth_is_implemented());
if (res)
return res;
}

return TEE_SUCCESS;
}

Expand Down

0 comments on commit 9f32a1a

Please sign in to comment.