Skip to content

Spawn Unsigned userPD by default - #388

Open
Mahima Bhattaram (m-bhattar) wants to merge 1 commit into
qualcomm:developmentfrom
m-bhattar:unsigned_default
Open

Spawn Unsigned userPD by default#388
Mahima Bhattaram (m-bhattar) wants to merge 1 commit into
qualcomm:developmentfrom
m-bhattar:unsigned_default

Conversation

@m-bhattar

@m-bhattar Mahima Bhattaram (m-bhattar) commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

Spawn unsigned userpd by default for those with unsigned pd support. This is currently only for CDSP, GPDSP0, and GPDSP1.

Comment thread src/fastrpc_apps_user.c Outdated

// 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) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing CDSP1_DOMAIN_ID

Should we consider GDSP0/1 here as well, or is it not applicable?

Comment thread src/fastrpc_apps_user.c Outdated
// 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)));

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread src/fastrpc_apps_user.c Outdated
// 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) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't we define a named constant with a comment explaining this arch version?

@quic-vkatoch

Copy link
Copy Markdown
Contributor

build_dsp_search_path_cache_for_domain already queries ARCH_VER via fastrpc_get_cap in the same domain_init path, can this be reused instead of issuing a second ioctl?

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>
Comment thread src/fastrpc_apps_user.c
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;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can this be a bool?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Acked, will update

Comment thread src/fastrpc_apps_user.c
int nErr = AEE_SUCCESS;
fastrpc_capability cap = {0, UNSIGNED_PD_SUPPORT, 0};

VERIFYC(unsigned_pd_support != NULL, AEE_EBADPARM);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this really needed?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ack, not necessary, will update

Comment thread src/fastrpc_apps_user.c
// 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)));

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is there no way to offload to signed PD on platforms that supports unsigned PD?

Comment thread src/fastrpc_apps_user.c
if (unsigned_pd_support == 1) {
hlist[domain].unsigned_module = 1;
FARF(ALWAYS,
"%s: UNSIGNED_PD_SUPPORT is 1, allowing UNSIGNED module for domain %d",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

log can be framed in a more user-friendly manner

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ack, will update

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