Files
reims-vgpu/firmware
Anees Iqbal 1c8ae23515 🆕 Ring a context's queues at its doorbell page
Where the host offers DOORBELL_PAGES the framebuffer takes it, and the
accelerator maps BAR 4 into the kernel at its contexts' start. A context
opened for a bundle that asks for OpenContext's seventh output (kext
feature 1 << 12, DoorbellPage) gets a free page, taken round-robin: the
kext binds it to the context with DOORBELL_PAGE_BIND before the process
learns of it, and maps it into the process uncached, its address the
seventh output. The bundle then rings a queue with one 32-bit store of the
ring's id at the page (a DMB OSHST first on arm64, and one STR of a W
register, the form a hypervisor decodes from its abort's syndrome), where
it called the kext before. The kext's own publish of a queue's ring rings
at the page too, where the host routes the queue's doorbell now. At the
context's close the page is unmapped from the process with its window,
then unbound, then given back.

A context with no page (a host without the pages, every page held, a
context numbered 2^24 or more, or a mapping that failed) answers 0 and its
process rings through the Doorbell call as before.

Ambrosia's driver module places BAR 4 between BAR 0 and BAR 2, so an arm64
guest's kernel finds it assigned; BAR 2 keeps its address.
2026-11-14 18:01:06 -08:00
..