modus
Menu
On this page

The entry devices

Delegated devices service implementing Role.Devices .

Owns PCI device identity matching and attenuated per-device grant minting so each device service receives only its own registers, interrupt, read-only configuration view, and IOMMU permission.

See: The split of the root service in the repository

devices module with an entry

Hash
bd33981e82b126f92a86bded809b59aa4bc58d7922ebb3d7e247926848fed849
Size
40960 bytes
Exports
1
Imports
0
Imported by
0
License
MIT

Delegated devices service implementing Role.Devices

FactValue
KindModules with an entry
Sourcesrc/modules/system/devices
Boot imageyes: in the boot image, 40960 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
status(out: Devices_Status) -> Integerwrites aggregate devices service counters into out
entry()initializes the delegated devices service ring and serves PCI identity registration, device binding, release, and query commands until stopped

status

status(out: ) -> 

status writes aggregate devices service counters into out.

Parameters
  • out:
Result
When it fails
a negative result, and the error record
Source
src/modules/system/devices/main.odin:57

entry

entry()

entry initializes the delegated devices service ring and serves PCI identity registration, device binding, release, and query commands until stopped.

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

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 delegated devices service: PCI identity table matching and attenuated per-device grant minting. Holds no root ring.
Other terms of its start grant setnone
Budget that it asks for
  • working memory pages 256
  • 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
Working memory budget for the freestanding devices service process and its fixed-capacity identity and binding tables.

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).

Devices_Status record of a module

A record of the module devices: 40 bytes, aligned on 8 bytes, 0 bytes of padding.

  • identity_counti6408 bytes
  • active_bindingsi6488 bytes
  • total_bindsi64168 bytes
  • total_releasesi64248 bytes
  • total_refusalsi64328 bytes

Integer wire form

A wire form of the module contract: one word of a call. A signed integer of 64 bits, in a register.

Error_Record record of a module

A record of the module devices: 56 bytes, aligned on 8 bytes, 0 bytes of padding.

  • kindi6408 bytes
  • uniti6488 bytes
  • operationi64168 bytes
  • argumenti64248 bytes
  • valuei64328 bytes
  • limiti64408 bytes
  • foundi64488 bytes