cdx_mcdi_write_msi(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… cdx_mcdi_write_msi(9)

okay bestie, welcome to the Kernel API Manual section for cdx_mcdi_write_msi β€” yes this is a real kernel function and yes it's giving main character energy ✨


🌸 NAME 🌸

cdx_mcdi_write_msi β€” write the MSI configuration for a CDX device πŸ’–

Like, it literally writes MSI config. For a CDX device. That's the whole vibe. No cap.


✨ SYNOPSIS ✨

int cdx_mcdi_write_msi (struct cdx_mcdi *cdx , u8 bus_num , u8 dev_num ,
u32 msi_vector , u64 msi_address , u32 msi_data );

int, bestie! it returns an int! and it takes six whole arguments, she's high maintenance but she slays πŸŽ€


πŸ¦‹ ARGUMENTS πŸ¦‹

  • cdx β€” pointer to the MCDI interface. this is the whole handshake, the intro, the "hey girl hey" 🫢
  • bus_num β€” bus number. which bus we're on, periodt.
  • dev_num β€” device number. which device on that bus. iconic duo honestly.
  • msi_vector β€” device-relative MSI vector number. 🚨 must be < MSI_COUNT as reported for the device, so like… check the count first, don't just yolo a number in there 😭
  • msi_address β€” the MSI address the hardware is gonna use. typically, on ARM systems this address gets translated by the IOMMU (if it's enabled), and it is the responsibility of the entity managing the IOMMU (APU kernel) to supply the correct IOVA here. so like, the IOVA is not our problem, it's the APU kernel's problem, iykyk πŸ’…
  • msi_data β€” the MSI data the hardware is gonna use. on versal-net, only the lower 16-bits are used β€” the remaining bits are ignored and should be set to zero πŸ™ˆ so if you're on versal-net, high bits = set them to 0, fr fr

πŸ”₯ RETURN πŸ”₯

  • 0 on success πŸŽ‰
  • <0 on failure πŸ’€

that's it. that's the return. binary queen.


πŸ‘‘ SEE ALSO πŸ‘‘

the whole friend group, honestly 🧚 the bus girlies, the dev girlies, the enable/disable girlies, the reset girlie, and cdx_mcdi_msi_enable(9) who is lowkey the closest cousin to this one 🌈


ngl the one thing to actually remember: msi_vector has to be < MSI_COUNT for the device, and on versal-net the top bits of msi_data go in as zero. that's the vibe check. don't fail it πŸ’œ

and that's a wrap on cdx_mcdi_write_msi(9) πŸ“ this came out of ./drivers/cdx/controller, dated October 2026, and bestie… you ate that read. slay. πŸ’…βœ¨πŸ¦‹

πŸ“¦ where this page comes from