modus
Menu
On this page

The entry disk_start_policy

A start policy that is not in the boot image: the test of a start policy from the disk.

What it is for. Principal 0 chooses it with start_policy_choose("tiny", hash), and the next start of the machine runs it in place of the default start policy, with the start grant Start_Policy only, after the TPM measured it into PCR 12. It holds its order in its code, and reads no start list: the root service maps none for a start policy from the disk.

Start: the root service starts it at the start of the machine, from the store module_files of principal 0. The modus tool writes it on the disk of the test part start_policy. No line of the console starts it.

Grants: the start grant Start_Policy: a root ring for Start, Stop, Machine_Usable and Wire, and the machine parts page, read-only. It asks for the wiring that the root service refuses to a start policy from the disk (wiring_refusals.odin). It has no row in start_grant_sets.

What a reader sees. No window. The log has "disk_start_policy: ok", the handles of its context, the refusal of a start of the start policy of the boot image and of four commands of the console, one line for each process that it starts, then "disk_start_policy: the console runs: the machine is usable".

See: The start policy: A start policy from the disk in the repository

disk_start_policy module with an entry

Hash
2c78882c3cb0fb4c5da43aee2d144200c332aeed79ffd828d59e9daaec763954
Size
48705 bytes
Exports
0
Imports
0
Imported by
0
License
MIT

A start policy that is not in the boot image: the test of a start policy from the disk

FactValue
KindModules with an entry
Sourcesrc/modules/tests/disk_start_policy
Boot imageno: not in the boot image
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()Each stop before Machine_Usable writes its line first and stops with Failed: the root service then starts the rescue start policy

entry

entry()

Each stop before Machine_Usable writes its line first and stops with Failed: the root service then starts the rescue start policy.

Form
The entry of the module: one parameter, an address, fixed by the contract.
Source
src/modules/tests/disk_start_policy/main.odin:51

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
GrantsnoneNo row: the kernel starts the root service, and a disk process has the start grant set of its row in the disk grant table of its principal.
Other terms of its start grant setnone
Budget that it asks for
  • working memory pages 32
  • 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
One thread; the working memory pays its root ring, the machine parts page and their page 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).

start_grant_sets global variable of the package root

start_grant_sets := [?]Start_Grant_Set_Row {...}

The start grant set of each module of the boot image, with the reason of each.

src/modules/system/root/start_grant_sets.odin:73