/* SPDX-License-Identifier: LicenseRef-Starship-1.0 * Copyright (c) 2023-2026 Robert A. James */ /* sk_v4.h -- StarForth v4 on bare metal: one host node at a prompt. * * Built only with STARFORTH_V4=1 (Kconfig.kernel). */ #ifndef STARKERNEL_V4_SK_V4_H #define STARKERNEL_V4_SK_V4_H #include "uefi.h" /* BootDisk */ /* Hera's node number: the first node the kernel brings up, as the hosted mesh numbers her * (v4/tests/test_host_unit.c: "it is told it is 10"). The Stadium is keyed by it (#189). */ #define SK_V4_HERA_NODE 10u /* Bring one StarForth v4 host node up from the capsule image linked into the * kernel, with its console on the kernel's console: the node, POST, the * blocks, the identity. It returns; a node that does not start stops the * machine. `chain` sets the kernel's block chain up: it is called when the * node has booted and passed POST, before the prompt -- as on the v3 path, * POST runs against block RAM of its own and the chain comes after it. * `boot_disk` is the loader's: which disk it booted from * (sk_v4_identity_boot()). */ void sk_v4_boot(void (*chain)(void), const BootDisk *boot_disk); /* The prompt: read a line, hand it to the node, say how it ended. Does not * return. The kernel calls it after sk_v4_boot() and its own checks (#189, * ENGINE.md step 4, Phase 1: sk_v4_run() went). */ void sk_v4_prompt(void); /* Charge the node's opcode counts to its opcode patrons in the Stadium (#189; stadium_ops.h). The * prompt does it as it waits and after each line; the kernel once after sk_v4_boot(). */ void sk_v4_charge_opcodes(void); #endif /* STARKERNEL_V4_SK_V4_H */