ocxl_context_alloc(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ ocxl_context_alloc(9) ✨

okay so bestie, welcome to the Kernel API Manual page for ocxl_context_alloc(9) β€” yes that's the whole header, yes we're doing this πŸ’…


🌸 NAME 🌸

ocxl_context_alloc β€” allocate an OpenCAPI context, that's literally the whole vibe πŸ¦‹


✨ SYNOPSIS ✨

int ocxl_context_alloc (struct ocxl_context **context , struct ocxl_afu
*afu , struct address_space *mapping );

like, it returns an int, periodt πŸ”₯


πŸ’– ARGUMENTS πŸ’–

  • context β€” the OpenCAPI context you're allocating πŸŽ€ ngl this one's important: it must be freed with ocxl_context_free or the vibe check fails 😭 don't leave it hanging, bestie.
  • afu β€” the AFU this context belongs to πŸ’« like, whose context is it anyway, iykyk.
  • mapping β€” the mapping that gets unmapped when the context is closed 🧚 and guess what, it may be NULL β€” no cap, that's allowed πŸ™ˆ

🫢 SEE ALSO 🫢

the whole friend group shows up here, so like, go say hi πŸ‘‘

Kernel file ./include/misc/ocxl.h, plus: ocxl_function_open(9), ocxl_function_afu_list(9), ocxl_function_fetch_afu(9), ocxl_afu_get(9), ocxl_afu_put(9), ocxl_function_config(9), ocxl_function_close(9), ocxl_context_free(9), ocxl_context_attach(9), ocxl_context_detach(9), ocxl_afu_irq_alloc(9), ocxl_afu_irq_free(9), ocxl_afu_irq_get_addr(9), ocxl_irq_set_handler(9), ocxl_afu_config(9), ocxl_afu_set_private(9), ocxl_afu_get_private(9), ocxl_global_mmio_read32(9), ocxl_global_mmio_read64(9), ocxl_global_mmio_write32(9), ocxl_global_mmio_write64(9), ocxl_global_mmio_set32(9), ocxl_global_mmio_set64(9), ocxl_global_mmio_clear32(9), ocxl_global_mmio_clear64(9) πŸ’œ


bestie if you remember nothing else: alloc it, then ocxl_context_free it. that's the main character energy this page deserves ⭐

k that's a wrap πŸ’« this lil page lives in ./include/misc, October 2026 edition β€” mwah, go touch some firmware πŸŒˆπŸ’–

πŸ“¦ where this page comes from