pvr_fw_obje...d_map_offset(9)
π pvr_fw_object_create_and_map_offset π
Okay so bestie, gather round, because this is the pvr_fw_object_create_and_map_offset(9) page from the Kernel API Manual, section 9, and it is literally the "make a firmware object and then map it to firmware at the exact offset you asked for, and also to the CPU" function. Multi-tasking icon behaviour. π
β¨ NAME β¨
pvr_fw_object_create_and_map_offset β create a FW object and map it to the firmware at the provided offset and to the CPU. Both. At once. Obsessed. π¦
πΈ SYNOPSIS πΈ
void * pvr_fw_object_create_and_map_offset (struct pvr_device *pvr_dev ,
u32 dev_offset , size_t size , u64 flags , void (*init)(void *cpu_ptr,
void *priv) , void *init_priv , struct pvr_fw_object **fw_obj_out );
π§ ARGUMENTS π§
Seven args, no cap. Let's go one by one:
pvr_devβ the PowerVR device pointer. Your device. Your main character. πdev_offsetβ the base address of the FW mapping you want, expressed as an offset from the start of the FW heap. So like, you're picking the seat, not the whole row. πsizeβ how big the object is, in bytes. Standard. πflagsβ the options that affect both this operation and any future mapping operations performed on the returned object. Heads up: this has to be a combo ofDRM_PVR_BO_*and/orPVR_BO_*flags. It's giving "your choices echo into the future" ngl. β¨initβ the initialisation callback. Signature isvoid (*init)(void *cpu_ptr, void *priv), so it takes your CPU pointer and your private pointer. Slay. π«Άinit_privβ the private pointer you hand off to that initialisation callback. πfw_obj_outβ pointer to the location where the newly created object pointer gets stored. The little drop-off box. π¦
π DESCRIPTION π
Big vibe note first: DRM_PVR_BO_DEVICE_PM_FW_PROTECT is implied for all FW objects. Like, you don't even have to say it, it's just the house rules. π
Because of that implication, this function will fail ifflagshasDRM_PVR_BO_CPU_ALLOWUSERSPACE_ACCESSset. Not "might", not "could" β it will. So don't do that, bestie. π
Also, and this is the part everybody forgets: the caller is responsible for calling pvr_fw_object_vunmap to release the CPU mapping. That's your job. Nobody's gonna do it for you. Lease the mapping, return the mapping. Periodt. π₯
β RETURN β
Three possible outcomes, and it's one of these:
- Pointer to the CPU mapping of the newly created object, or
- any error returned by
pvr_fw_object_create, or - any error returned by
pvr_fw_object_vmap.
Three-way tie, basically. π«
π SEE ALSO π
Kernel file ./drivers/gpu/drm/imagination/pvr_fw.c β and the whole friend group:
pvr_fw_validate(9)pvr_fw_process(9)pvr_wait_for_fw_boot(9)pvr_fw_validate_init_device_info(9)pvr_fw_init(9)pvr_fw_fini(9)pvr_fw_mts_schedule(9)pvr_fw_structure_cleanup(9)pvr_fw_object_fw_map(9)pvr_fw_object_fw_unmap(9)pvr_fw_object_create(9)pvr_fw_object_create_and_map(9)pvr_fw_object_destroy(9)pvr_fw_object_get_fw_addr_offset(9)
Every single one of them, linked and accounted for. Go read them, iykyk. πβ¨
That's the whole page, bestie π«Ά β courtesy of ./drivers/gpu/drm/imagination, October 2026, Kernel API Manual, section 9. Stay mapped, stay validated, and please remember the vunmap. ππ
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms