STRUCT XHCI_DEVICE_CONTEXT_ARRAY(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… struct xhci_device_context_array(9) πŸ’…

okay bestie, welcome to the Kernel API Manual β€” yes, that's the manual name, and yes, we're reading a struct page together, this is our bonding time 🫢


✨ NAME ✨

struct xhci_device_context_array β€” no description line, it just is. main character energy, honestly πŸ‘‘


🌸 SYNOPSIS 🌸

struct xhci_device_context_array {
    __le64 *ctx_array;
    dma_addr_t dma;
 };

two members. that's it. that's the whole vibe check and it passed ✨


πŸŽ€ Members πŸŽ€

  • ctx_array β€” a pointer to an array of addresses, and the size of that array is not a fixed thing, it depends on Max Slots read from HCSPARAMS1. so like, it scales. we love a flexible icon πŸ¦‹
  • dma β€” the DMA address that points at ctx_array. literally just the DMA address to ctx_array, no cap πŸ’«

πŸ‘‘ Description πŸ‘‘

This is the Device Context Base Address Array (DCBAA) β€” straight out of Section 6.1. very official. very cunty. here's the breakdown of the indexing, because the indices are doing different jobs and you will need to know which is which πŸ”₯

  • ctx_array[0] β†’ Scratchpad Buffer Array Base Address
  • ctx_array[1-MaxSlots] β†’ Device Context Base Address

so slot zero is the scratchpad, and slots one through MaxSlots are the actual device context base addresses. that's the whole map, iykyk πŸ—ΊοΈπŸ’œ


🌈 SEE ALSO 🌈

Kernel file ./drivers/usb/host/xhci.h β€” go read it, it's giving lore

  • struct xhci_cap_regs(9)
  • struct xhci_op_regs(9)
  • struct xhci_intr_reg(9)
  • struct xhci_run_regs(9)
  • struct xhci_container_ctx(9)
  • struct xhci_slot_ctx(9)
  • struct xhci_ep_ctx(9)

a whole friend group of structs, honestly. collect them all πŸŽ€βœ¨


and that's the page bestie!! it lives in ./drivers/usb/host, and this particular edition is dated October 2026 πŸ’– go forth and read your xHCI structs, you're gonna slay πŸ˜­πŸ’…

πŸ“¦ where this page comes from