PROPHET/OS

NAME

kernel: the one tool for the kernel

SYNOPSIS

kernel [get <setting|prefix>] | set <setting> <value> | seal <setting> | read [name] | swap [image]

DESCRIPTION

The one tool for the kernel: its settings while it runs, what it read at its start, and a new kernel without a restart.

kernel                      every setting, its value, where it came from, its purpose
kernel get <setting>        one setting in full
kernel get <prefix>         every setting under it: `kernel get serial`
kernel set <setting> <v>    sets it, or says why it will not take it
kernel seal <setting>       what stands there stays until the next start
kernel read [name]          what the kernel read at its start
kernel swap [image]         loads a new kernel, checks it and jumps into it

The settings are the control tree: a module registers its nodes, and what stands there is what the module uses right now; /state/control holds the same, one file a setting. read shows what the kernel took from /system/config at the start: a line that was not understood is missing there, the fastest way to find out that it was not.

kernel get serial           the serial line: on, port, baud
kernel set serial.on 0      the line off, live; 1 brings it back

A sealed setting keeps its value until the next start, one way: whoever wants it back starts again, because a bound the bounded can lift is no bound.

swap loads, checks and jumps, in that order, because after the jump there is no place left to say anything; /boot/kernel.bin when no image is named. The devices run on and the firmware is not touched: the running kernel writes a handover block, brings its threads to rest and jumps, and the new one says at its start that it came out of a handover. Every structure of the block carries its version, so the new kernel reads the old one's.

EXAMPLE

$ kernel
  Setting          Value              From      Purpose
  log.bytes        524288             file      how many bytes one log file may carry before it wraps
  net.forward      0                  file      pass packets between cards, off unless this is a router
  serial.baud      38400              default   how fast the serial line runs
  serial.port      0                  default   where the line sits, 0 is where this machine puts it (COM1 on x86_64, the UART block on rv64i)
  serial.on        1                  default   whether the serial line runs at all
  hostname         prophet            file      what this machine calls itself
  log.messages     debug              file      the last level of kernel lines in the log
  console.messages warn               file      the last level of kernel lines on the screen
  console.ttys     6                  file      how many consoles there are
  console.rows     25                 file      how many rows one console has
  lang             en                 default   the language the machine speaks
  securelevel      0                  default   0 lets the machine be set up, 1 closes the kernel swap
  power.bias       0                  file      0 is all speed, 15 is all saving, 255 means leave it alone
  power.clock      0                  file      pin every core to one hwp step, 0 lets the hardware decide
  power.smt        1                  file      two threads per core, off parks every sibling
  power.turbo      1                  file      let the cores go above their base clock
  cpu.split_lock   1                  default   report a lock that tears across two cache lines
  spectre.ibpb     1                  file      empty the branch predictor on every change of address space
  spectre.ssbd     1                  file      switch off the speculative bypass of a store
  spectre.stibp    1                  file      keep the two threads of one core apart
  spectre.ibrs     1                  file      limit branch prediction inside the kernel
  kernel.mode      performance        default   performance or realtime: what this machine is for
  mls.closed       -                  default   the pairs of circles that may not reach each other, `-` for none
  safe.reset       -                  default   the service to let out of its safe state, the only way back
  sched.aside      -                  default   the cores that take only what was bound to them, `7` or `7:control` for one circle only, `-` for none
  trace.on         0                  default   bracket the marked paths with the counter of their core
  pack.method      lz4                file      pack cold pages in RAM with this service, off for none
  frame.leaf_count 0                  default   a byte per frame counts the leaves that map it, so a free or a hand-out of a mapped frame is said
  frame.owner_check0                  default   the watch asks whether a frame just freed is still mapped by a run, and says who freed it
  mm.domain        -                  default   how many frames earlier a circle stops than the kernel, `world:256`, `-` for none
  providers.hand   -                  default   a provider per service by hand, <service>=<provider> separated by blanks; beats providers.ways
  providers.ways   measured           default   where the measured choice may take a provider: measured, prefer <class>, only <class> (R13-WAYS-01)
  providers.measure0                  default   1 measures every provider table once and stores it in /system/config/providers.measured, the setter woken when it stands (`ways measure`), then 0 again; nothing else measures
  providers.off    -                  default   providers never chosen, read at the start from boot.conf
  fabric.use       off                default   take blocks of the fabric: off, all, or one service name
  input.layout     en_US              default   keyboard layout: en_US (QWERTY), de_DE (QWERTZ), es_ES, fr_FR (AZERTY)
  memory.machine_mbauto               file      the most memory every run together is promised, MiB; auto the usable memory without the start's floor and the kernel's line
  memory.run_mb    auto               file      the most memory one run holds in its blocks together, MiB; auto three quarters of the memory
  boot             splash,logbelow    default   what the screen shows at the start, read from boot.conf: quiet, log, splash (picture until login), splash,log (Esc shows the lines), splash,logbelow
  tgfx.mode        auto               default   console mode: auto takes the framebuffer text (256 and truecolor) when a display exists, text stays VGA (16), fbnativ takes the mode the card already shows, terminal the serial line's
  tgfx.rowpaint    0                  default   paint text rows pixel row by pixel row, for write-combined frame buffers
  tgfx.smooth      1                  file      smooth the doubled framebuffer font with EPX, off keeps hard pixels
  power.clock.0    0                  default   pin this one core to an hwp step, 0 follows power.clock
  power.clock.1    0                  default   pin this one core to an hwp step, 0 follows power.clock
  power.clock.2    0                  default   pin this one core to an hwp step, 0 follows power.clock
  power.clock.3    0                  default   pin this one core to an hwp step, 0 follows power.clock
  power.clock.4    0                  default   pin this one core to an hwp step, 0 follows power.clock
  power.clock.5    0                  default   pin this one core to an hwp step, 0 follows power.clock
  power.clock.6    0                  default   pin this one core to an hwp step, 0 follows power.clock
  power.clock.7    0                  default   pin this one core to an hwp step, 0 follows power.clock
  can.stop         0                  default   the identifier whose frame strikes the emergency stop, 0 = none, CANopen EMCY of node zero is 128
  net.arp.entries  auto               default   how many neighbours the ARP cache holds at once, applied when netd starts
  filter.states    auto               default   how many connections the filter remembers at once
  filter.icmp.idle 30                 default   seconds a quiet ICMP exchange is remembered
  filter.udp.idle  60                 default   seconds a quiet UDP conversation is remembered
  filter.tcp.idle  600                default   seconds a quiet TCP connection is remembered
  net.ip.pending   auto               default   how many packets wait for a hardware address at once, applied when netd starts
  net.tcp.listenersauto               default   how many ports can be listened on at once, applied when netd starts
  net.tcp.connectioauto               default   how many TCP connections the stack holds at once, applied when netd starts
  net.tsn          off                default   the transmit schedule: off, or cycle_us/window_us:gates,...
  net.udp.ports    auto               default   how many UDP ports can be open at once, applied when netd starts
  gpu.intel.blit   0                  file      a test: one solid fill of the second picture over the copy engine of an Intel iGPU, its own context and PPGTT, then two seconds shown (R13-IGPU-03)
  display.rgb_rangeauto               default   the RGB range sent to a screen: auto as CTA-861 has it (limited for a VIC unless the screen can be told), full, limited
  pgl.start_picturecity               default   which picture ProphetGL shows at its start: city (night over the city), jungle (the rain forest with the spider monkey and its torch) or random (the seed decides)
  pgl.start_animati0                  default   the seed ProphetGL's start repeats: 0 a fresh one each start, else exactly the picture of that seed (`pgl seeds` lists the kept ones)
  pgl.start_animati1                  default   what ProphetGL shows at its start: 1 the picture pgl.start_picture names, 0 nothing
  skies.region     de                 default   which markings Prophet Skies shows: de (the default) no swastika, world the historical tail marking
  re.output        auto               default   where a scene's pictures go: auto what the program asks (lux real points, cell console cells), lux or cell for every program; lux falls to cell when the module, the screen or its surface is not there
  pgl.provider     -                  default   the ProphetGL provider a program draws on and opens its chain of kinds on, beating the stored choice of `ways measure`: - takes the stored choice (the fastest whole one for a chain), else e.g. pgl.soft or pgl.gpu.nvidia.ampere
  re.world.team    auto               default   the helpers of the engine's team a program opens: auto one a core but the caller's, a number at most so many, 0 the caller alone (to hold a picture against the team's)
  re.world.cloud_grauto               default   the cloud field's grid of corners: 1 as it was (a corner every h/270+2 points), 2 half as far again apart (about half the corners), 0 the same as 1, auto 1 and stepped by the scene's time (R13-ENG-04)
  re.world.cloth_loauto               default   a far cloth's sub-steps and grid by its distance: 1 on (8 within 30 m, 4 within 60 m, 2 farther), 2 coarser (the distances halved), 0 every cloth its eight, auto 1 and stepped by the scene's time (R13-ENG-04)
  re.world.tail_carauto               default   where a frame's tail (style, bloom, grade) runs where nothing paints after it: 0 the CPU, 1 the card, 2 the faster of both measured in the first frames, auto the engine's choice (the CPU) (R13-ENG-04)
  re.world.materialauto               default   whether the shading pass takes its materials' ramps out of tables: 1 on (about 885 KB a program), 0 off (each point dithered), auto the engine's choice (off) (R13-ENG-04)
  lux.twin.on      1                  default   whether lux hands a program the card output's twins to draw its frames straight into: 1 on, 0 the frames copied as before (R13-FABLE-07)
  lux.screen       console            default   where lux lays a program's frames: console (the console's surface) or the name of a card's output, e.g. HDMI-A-2
  display.vsync    0                  default   whether a card's flip waits for the screen's frame: 0 at once, tearing allowed, as many frames as the work allows; 1 at the frame
  display.pattern  0                  default   what a card's screen shows when it comes up: 0 black, 1 the test picture (bands, frame, diagonals)
  choose.floating  -                  default   the service the branch floating is held to, `-` for none
  choose.complex   -                  default   the service the branch complex is held to, `-` for none
  choose.rational  -                  default   the service the branch rational is held to, `-` for none
  choose.fixed     -                  default   the service the branch fixed is held to, `-` for none
  choose.integer   -                  default   the service the branch integer is held to, `-` for none
  gpu.nvidia.run_st0                  default   stamp each sequence of the kernel's way with the card's own time at its head and its work's end, and say every 256 sequences how long the card fetched, worked and took to tell the host (R13-GPU-94)
  gpu.nvidia.copy_m0                  default   how a system<->card bulk copy runs: 0 secure (the CPU copy, the default, the card reaches no RAM), 1 performance (the copy engine by DMA, which needs the card's VT-d domain opened to those pages) (R13-GPU-28)
  gpu.nvidia.spaces1                  default   overwrite a kept program row's shared memory and registers on the card before the next program has it (gpu.nvidia.spaces_keep); off leaves them as the last program left them (R13-GPU-84)
  gpu.nvidia.buffer1                  default   fill every new card buffer with zeros by the copy engine before its owner has it, so nothing of whoever held that video memory before is read (R13-GPU-84)
  gpu.nvidia.spaces1                  default   keep a program's space, channel, context and compute object at its end for the next program, its buffers taken out first; saves some 10 ms a program's first run; what the last program left in shared memory and registers gpu.nvidia.spaces_scrub overwrites first (R13-GPU-83, on since 2026-11-24)
  gpu.nvidia.displa0                  file      the stages of an NVIDIA card's display once GSP-RM runs: 0 off, 3 the trunk (object, core channel, channels), 6 every attached screen showing (R13-GPU-49)
  gpu.nvidia.stall_0                  default   the stall leaves noted and masked as they come, a probe of R13-ISO-09 step 1; read when the card's interrupt starts
  gpu.nvidia.gsp.ir1                  default   GSP-RM's messages wake the events thread by the card's interrupt, 0 it looks every 100 ms (R13-ISO-09); read when the card's interrupt starts
  gpu.nvidia.block 0                  file      threads of a block of a program run, 0 as many as its registers let an SM hold (R13-FABLE-03), else this many, a multiple of 32
  gpu.nvidia.coldst512                default   MiB of video memory the cold store may lay pages in, its second tier behind packing, 0 for none (R13-GPU-27)
  gpu.nvidia.thread64                 default   the threads each program of gpu.nvidia.program runs with, in blocks of up to 128; its output and hash cover one word each (R13-GPU-16)
  gpu.nvidia.progra-                  default   a test: the SM 8.6 programs of a PSM1 file on the root, each run once and its output hashed (R13-GPU-16)
  gpu.nvidia.pictur0                  file      a test: a bar moved down the first screen by this many showings, once with the card's own clocks and once at their top, each timed (R13-GPU-17)
  gpu.nvidia.engine0                  file      a test: one copy of the copy engine out of unmapped space, so the engine faults and the next load must bring the card back (R13-GPU-37)
  gpu.nvidia.gsp.on0                  file      boot GSP-RM on an NVIDIA card from the firmware on the root, after FRTS; off only reads the card
  gpu.nvidia.fw    -                  default   the GSP-RM release an NVIDIA card boots, as its folder on the root (570.144); empty takes the newest the driver knows
  gpu.nvidia.frts  0                  file      run FWSEC once on the GSP falcon of an NVIDIA card to carve FRTS; off only reads the card
  gpu.nvidia.gsp.du0                  default   0 the dump runs only on the trigger, 1 also once each time GSP-RM comes up (R13-GPU-91)
  gpu.nvidia.gsp.du/log               default   the folder the GSP dump files go in, as <dir>/gsp_<name>.bin (R13-GPU-91)
  gpu.nvidia.gsp.duall                default   which GSP regions the dump writes: "all" or a list of names (space or comma), e.g. "libos rmargs log0" (R13-GPU-91)
  gpu.nvidia.gsp.du0                  default   write the chosen GSP memory regions to <dir>/gsp_<name>.bin, read only, for the card-query toolset (R13-GPU-91)
  gpu.nvidia.gsp.tr0                  default   this many distinct messages to and from GSP-RM held and counted, told in the log when set back to 0 or when GSP-RM came to rest: function, length, result, count and the first eight words (R13-NVRE-01)
  gpu.nvidia.hotplu0                  default   a test: these displays are told as plugged in at the watcher's next look, 0 none (R13-NVRE-01)
  gpu.nvidia.draw  0                  default   a test: ProphetGL's draw N on the card (1 a red triangle, 2 uv as colour, 3 depth, 4 a mesh, 5 the mesh into HDMI-A-2's surface over tiles, 6..14 scene 3 a piece at a time), each pixel held against the reference, shown on HDMI-A-2 for 5 s (R13-PGL-02, -03)

SEE ALSO

mods, state, reboot, sign