modus
Menu
On this page

The entry gpu_device

The GPU device service: the device service of one VirtIO-GPU 1.2 PCI device (vendor 0x1AF4, device 0x1050). It verifies the PCI identity, negotiates VirtIO-GPU features, drives the control queue for 2D scanout setup and rectangle presentation (Get_Display_Info, Resource_Create_2D, Resource_Attach_Backing, Set_Scanout, Transfer_To_Host_2D, Resource_Flush, Resource_Unref), and, when the device carries Venus, creates one Venus context with the blob of its command ring and submits client Venus streams with Submit_3D. A device with no Venus keeps its 2D scanout unchanged.

It holds only its one PCI device (registers, interrupt, queue memory, configuration copy, machine physical handle) and its client ring. No driver code lives in the kernel.

See: The access to a GPU for acceleration in the repository

gpu_device module with an entry

Hash
98ca6d59304f25f57761955cc24fcd041ac7c617fd953057d717dbd419ccf570
Size
91305 bytes
Exports
0
Imports
0
Imported by
0
License
MIT

The GPU device service: the device service of one VirtIO-GPU 1.2 PCI device (vendor 0x1AF4, device 0x1050)

FactValue
KindModules with an entry
Sourcesrc/modules/system/gpu_device
Boot imageyes: in the boot image, 91305 bytes in this build
Build settingsnone: the defaults of the source
Importsnone
Imported bynone

Neighbours

It imports no module, and no module imports it. The module graph shows it with the other modules that have no edge.

Exports

ExportWhat it does
entry()verifies PCI identity (vendor 0x1AF4, device 0x1050), starts the VirtIO-GPU control queue, discovers display geometry and Venus capability sets, and serves the GPU client ring

entry

entry()

entry verifies PCI identity (vendor 0x1AF4, device 0x1050), starts the VirtIO-GPU control queue, discovers display geometry and Venus capability sets, and serves the GPU client ring.

Form
The entry of the module: one parameter, an address, fixed by the contract.
Source
src/modules/system/gpu_device/main.odin:661

Read from the source of the module, as the build reads it to describe the exports (tools/modustool/build/describe.odin).

What the root service gives it

WhatValueAs the root service says
GrantsThe VirtIO-GPU device and the ring of its one client (driver_start).
Other terms of its start grant setnone
Budget that it asks for
  • working memory pages 190
  • pages of its threads 72
  • pages of the pictures of its window 0
  • pages of the module and its imports from the files of the build
  • processes 1
  • threads 1
The working memory: the IOMMU domain tables paid at the first Memory_Physical call, the queue and control message mappings, and the page tables of the client framebuffer region.

The start grant set is read from start_grant_sets in src/modules/system/root/start_grant_sets.odin. The stated budget is read from the constant MODULE_BUDGET of the source of the module (its line); the build adds the counted parts and writes the sum in the module (tools/modustool/build/budget_count.odin); the root service accepts it up to the largest budget of a process, and adds the limits of processor time and of log records (src/modules/system/root/budgets.odin).