interplane.Get Omega
Read in your language

aienux

Aienux, the AienOS kernel: boot, scheduling, IPC and capability boundaries. Pre-alpha; host, emulator and physical evidence are labelled separately.

Brought by drakestapleton

branch main Branches Tags History

aienux / native / kernel / x86 / local_tools.h

35 lines · 1584 bytes Raw Blame History
1/* Intel-only, bounded native Omega tools. No external executable admission. */
2#ifndef CK_LOCAL_TOOLS_H
3#define CK_LOCAL_TOOLS_H
4#include <stddef.h>
5#include <stdint.h>
6#include "x86.h"
7#define CK_LOCAL_INPUT 4096u
8#define CK_LOCAL_OUTPUT 4096u
9#define CK_LOCAL_CALLS 4u
10enum { CK_LOCAL_IDLE, CK_LOCAL_RUNNING, CK_LOCAL_RETURNED, CK_LOCAL_TRAPPED,
11 CK_LOCAL_REFUSED, CK_LOCAL_ABNORMAL };
12enum { CK_LOCAL_FAULT = 1, CK_LOCAL_CPU, CK_LOCAL_ELAPSED, CK_LOCAL_CANCELLED,
13 CK_LOCAL_BAD_RETURN, CK_LOCAL_BAD_REQUEST, CK_LOCAL_LIMIT, CK_LOCAL_ADMISSION };
14struct ck_local_result {
15 uint64_t request, invocation;
16 unsigned state, reason, length;
17 uint8_t output[CK_LOCAL_OUTPUT];
18};
19void ck_local_init(uint64_t root, uint64_t hz);
20void ck_local_begin(uint64_t request);
21const struct ck_local_result *ck_local_start(uint64_t request, uint64_t invocation,
22 unsigned tool, const void *input, size_t length);
23const struct ck_local_result *ck_local_status(uint64_t request, uint64_t invocation);
24void ck_local_step(void);
25void ck_local_cancel(void);
26void ck_local_snapshot(uint64_t cores, uint64_t ram, uint64_t width, uint64_t height, uint64_t network);
27void ck_local_trap(struct ck_x86_frame *f);
28void ck_local_selftest(void);
29/* Once-per-boot public model experiment; never submits a private conversation. */
30const char *ck_local_model_demo_step(void);
31/* kmain owns BSP TSS and APIC. All entry/exit paths have interrupts disabled. */
32void ck_local_machine_stack(uint64_t top);
33int ck_local_machine_timer(int enable);
34void ck_local_machine_eoi(uint64_t vector);
35#endif