qcom_pas_get_rsc_table(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸŽ€ qcom_pas_get_rsc_table(9) πŸŽ€

okay bestie, welcome to the Kernel API Manual β€” section 9, kernel API, the whole vibe. this one's about grabbing a resource table for a peripheral and ngl it's lowkey iconic. let's get into it ✨


πŸ’– NAME πŸ’–

qcom_pas_get_rsc_table β€” Retrieve the resource table in passed output buffer for a given peripheral. that's literally the whole job. slay. πŸ’…


🌸 SYNOPSIS 🌸

struct resource_table * qcom_pas_get_rsc_table (struct qcom_pas_context
*ctx , void *input_rt , size_t input_rt_size , size_t *output_rt_size );

copy it exactly, don't be weird about it 🫢


πŸ¦‹ ARGUMENTS πŸ¦‹

  • ctx β€” the PAS context. your main character struct, the one that knows things.
  • input_rt β€” resource table buffer which is present in firmware binary. like, the resource table that's already chilling inside the firmware binary.
  • input_rt_size β€” size of the resource table present in firmware binary. yes, the size of that exact thing.
  • output_rt_size β€” TrustZone expects caller should pass worst case size for the output_rt_tzm. so like, give it your worst-case estimate, that's what TZ wants, no cap.

✨ DESCRIPTION ✨

Qualcomm remote processor may rely on both static and dynamic resources for its functionality. two flavors, both valid, both needed πŸ’œ

Static resources typically refer to memory-mapped addresses required by the subsystem and are often embedded within the firmware binary, and dynamic resources, such as shared memory in DDR etc., are determined at runtime during the boot process. so static = baked in, dynamic = figured out live during boot. got it? got it. 🧚

On Qualcomm Technologies devices, it's possible that static resources are not embedded in the firmware binary and instead are provided by TrustZone. plot twist!! 😭 However, dynamic resources are always expected to come from TrustZone. always. every time. This indicates that for Qualcomm devices, all resources (static and dynamic) will be provided by TrustZone PAS service. so on Qualcomm, TZ is basically carrying the whole team πŸ‹οΈ

If the remote processor firmware binary does contain static resources, they should be passed in input_rt. These will be forwarded to TrustZone for authentication. TrustZone will then append the dynamic resources and return the complete resource table in output_rt_tzm. it authenticates, it appends, it delivers. king behavior πŸ‘‘

If the remote processor firmware binary does not include a resource table, the caller of this function should set input_rt as NULL and input_rt_size as zero respectively. literally NULL and 0, don't overthink it, that's the move πŸ™ˆ

More about documentation on resource table data structures can be found in include/linux/remoteproc.h β€” go read it, iykyk πŸ“–


πŸ”₯ RETURN πŸ”₯

On success, returns a pointer to the allocated buffer containing the final resource table, and output_rt_size will have actual resource table size from TrustZone. The caller is responsible for freeing the buffer. ⚠️ yes bestie, you free it. that buffer is your responsibility now, don't ghost it.

On failure, returns ERR_PTR(-errno). classic. check it, always check it πŸ’€


🌈 SEE ALSO 🌈

the whole friend group fr fr 🫢


and that's the page!! this lil masterpiece lives in ./drivers/firmware/qcom and it's dated October 2026 β€” so yeah, she's from the future, and she ate. πŸ’…βœ¨πŸŽ€πŸ¦‹πŸŒΈπŸ’–

πŸ“¦ where this page comes from