ENUM FW_RESOURCE_TYPE(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… enum fw_resource_type(9) πŸ’…

okay bestie, so this is a page straight out of the Kernel API Manual and it's genuinely so important β€” it's the whole vibe check on types of resource entries. like, the categories. the taxonomy. the "who's who" of the resource table. let's get into it ✨


✨ NAME ✨

enum fw_resource_type β€” the types of resource entries, periodt πŸ’–


πŸ¦‹ SYNOPSIS πŸ¦‹

enum fw_resource_type {
    RSC_CARVEOUT ,
    RSC_DEVMEM ,
    RSC_TRACE ,
    RSC_VDEV ,
    RSC_LAST ,
    RSC_VENDOR_START ,
    RSC_VENDOR_END

};

πŸŽ€ Constants πŸŽ€

the whole squad, one by one, no cap:

  • RSC_CARVEOUT β€” this one's a request for allocation of a physically contiguous memory region. like, "hey, can i get a chunk of memory that's actually all together?" πŸ’–
  • RSC_DEVMEM β€” a request to iommu_map a memory-based peripheral. that's the whole thing. 🫢
  • RSC_TRACE β€” announces the availability of a trace buffer into which the remote processor will be writing logs. it's giving "heads up, the logs go here" 🌸
  • RSC_VDEV β€” declares support for a virtio device, and serves as its virtio header. she's also the header. main character energy honestly πŸ‘‘
  • RSC_LAST β€” just keep this one at the end of standard resources. that's her whole job and she does it slayfully πŸŽ€
  • RSC_VENDOR_START β€” start of the vendor specific resource types range πŸ¦‹
  • RSC_VENDOR_END β€” end of the vendor specific resource types range 🌈

πŸ’« Description πŸ’«

so if you want more details regarding a specific resource type, please see its dedicated structure below. iykyk πŸ’œ

⚠️ okay this next part is important, don't skip it bestie: please note that these values are used as indices to the rproc_handle_rsc lookup table, so please keep them sane. like, don't go feral with the reordering. 😭

and moreover β€” RSC_LAST is used to check the validity of an index before the lookup table is accessed, so please update it as needed. fr fr, if you add stuff and forget to bump RSC_LAST, that's the kind of thing that ruins everyone's day πŸ’€πŸ”₯


🌟 SEE ALSO 🌟

go read these next, bestie, they're all linked and they're all iconic:

  • Kernel file ./include/linux/rsc_table.h
  • struct resource_table(9)
  • struct fw_rsc_hdr(9)
  • struct fw_rsc_carveout(9)
  • struct fw_rsc_devmem(9)
  • struct fw_rsc_trace(9)
  • struct fw_rsc_vdev_vring(9)
  • struct fw_rsc_vdev(9)
  • rsc_table_for_each_entry(9)

aaaaand that's the page! πŸ’… this one lives over in ./include/linux, dated October 2026, and it's filed under enum fw_resource_type(9) β€” mwah, go touch some resource tables, ily πŸ«ΆπŸ’–βœ¨

πŸ“¦ where this page comes from