Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/aienux/blob/main/native/kernel/x86/local_tools.h # aienux Aienux, the AienOS kernel: boot, scheduling, IPC and capability boundaries. Pre-alpha; host, emulator and physical evidence are labelled separately. Brought by drakestapleton Sign in to star 0 stars 0 watching About Files History Releases Proposed changes Issues For developers 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 5 #include 6 #include "x86.h" 7 #define CK_LOCAL_INPUT 4096u 8 #define CK_LOCAL_OUTPUT 4096u 9 #define CK_LOCAL_CALLS 4u 10 enum { CK_LOCAL_IDLE, CK_LOCAL_RUNNING, CK_LOCAL_RETURNED, CK_LOCAL_TRAPPED, 11 CK_LOCAL_REFUSED, CK_LOCAL_ABNORMAL }; 12 enum { 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 }; 14 struct ck_local_result { 15 uint64_t request, invocation; 16 unsigned state, reason, length; 17 uint8_t output[CK_LOCAL_OUTPUT]; 18 }; 19 void ck_local_init(uint64_t root, uint64_t hz); 20 void ck_local_begin(uint64_t request); 21 const struct ck_local_result *ck_local_start(uint64_t request, uint64_t invocation, 22 unsigned tool, const void *input, size_t length); 23 const struct ck_local_result *ck_local_status(uint64_t request, uint64_t invocation); 24 void ck_local_step(void); 25 void ck_local_cancel(void); 26 void ck_local_snapshot(uint64_t cores, uint64_t ram, uint64_t width, uint64_t height, uint64_t network); 27 void ck_local_trap(struct ck_x86_frame *f); 28 void ck_local_selftest(void); 29 /* Once-per-boot public model experiment; never submits a private conversation. */ 30 const char *ck_local_model_demo_step(void); 31 /* kmain owns BSP TSS and APIC. All entry/exit paths have interrupts disabled. */ 32 void ck_local_machine_stack(uint64_t top); 33 int ck_local_machine_timer(int enable); 34 void ck_local_machine_eoi(uint64_t vector); 35 #endif