Spawn Unsigned userPD by default - #388
Conversation
|
|
||
| // Only apply arch version check for CDSP domain; other domains (e.g. ADSP) | ||
| // do not support unsigned modules, so keep their existing behavior. | ||
| if (dom == CDSP_DOMAIN_ID) { |
There was a problem hiding this comment.
Missing CDSP1_DOMAIN_ID
Should we consider GDSP0/1 here as well, or is it not applicable?
| // Only apply arch version check for CDSP domain; other domains (e.g. ADSP) | ||
| // do not support unsigned modules, so keep their existing behavior. | ||
| if (dom == CDSP_DOMAIN_ID) { | ||
| VERIFY(AEE_SUCCESS == (nErr = fastrpc_get_arch_version(domain, &arch_version))); |
There was a problem hiding this comment.
Any failure here will fall to bail and fail domain_init entirely. Drop the VERIFY, and return AEE_SUCCESS from fastrpc_get_arch_version when the capability is unsupported, keeping *arch_version = 0 as fallback.
| // do not support unsigned modules, so keep their existing behavior. | ||
| if (dom == CDSP_DOMAIN_ID) { | ||
| VERIFY(AEE_SUCCESS == (nErr = fastrpc_get_arch_version(domain, &arch_version))); | ||
| if (arch_version < 0x81) { |
There was a problem hiding this comment.
Shouldn't we define a named constant with a comment explaining this arch version?
|
|
Spawns unsigned userpd by default for those with unsigned pd support. This is currently only for CDSP, GPDSP0, and GPDSP1. Signed-off-by: Mahima Bhattaram <mbhattar@qti.qualcomm.com>
faec8ea to
ebb4ce9
Compare
| int nErr = AEE_SUCCESS, dom = GET_DOMAIN_FROM_EFFEC_DOMAIN_ID(domain), mut_locked = 0; | ||
| remote_handle64 panic_handle = 0; | ||
| struct err_codes *err_codes_to_send = NULL; | ||
| uint32_t unsigned_pd_support = 0; |
There was a problem hiding this comment.
can this be a bool?
There was a problem hiding this comment.
Acked, will update
| int nErr = AEE_SUCCESS; | ||
| fastrpc_capability cap = {0, UNSIGNED_PD_SUPPORT, 0}; | ||
|
|
||
| VERIFYC(unsigned_pd_support != NULL, AEE_EBADPARM); |
There was a problem hiding this comment.
is this really needed?
There was a problem hiding this comment.
ack, not necessary, will update
| // other domains (e.g. ADSP) do not support unsigned modules, so keep their | ||
| // existing behavior. | ||
| if (dom == CDSP_DOMAIN_ID || dom == GDSP0_DOMAIN_ID || dom == GDSP1_DOMAIN_ID) { | ||
| VERIFY(AEE_SUCCESS == (nErr = fastrpc_get_unsigned_pd_support(domain, &unsigned_pd_support))); |
There was a problem hiding this comment.
is there no way to offload to signed PD on platforms that supports unsigned PD?
| if (unsigned_pd_support == 1) { | ||
| hlist[domain].unsigned_module = 1; | ||
| FARF(ALWAYS, | ||
| "%s: UNSIGNED_PD_SUPPORT is 1, allowing UNSIGNED module for domain %d", |
There was a problem hiding this comment.
log can be framed in a more user-friendly manner
There was a problem hiding this comment.
Ack, will update
Spawn unsigned userpd by default for those with unsigned pd support. This is currently only for CDSP, GPDSP0, and GPDSP1.